KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > websphere6 > dd > loaders > ui > PagePanel


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 package org.netbeans.modules.j2ee.websphere6.dd.loaders.ui;
20
21 import org.netbeans.modules.j2ee.websphere6.dd.beans.*;
22 import org.netbeans.modules.j2ee.websphere6.dd.loaders.webext.*;
23 import org.netbeans.modules.xml.multiview.*;
24 import org.netbeans.modules.xml.multiview.ui.*;
25
26 /**
27  *
28  * @author dlm198383
29  */

30 public class PagePanel extends javax.swing.JPanel JavaDoc {
31     PageType page;
32
33
34     /** Creates new form PagePanel */
35     public PagePanel(PageType page) {
36         this.page=page;
37         initComponents();
38         if(page!=null) {
39             nameField.setText(page.getName());
40             idField.setText(page.getXmiId());
41             uriField.setText(page.getUri());
42         }
43     }
44     
45     public PagePanel() {
46         initComponents();
47     }
48     
49     /** This method is called from within the constructor to
50      * initialize the form.
51      * WARNING: Do NOT modify this code. The content of this method is
52      * always regenerated by the Form Editor.
53      */

54     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
55
private void initComponents() {
56         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
57
58         idLabel = new javax.swing.JLabel JavaDoc();
59         nameLabel = new javax.swing.JLabel JavaDoc();
60         uriLabel = new javax.swing.JLabel JavaDoc();
61         idField = new javax.swing.JTextField JavaDoc();
62         nameField = new javax.swing.JTextField JavaDoc();
63         uriField = new javax.swing.JTextField JavaDoc();
64
65         setLayout(new java.awt.GridBagLayout JavaDoc());
66
67         idLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
68         idLabel.setText("ID:");
69         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
70         gridBagConstraints.gridx = 0;
71         gridBagConstraints.gridy = 0;
72         gridBagConstraints.ipadx = 28;
73         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
74         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 20, 0, 5);
75         add(idLabel, gridBagConstraints);
76
77         nameLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
78         nameLabel.setText("Name:");
79         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
80         gridBagConstraints.gridx = 0;
81         gridBagConstraints.gridy = 1;
82         gridBagConstraints.ipadx = 14;
83         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
84         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 17, 0, 5);
85         add(nameLabel, gridBagConstraints);
86
87         uriLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
88         uriLabel.setText("URI:");
89         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
90         gridBagConstraints.gridx = 0;
91         gridBagConstraints.gridy = 2;
92         gridBagConstraints.ipadx = 14;
93         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
94         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 17, 0, 5);
95         add(uriLabel, gridBagConstraints);
96
97         idField.setColumns(20);
98         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
99         gridBagConstraints.gridx = 10;
100         gridBagConstraints.gridy = 0;
101         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
102         gridBagConstraints.weightx = 1.0;
103         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 10);
104         add(idField, gridBagConstraints);
105
106         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
107         gridBagConstraints.gridx = 10;
108         gridBagConstraints.gridy = 1;
109         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
110         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 10);
111         add(nameField, gridBagConstraints);
112
113         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
114         gridBagConstraints.gridx = 10;
115         gridBagConstraints.gridy = 2;
116         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
117         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 10);
118         add(uriField, gridBagConstraints);
119
120     }// </editor-fold>//GEN-END:initComponents
121

122     
123     // Variables declaration - do not modify//GEN-BEGIN:variables
124
private javax.swing.JTextField JavaDoc idField;
125     private javax.swing.JLabel JavaDoc idLabel;
126     private javax.swing.JTextField JavaDoc nameField;
127     private javax.swing.JLabel JavaDoc nameLabel;
128     private javax.swing.JTextField JavaDoc uriField;
129     private javax.swing.JLabel JavaDoc uriLabel;
130     // End of variables declaration//GEN-END:variables
131
public javax.swing.JTextField JavaDoc getIdField() {
132         return idField;
133     }
134     public javax.swing.JTextField JavaDoc getNameField() {
135         return nameField;
136     }
137     public javax.swing.JTextField JavaDoc getUriField() {
138         return uriField;
139     }
140 }
141
Popular Tags