1 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 30 public class PagePanel extends javax.swing.JPanel { 31 PageType page; 32 33 34 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 54 private void initComponents() { 56 java.awt.GridBagConstraints gridBagConstraints; 57 58 idLabel = new javax.swing.JLabel (); 59 nameLabel = new javax.swing.JLabel (); 60 uriLabel = new javax.swing.JLabel (); 61 idField = new javax.swing.JTextField (); 62 nameField = new javax.swing.JTextField (); 63 uriField = new javax.swing.JTextField (); 64 65 setLayout(new java.awt.GridBagLayout ()); 66 67 idLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 68 idLabel.setText("ID:"); 69 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 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 (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 (); 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 (5, 17, 0, 5); 95 add(uriLabel, gridBagConstraints); 96 97 idField.setColumns(20); 98 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (0, 0, 0, 10); 104 add(idField, gridBagConstraints); 105 106 gridBagConstraints = new java.awt.GridBagConstraints (); 107 gridBagConstraints.gridx = 10; 108 gridBagConstraints.gridy = 1; 109 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 110 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 10); 111 add(nameField, gridBagConstraints); 112 113 gridBagConstraints = new java.awt.GridBagConstraints (); 114 gridBagConstraints.gridx = 10; 115 gridBagConstraints.gridy = 2; 116 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 117 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 10); 118 add(uriField, gridBagConstraints); 119 120 } 122 123 private javax.swing.JTextField idField; 125 private javax.swing.JLabel idLabel; 126 private javax.swing.JTextField nameField; 127 private javax.swing.JLabel nameLabel; 128 private javax.swing.JTextField uriField; 129 private javax.swing.JLabel uriLabel; 130 public javax.swing.JTextField getIdField() { 132 return idField; 133 } 134 public javax.swing.JTextField getNameField() { 135 return nameField; 136 } 137 public javax.swing.JTextField getUriField() { 138 return uriField; 139 } 140 } 141 | Popular Tags |