1 19 20 package org.netbeans.modules.httpserver; 21 22 import java.awt.Component ; 23 import javax.swing.*; 24 import org.openide.awt.Mnemonics; 25 import org.openide.util.NbBundle; 26 27 31 class GrantAccessPanel extends javax.swing.JPanel { 32 33 private String msg; 34 35 36 public GrantAccessPanel (String msg) { 37 this.msg = msg; 38 initComponents (); 39 } 40 41 private void initComponents() { 42 JTextArea localTopMessage = new javax.swing.JTextArea (); 43 44 jCheckBox1 = new javax.swing.JCheckBox (); 45 46 setLayout(new java.awt.BorderLayout (0, 12)); 47 48 setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (0, 0, 0, 0))); 49 getAccessibleContext().setAccessibleDescription(msg); 50 51 localTopMessage.setLineWrap (true); 52 localTopMessage.setWrapStyleWord (true); 53 localTopMessage.setEditable (false); 54 localTopMessage.setEnabled (false); 55 localTopMessage.setOpaque (false); 56 localTopMessage.setDisabledTextColor (javax.swing.UIManager.getColor ("Label.foreground")); localTopMessage.setFont (javax.swing.UIManager.getFont ("Label.font")); 59 StringBuffer lTopMessage = new StringBuffer (); 60 lTopMessage.append(msg); 61 localTopMessage.setText(lTopMessage.toString()); 62 add(localTopMessage, java.awt.BorderLayout.NORTH); 63 64 Mnemonics.setLocalizedText(jCheckBox1, NbBundle.getMessage (GrantAccessPanel.class, "CTL_DNSTDNT")); 65 jCheckBox1.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage (GrantAccessPanel.class, "ACSD_CTL_DNSTDNT")); 66 add(jCheckBox1, java.awt.BorderLayout.SOUTH); 67 } 68 69 private javax.swing.JLabel jLabel; 70 private javax.swing.JCheckBox jCheckBox1; 71 72 74 public void setShowDialog (boolean show) { 75 jCheckBox1.setSelected (!show); 76 } 77 78 public boolean getShowDialog () { 79 return !jCheckBox1.isSelected (); 80 } 81 } 82 | Popular Tags |