1 19 20 package org.netbeans.modules.j2ee.common.ui; 21 22 import javax.swing.JPanel ; 23 import org.openide.util.NbBundle; 24 25 33 public class BrokenServerAlertPanel extends JPanel { 34 35 public BrokenServerAlertPanel() { 36 initComponents(); 37 notAgain.setSelected(!J2EEUISettings.getDefault().isShowAgainBrokenServerAlert()); 38 } 39 40 45 private void initComponents() { 47 java.awt.GridBagConstraints gridBagConstraints; 48 49 notAgain = new javax.swing.JCheckBox (); 50 message = new javax.swing.JLabel (); 51 52 setLayout(new java.awt.GridBagLayout ()); 53 54 getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSN_BrokenServersAlertPanel")); 55 getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSD_BrokenServersAlertPanel")); 56 org.openide.awt.Mnemonics.setLocalizedText(notAgain, org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "MSG_Broken_Server_Again")); 57 notAgain.setMargin(new java.awt.Insets (0, 0, 0, 0)); 58 notAgain.addActionListener(new java.awt.event.ActionListener () { 59 public void actionPerformed(java.awt.event.ActionEvent evt) { 60 notAgainActionPerformed(evt); 61 } 62 }); 63 64 gridBagConstraints = new java.awt.GridBagConstraints (); 65 gridBagConstraints.gridx = 0; 66 gridBagConstraints.gridy = 1; 67 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 68 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 69 gridBagConstraints.insets = new java.awt.Insets (6, 11, 0, 0); 70 add(notAgain, gridBagConstraints); 71 notAgain.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSN_BrokenServersAlertPanel_notAgain")); 72 notAgain.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSD_BrokenServersAlertPanel_notAgain")); 73 74 org.openide.awt.Mnemonics.setLocalizedText(message, org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "MSG_Broken_Server")); 75 gridBagConstraints = new java.awt.GridBagConstraints (); 76 gridBagConstraints.gridx = 0; 77 gridBagConstraints.gridy = 0; 78 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 79 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 80 gridBagConstraints.weightx = 1.0; 81 gridBagConstraints.weighty = 1.0; 82 gridBagConstraints.insets = new java.awt.Insets (11, 11, 0, 0); 83 add(message, gridBagConstraints); 84 message.getAccessibleContext().setAccessibleName(NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSN_BrokenServersAlertPanel")); 85 message.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenServerAlertPanel.class, "ACSD_BrokenServersAlertPanel")); 86 87 } 89 private void notAgainActionPerformed(java.awt.event.ActionEvent evt) { J2EEUISettings.getDefault().setShowAgainBrokenServerAlert(!notAgain.isSelected()); 91 } 93 private javax.swing.JLabel message; 95 private javax.swing.JCheckBox notAgain; 96 98 } 99 | Popular Tags |