1 19 20 package org.netbeans.modules.j2ee.ddloaders.web.multiview; 21 22 import javax.swing.JTextArea ; 23 import javax.swing.JTextField ; 24 25 32 public class SecurityRolePanel extends javax.swing.JPanel { 33 34 35 public SecurityRolePanel() { 36 initComponents(); 37 } 38 39 public void setRoleName(String name) { 40 roleNameTF.setText(name); 41 } 42 43 public String getRoleName() { 44 return roleNameTF.getText(); 45 } 46 47 public void setDescription(String description) { 48 descriptionTA.setText(description); 49 } 50 51 public String getDescription() { 52 return descriptionTA.getText(); 53 } 54 55 public JTextField getRoleNameTF() { 56 return roleNameTF; 57 } 58 59 public JTextArea getDescriptionTA() { 60 return descriptionTA; 61 } 62 63 68 private void initComponents() { 70 roleNameLabel = new javax.swing.JLabel (); 71 descriptionLabel = new javax.swing.JLabel (); 72 roleNameTF = new javax.swing.JTextField (); 73 jScrollPane1 = new javax.swing.JScrollPane (); 74 descriptionTA = new javax.swing.JTextArea (); 75 76 roleNameLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/ddloaders/web/multiview/Bundle").getString("LBL_roleName_mnem").charAt(0)); 77 roleNameLabel.setLabelFor(roleNameTF); 78 roleNameLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/ddloaders/web/multiview/Bundle").getString("LBL_SecurityRoleName")); 79 80 descriptionLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/ddloaders/web/multiview/Bundle").getString("LBL_description_mnem").charAt(0)); 81 descriptionLabel.setLabelFor(descriptionTA); 82 descriptionLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/ddloaders/web/multiview/Bundle").getString("LBL_SecurityRoleDescription")); 83 84 descriptionTA.setColumns(20); 85 descriptionTA.setRows(5); 86 jScrollPane1.setViewportView(descriptionTA); 87 88 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 89 this.setLayout(layout); 90 layout.setHorizontalGroup( 91 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 92 .add(layout.createSequentialGroup() 93 .addContainerGap() 94 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 95 .add(layout.createSequentialGroup() 96 .add(roleNameLabel) 97 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 98 .add(roleNameTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)) 99 .add(layout.createSequentialGroup() 100 .add(descriptionLabel) 101 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 102 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE))) 103 .addContainerGap()) 104 ); 105 layout.setVerticalGroup( 106 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 107 .add(layout.createSequentialGroup() 108 .addContainerGap() 109 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 110 .add(roleNameLabel) 111 .add(roleNameTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 112 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 113 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 114 .add(descriptionLabel) 115 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 116 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 117 ); 118 } 120 121 private javax.swing.JLabel descriptionLabel; 123 private javax.swing.JTextArea descriptionTA; 124 private javax.swing.JScrollPane jScrollPane1; 125 private javax.swing.JLabel roleNameLabel; 126 private javax.swing.JTextField roleNameTF; 127 129 } 130 | Popular Tags |