1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.ui; 21 22 import javax.swing.JPanel ; 23 import javax.swing.event.ChangeListener ; 24 25 public class BrokenReferencesAlertPanel extends JPanel { 26 27 public BrokenReferencesAlertPanel() { 28 initComponents(); 29 again.setSelected(FoldersListSettings.getDefault().isShowAgainBrokenRefAlert()); 30 } 31 32 37 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 39 40 jScrollPane1 = new javax.swing.JScrollPane (); 41 message = new javax.swing.JTextArea (); 42 again = new javax.swing.JCheckBox (); 43 44 setLayout(new java.awt.GridBagLayout ()); 45 46 setPreferredSize(new java.awt.Dimension (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 (); 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 (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 () { 68 public void actionPerformed(java.awt.event.ActionEvent evt) { 69 againActionPerformed(evt); 70 } 71 }); 72 73 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (6, 11, 0, 0); 81 add(again, gridBagConstraints); 82 83 } 85 private void againActionPerformed(java.awt.event.ActionEvent evt) { FoldersListSettings.getDefault().setShowAgainBrokenRefAlert(again.isSelected()); 87 } 89 90 private javax.swing.JCheckBox again; 92 private javax.swing.JScrollPane jScrollPane1; 93 private javax.swing.JTextArea message; 94 96 97 } 98 | Popular Tags |