KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > mdrxml > looks > actions > NewAttributePanel


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 Forte for Java, Community Edition. The Initial
16  * Developer of the Original Software is Sun Microsystems, Inc. Portions
17  * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.mdrxml.looks.actions;
21
22 /**
23  *
24  * @author Tomas Zezula
25  */

26 public class NewAttributePanel extends javax.swing.JPanel JavaDoc {
27
28     /** Creates new form NewAttributePanel */
29     public NewAttributePanel() {
30         initComponents();
31         this.postInitComponents ();
32     }
33
34
35     private void postInitComponents () {
36         this.jLabel1.setDisplayedMnemonic (java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("MNE_AttributeName").charAt(0));
37         this.jLabel2.setDisplayedMnemonic (java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("MNE_AttributeValue").charAt(0));
38     }
39     
40     
41     public String JavaDoc getAttributeName () {
42         return this.name.getText();
43     }
44     
45     public String JavaDoc getAttributeValue () {
46         return this.value.getText();
47     }
48     
49     public void setAttributeName (String JavaDoc name) {
50         this.name.setText (name);
51     }
52     
53     public void setAttributeValue (String JavaDoc value) {
54         this.value.setText (value);
55     }
56     
57     /** This method is called from within the constructor to
58      * initialize the form.
59      * WARNING: Do NOT modify this code. The content of this method is
60      * always regenerated by the Form Editor.
61      */

62     private void initComponents() {//GEN-BEGIN:initComponents
63
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
64
65         jLabel1 = new javax.swing.JLabel JavaDoc();
66         jLabel2 = new javax.swing.JLabel JavaDoc();
67         name = new javax.swing.JTextField JavaDoc();
68         value = new javax.swing.JTextField JavaDoc();
69         jPanel1 = new javax.swing.JPanel JavaDoc();
70
71         setLayout(new java.awt.GridBagLayout JavaDoc());
72
73         jLabel1.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TXT_AttributeName"));
74         jLabel1.setLabelFor(name);
75         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
76         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
77         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 6, 6);
78         add(jLabel1, gridBagConstraints);
79
80         jLabel2.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TXT_AttributeValue"));
81         jLabel2.setLabelFor(value);
82         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
83         gridBagConstraints.gridx = 0;
84         gridBagConstraints.gridy = 1;
85         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
86         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 12, 12, 6);
87         add(jLabel2, gridBagConstraints);
88
89         name.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TIP_AttributeName"));
90         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
91         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
92         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
93         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
94         gridBagConstraints.weightx = 1.0;
95         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 6, 6, 12);
96         add(name, gridBagConstraints);
97
98         value.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TIP_AttributeValue"));
99         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
100         gridBagConstraints.gridx = 1;
101         gridBagConstraints.gridy = 1;
102         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
103         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
104         gridBagConstraints.weightx = 1.0;
105         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 6, 12, 12);
106         add(value, gridBagConstraints);
107
108         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
109         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
110         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
111         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
112         gridBagConstraints.weightx = 1.0;
113         gridBagConstraints.weighty = 1.0;
114         add(jPanel1, gridBagConstraints);
115
116     }//GEN-END:initComponents
117

118     
119     // Variables declaration - do not modify//GEN-BEGIN:variables
120
private javax.swing.JPanel JavaDoc jPanel1;
121     private javax.swing.JTextField JavaDoc value;
122     private javax.swing.JTextField JavaDoc name;
123     private javax.swing.JLabel JavaDoc jLabel2;
124     private javax.swing.JLabel JavaDoc jLabel1;
125     // End of variables declaration//GEN-END:variables
126

127 }
128
Popular Tags