KickJava   Java API By Example, From Geeks To Geeks.

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


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 NewTextPanel extends javax.swing.JPanel JavaDoc {
27
28     /** Creates new form NewTextPanel */
29     public NewTextPanel() {
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_TextValue").charAt(0));
37         this.setPreferredSize (new java.awt.Dimension JavaDoc (300,200));
38     }
39     
40     public String JavaDoc getText () {
41         return this.text.getText();
42     }
43     
44     public void setText (String JavaDoc text) {
45         this.text.setText (text);
46     }
47     
48     /** This method is called from within the constructor to
49      * initialize the form.
50      * WARNING: Do NOT modify this code. The content of this method is
51      * always regenerated by the Form Editor.
52      */

53     private void initComponents() {//GEN-BEGIN:initComponents
54
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
55
56         jLabel1 = new javax.swing.JLabel JavaDoc();
57         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
58         text = new javax.swing.JTextArea JavaDoc();
59
60         setLayout(new java.awt.GridBagLayout JavaDoc());
61
62         jLabel1.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TXT_TextValue"));
63         jLabel1.setToolTipText("null");
64         jLabel1.setLabelFor(text);
65         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
66         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
67         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
68         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 6, 12);
69         gridBagConstraints.weightx = 1.0;
70         add(jLabel1, gridBagConstraints);
71
72         text.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/mdrxml/looks/actions/Bundle").getString("TIP_TextValue"));
73         jScrollPane1.setViewportView(text);
74
75         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
76         gridBagConstraints.gridx = 0;
77         gridBagConstraints.gridy = 1;
78         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
79         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
80         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
81         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 12, 12, 12);
82         gridBagConstraints.weightx = 1.0;
83         gridBagConstraints.weighty = 1.0;
84         add(jScrollPane1, gridBagConstraints);
85
86     }//GEN-END:initComponents
87

88     
89     // Variables declaration - do not modify//GEN-BEGIN:variables
90
private javax.swing.JScrollPane JavaDoc jScrollPane1;
91     private javax.swing.JTextArea JavaDoc text;
92     private javax.swing.JLabel JavaDoc jLabel1;
93     // End of variables declaration//GEN-END:variables
94

95 }
96
Popular Tags