2
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
* The contents of this file are subject to the terms of either the GNU
7
* General Public License Version 2 only ("GPL") or the Common
8
* Development and Distribution License("CDDL") (collectively, the
9
* "License"). You may not use this file except in compliance with the
10
* License. You can obtain a copy of the License at
11
* http://www.netbeans.org/cddl-gplv2.html
12
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
* specific language governing permissions and limitations under the
14
* License. When distributing the software, include this License Header
15
* Notice in each file and include the License file at
16
* nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
17
* particular file as subject to the "Classpath" exception as provided
18
* by Sun in the GPL Version 2 section of the License file that
19
* accompanied this code. If applicable, add the following below the
20
* License Header, with the fields enclosed by brackets [] replaced by
21
* your own identifying information:
22
* "Portions Copyrighted [year] [name of copyright owner]"
26
* The Original Software is NetBeans. The Initial Developer of the Original
27
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
* Microsystems, Inc. All Rights Reserved.
30
* If you wish your version of this file to be governed by only the CDDL
31
* or only the GPL Version 2, indicate your decision by adding
32
* "[Contributor] elects to include this software in this distribution
33
* under the [CDDL or GPL Version 2] license." If you do not indicate a
34
* single choice of license, a recipient has the option to distribute
35
* your version of this file under either the CDDL, the GPL Version 2 or
36
* to extend the choice of license to its licensees as provided above.
37
* However, if you add GPL Version 2 code and therefore, elected the GPL
38
* Version 2 license, then the option applies only if the new code is
39
* made subject to such option by the copyright holder.
42
package org.netbeans.modules.java.project;
44
import javax.swing.JPanel;
46
public class BrokenReferencesAlertPanel extends JPanel {
48
public BrokenReferencesAlertPanel() {
50
notAgain.setSelected(!JavaProjectSettings.isShowAgainBrokenRefAlert());
53
/** This method is called from within the constructor to
54
* initialize the form.
55
* WARNING: Do NOT modify this code. The content of this method is
56
* always regenerated by the Form Editor.
58
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
59
private void initComponents() {
60
java.awt.GridBagConstraints gridBagConstraints;
62
jLabel1 = new javax.swing.JLabel();
63
notAgain = new javax.swing.JCheckBox();
64
message = new javax.swing.JLabel();
65
jPanel1 = new javax.swing.JPanel();
67
setLayout(new java.awt.GridBagLayout());
69
getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSN_BrokenReferencesAlertPanel"));
70
getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSD_BrokenReferencesAlertPanel"));
71
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, java.util.ResourceBundle.getBundle("org/netbeans/modules/java/project/Bundle").getString("MSG_Broken_References_Label"));
72
gridBagConstraints = new java.awt.GridBagConstraints();
73
gridBagConstraints.gridx = 0;
74
gridBagConstraints.gridy = 0;
75
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
76
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
77
gridBagConstraints.insets = new java.awt.Insets(11, 11, 0, 0);
78
add(jLabel1, gridBagConstraints);
80
org.openide.awt.Mnemonics.setLocalizedText(notAgain, org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_BrokenReferencesAlertPanel_notAgain"));
81
notAgain.setMargin(new java.awt.Insets(0, 0, 0, 0));
82
notAgain.addActionListener(new java.awt.event.ActionListener() {
83
public void actionPerformed(java.awt.event.ActionEvent evt) {
84
notAgainActionPerformed(evt);
88
gridBagConstraints = new java.awt.GridBagConstraints();
89
gridBagConstraints.gridx = 0;
90
gridBagConstraints.gridy = 2;
91
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
92
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
93
gridBagConstraints.insets = new java.awt.Insets(6, 11, 0, 0);
94
add(notAgain, gridBagConstraints);
95
notAgain.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSN_BrokenReferencesAlertPanel_notAgain"));
96
notAgain.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSD_BrokenReferencesAlertPanel_notAgain"));
98
org.openide.awt.Mnemonics.setLocalizedText(message, org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References"));
99
gridBagConstraints = new java.awt.GridBagConstraints();
100
gridBagConstraints.gridx = 0;
101
gridBagConstraints.gridy = 1;
102
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
103
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
104
gridBagConstraints.weightx = 1.0;
105
gridBagConstraints.insets = new java.awt.Insets(6, 11, 0, 0);
106
add(message, gridBagConstraints);
108
jPanel1.setMinimumSize(new java.awt.Dimension(0, 0));
109
gridBagConstraints = new java.awt.GridBagConstraints();
110
gridBagConstraints.gridx = 0;
111
gridBagConstraints.gridy = 3;
112
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
113
gridBagConstraints.weightx = 1.0;
114
gridBagConstraints.weighty = 1.0;
115
add(jPanel1, gridBagConstraints);
117
}// </editor-fold>//GEN-END:initComponents
119
private void notAgainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_notAgainActionPerformed
120
JavaProjectSettings.setShowAgainBrokenRefAlert(!notAgain.isSelected());
121
}//GEN-LAST:event_notAgainActionPerformed
124
// Variables declaration - do not modify//GEN-BEGIN:variables
125
private javax.swing.JLabel jLabel1;
126
private javax.swing.JPanel jPanel1;
127
private javax.swing.JLabel message;
128
private javax.swing.JCheckBox notAgain;
129
// End of variables declaration//GEN-END:variables