KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > project > BrokenReferencesAlertPanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.java.project;
21
22 import javax.swing.JPanel JavaDoc;
23
24 public class BrokenReferencesAlertPanel extends JPanel JavaDoc {
25
26     public BrokenReferencesAlertPanel() {
27         initComponents();
28         notAgain.setSelected(!JavaProjectSettings.isShowAgainBrokenRefAlert());
29     }
30
31     /** This method is called from within the constructor to
32      * initialize the form.
33      * WARNING: Do NOT modify this code. The content of this method is
34      * always regenerated by the Form Editor.
35      */

36     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
37
private void initComponents() {
38         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
39
40         jLabel1 = new javax.swing.JLabel JavaDoc();
41         notAgain = new javax.swing.JCheckBox JavaDoc();
42         message = new javax.swing.JLabel JavaDoc();
43         jPanel1 = new javax.swing.JPanel JavaDoc();
44
45         setLayout(new java.awt.GridBagLayout JavaDoc());
46
47         getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSN_BrokenReferencesAlertPanel"));
48         getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSD_BrokenReferencesAlertPanel"));
49         org.openide.awt.Mnemonics.setLocalizedText(jLabel1, java.util.ResourceBundle.getBundle("org/netbeans/modules/java/project/Bundle").getString("MSG_Broken_References_Label"));
50         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
51         gridBagConstraints.gridx = 0;
52         gridBagConstraints.gridy = 0;
53         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
54         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
55         gridBagConstraints.insets = new java.awt.Insets JavaDoc(11, 11, 0, 0);
56         add(jLabel1, gridBagConstraints);
57
58         org.openide.awt.Mnemonics.setLocalizedText(notAgain, org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_BrokenReferencesAlertPanel_notAgain"));
59         notAgain.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
60         notAgain.addActionListener(new java.awt.event.ActionListener JavaDoc() {
61             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
62                 notAgainActionPerformed(evt);
63             }
64         });
65
66         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
67         gridBagConstraints.gridx = 0;
68         gridBagConstraints.gridy = 2;
69         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
70         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
71         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 11, 0, 0);
72         add(notAgain, gridBagConstraints);
73         notAgain.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSN_BrokenReferencesAlertPanel_notAgain"));
74         notAgain.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "ACSD_BrokenReferencesAlertPanel_notAgain"));
75
76         org.openide.awt.Mnemonics.setLocalizedText(message, org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References"));
77         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
78         gridBagConstraints.gridx = 0;
79         gridBagConstraints.gridy = 1;
80         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
81         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
82         gridBagConstraints.weightx = 1.0;
83         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 11, 0, 0);
84         add(message, gridBagConstraints);
85
86         jPanel1.setMinimumSize(new java.awt.Dimension JavaDoc(0, 0));
87         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
88         gridBagConstraints.gridx = 0;
89         gridBagConstraints.gridy = 3;
90         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
91         gridBagConstraints.weightx = 1.0;
92         gridBagConstraints.weighty = 1.0;
93         add(jPanel1, gridBagConstraints);
94
95     }// </editor-fold>//GEN-END:initComponents
96

97     private void notAgainActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_notAgainActionPerformed
98
JavaProjectSettings.setShowAgainBrokenRefAlert(!notAgain.isSelected());
99     }//GEN-LAST:event_notAgainActionPerformed
100

101
102     // Variables declaration - do not modify//GEN-BEGIN:variables
103
private javax.swing.JLabel JavaDoc jLabel1;
104     private javax.swing.JPanel JavaDoc jPanel1;
105     private javax.swing.JLabel JavaDoc message;
106     private javax.swing.JCheckBox JavaDoc notAgain;
107     // End of variables declaration//GEN-END:variables
108

109
110 }
111
Popular Tags