KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ejbjarproject > ui > 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.j2ee.ejbjarproject.ui;
21
22 import javax.swing.JPanel JavaDoc;
23 import javax.swing.event.ChangeListener JavaDoc;
24
25 public class BrokenReferencesAlertPanel extends JPanel JavaDoc {
26
27     public BrokenReferencesAlertPanel() {
28         initComponents();
29         again.setSelected(FoldersListSettings.getDefault().isShowAgainBrokenRefAlert());
30     }
31
32     /** This method is called from within the constructor to
33      * initialize the form.
34      * WARNING: Do NOT modify this code. The content of this method is
35      * always regenerated by the Form Editor.
36      */

37     private void initComponents() {//GEN-BEGIN:initComponents
38
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
39
40         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
41         message = new javax.swing.JTextArea JavaDoc();
42         again = new javax.swing.JCheckBox JavaDoc();
43
44         setLayout(new java.awt.GridBagLayout JavaDoc());
45
46         setPreferredSize(new java.awt.Dimension JavaDoc(350, 100));
47         jScrollPane1.setBorder(null);
48         message.setEditable(false);
49         message.setLineWrap(true);
50         message.setText(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References"));
51         message.setWrapStyleWord(true);
52         message.setOpaque(false);
53         jScrollPane1.setViewportView(message);
54
55         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
56         gridBagConstraints.gridx = 0;
57         gridBagConstraints.gridy = 0;
58         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
59         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
60         gridBagConstraints.weightx = 1.0;
61         gridBagConstraints.weighty = 0.9;
62         gridBagConstraints.insets = new java.awt.Insets JavaDoc(11, 11, 0, 0);
63         add(jScrollPane1, gridBagConstraints);
64
65         again.setSelected(true);
66         again.setText(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References_Again"));
67         again.addActionListener(new java.awt.event.ActionListener JavaDoc() {
68             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
69                 againActionPerformed(evt);
70             }
71         });
72
73         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
74         gridBagConstraints.gridx = 0;
75         gridBagConstraints.gridy = 1;
76         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
77         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
78         gridBagConstraints.weightx = 1.0;
79         gridBagConstraints.weighty = 0.1;
80         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 11, 0, 0);
81         add(again, gridBagConstraints);
82
83     }//GEN-END:initComponents
84

85     private void againActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_againActionPerformed
86
FoldersListSettings.getDefault().setShowAgainBrokenRefAlert(again.isSelected());
87     }//GEN-LAST:event_againActionPerformed
88

89
90     // Variables declaration - do not modify//GEN-BEGIN:variables
91
private javax.swing.JCheckBox JavaDoc again;
92     private javax.swing.JScrollPane JavaDoc jScrollPane1;
93     private javax.swing.JTextArea JavaDoc message;
94     // End of variables declaration//GEN-END:variables
95

96
97 }
98
Popular Tags