KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ddloaders > web > multiview > SecurityRolePanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.ddloaders.web.multiview;
21
22 import javax.swing.JTextArea JavaDoc;
23 import javax.swing.JTextField JavaDoc;
24
25 /**
26  * SecurityRolePanel.java
27  *
28  * Panel for adding and editing the security-role deployment descriptor.
29  *
30  * @author ptliu
31  */

32 public class SecurityRolePanel extends javax.swing.JPanel JavaDoc {
33     
34     /** Creates new form SecurityRolePanel */
35     public SecurityRolePanel() {
36         initComponents();
37     }
38     
39     public void setRoleName(String JavaDoc name) {
40         roleNameTF.setText(name);
41     }
42     
43     public String JavaDoc getRoleName() {
44         return roleNameTF.getText();
45     }
46     
47     public void setDescription(String JavaDoc description) {
48         descriptionTA.setText(description);
49     }
50     
51     public String JavaDoc getDescription() {
52         return descriptionTA.getText();
53     }
54     
55     public JTextField JavaDoc getRoleNameTF() {
56         return roleNameTF;
57     }
58     
59     public JTextArea JavaDoc getDescriptionTA() {
60         return descriptionTA;
61     }
62     
63     /** This method is called from within the constructor to
64      * initialize the form.
65      * WARNING: Do NOT modify this code. The content of this method is
66      * always regenerated by the Form Editor.
67      */

68     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
69
private void initComponents() {
70         roleNameLabel = new javax.swing.JLabel JavaDoc();
71         descriptionLabel = new javax.swing.JLabel JavaDoc();
72         roleNameTF = new javax.swing.JTextField JavaDoc();
73         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
74         descriptionTA = new javax.swing.JTextArea JavaDoc();
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     }// </editor-fold>//GEN-END:initComponents
119

120     
121     // Variables declaration - do not modify//GEN-BEGIN:variables
122
private javax.swing.JLabel JavaDoc descriptionLabel;
123     private javax.swing.JTextArea JavaDoc descriptionTA;
124     private javax.swing.JScrollPane JavaDoc jScrollPane1;
125     private javax.swing.JLabel JavaDoc roleNameLabel;
126     private javax.swing.JTextField JavaDoc roleNameTF;
127     // End of variables declaration//GEN-END:variables
128

129 }
130
Popular Tags