1 19 20 package org.netbeans.modules.java.project; 21 22 import javax.swing.JPanel ; 23 24 public class BrokenReferencesAlertPanel extends JPanel { 25 26 public BrokenReferencesAlertPanel() { 27 initComponents(); 28 notAgain.setSelected(!JavaProjectSettings.isShowAgainBrokenRefAlert()); 29 } 30 31 36 private void initComponents() { 38 java.awt.GridBagConstraints gridBagConstraints; 39 40 jLabel1 = new javax.swing.JLabel (); 41 notAgain = new javax.swing.JCheckBox (); 42 message = new javax.swing.JLabel (); 43 jPanel1 = new javax.swing.JPanel (); 44 45 setLayout(new java.awt.GridBagLayout ()); 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 (); 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 (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 (0, 0, 0, 0)); 60 notAgain.addActionListener(new java.awt.event.ActionListener () { 61 public void actionPerformed(java.awt.event.ActionEvent evt) { 62 notAgainActionPerformed(evt); 63 } 64 }); 65 66 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 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 (6, 11, 0, 0); 84 add(message, gridBagConstraints); 85 86 jPanel1.setMinimumSize(new java.awt.Dimension (0, 0)); 87 gridBagConstraints = new java.awt.GridBagConstraints (); 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 } 97 private void notAgainActionPerformed(java.awt.event.ActionEvent evt) { JavaProjectSettings.setShowAgainBrokenRefAlert(!notAgain.isSelected()); 99 } 101 102 private javax.swing.JLabel jLabel1; 104 private javax.swing.JPanel jPanel1; 105 private javax.swing.JLabel message; 106 private javax.swing.JCheckBox notAgain; 107 109 110 } 111 | Popular Tags |