1 package org.apache.ojb.tools.mapping.reversedb2.propertyEditors; 2 3 17 18 import org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.*; 19 20 26 public class JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor extends PropertyEditor 27 { 28 29 30 public JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor() 31 { 32 initComponents(); 33 } 34 35 40 41 private void initComponents() { 43 java.awt.GridBagConstraints gridBagConstraints; 44 45 lblDatabaseAlias = new javax.swing.JLabel (); 46 tfDatabaseAlias = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 47 lblDBMS = new javax.swing.JLabel (); 48 tfDBMS = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 49 lblDatasourceName = new javax.swing.JLabel (); 50 tfDatasourceName = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 51 lblDriver = new javax.swing.JLabel (); 52 tfDriver = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 53 lblDescriptorKey = new javax.swing.JLabel (); 54 tfDescriptorKey = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 55 lblJDBCLevel = new javax.swing.JLabel (); 56 tfJDBCLevel = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 57 tfPassword = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 58 lblPassword = new javax.swing.JLabel (); 59 lblProtocol = new javax.swing.JLabel (); 60 tfProtocol = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 61 lblSubProtocol = new javax.swing.JLabel (); 62 tfSubProtocol = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 63 tfUsername = new org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField(); 64 lblUsername = new javax.swing.JLabel (); 65 66 setLayout(new java.awt.GridBagLayout ()); 67 68 lblDatabaseAlias.setDisplayedMnemonic('a'); 69 lblDatabaseAlias.setLabelFor(tfDatabaseAlias); 70 lblDatabaseAlias.setText("Database Alias:"); 71 gridBagConstraints = new java.awt.GridBagConstraints (); 72 gridBagConstraints.gridx = 1; 73 gridBagConstraints.gridy = 1; 74 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 75 add(lblDatabaseAlias, gridBagConstraints); 76 77 tfDatabaseAlias.setText("jTextField1"); 78 tfDatabaseAlias.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DBALIAS); 79 gridBagConstraints = new java.awt.GridBagConstraints (); 80 gridBagConstraints.gridx = 2; 81 gridBagConstraints.gridy = 1; 82 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 83 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 84 gridBagConstraints.weightx = 1.0; 85 add(tfDatabaseAlias, gridBagConstraints); 86 87 lblDBMS.setDisplayedMnemonic('d'); 88 lblDBMS.setLabelFor(tfDBMS); 89 lblDBMS.setText("DBMS:"); 90 gridBagConstraints = new java.awt.GridBagConstraints (); 91 gridBagConstraints.gridx = 1; 92 gridBagConstraints.gridy = 2; 93 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 94 add(lblDBMS, gridBagConstraints); 95 96 tfDBMS.setText("jTextField1"); 97 tfDBMS.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DBMS); 98 gridBagConstraints = new java.awt.GridBagConstraints (); 99 gridBagConstraints.gridx = 2; 100 gridBagConstraints.gridy = 2; 101 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 102 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 103 gridBagConstraints.weightx = 1.0; 104 add(tfDBMS, gridBagConstraints); 105 106 lblDatasourceName.setDisplayedMnemonic('n'); 107 lblDatasourceName.setLabelFor(tfDatasourceName); 108 lblDatasourceName.setText("Datasource Name:"); 109 gridBagConstraints = new java.awt.GridBagConstraints (); 110 gridBagConstraints.gridx = 1; 111 gridBagConstraints.gridy = 3; 112 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 113 add(lblDatasourceName, gridBagConstraints); 114 115 tfDatasourceName.setText("jTextField1"); 116 tfDatasourceName.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DATASOURCE_NAME); 117 gridBagConstraints = new java.awt.GridBagConstraints (); 118 gridBagConstraints.gridx = 2; 119 gridBagConstraints.gridy = 3; 120 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 121 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 122 gridBagConstraints.weightx = 1.0; 123 add(tfDatasourceName, gridBagConstraints); 124 125 lblDriver.setDisplayedMnemonic('r'); 126 lblDriver.setLabelFor(tfDriver); 127 lblDriver.setText("Driver:"); 128 gridBagConstraints = new java.awt.GridBagConstraints (); 129 gridBagConstraints.gridx = 1; 130 gridBagConstraints.gridy = 4; 131 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 132 add(lblDriver, gridBagConstraints); 133 134 tfDriver.setText("jTextField1"); 135 tfDriver.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DRIVER); 136 gridBagConstraints = new java.awt.GridBagConstraints (); 137 gridBagConstraints.gridx = 2; 138 gridBagConstraints.gridy = 4; 139 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 140 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 141 gridBagConstraints.weightx = 1.0; 142 add(tfDriver, gridBagConstraints); 143 144 lblDescriptorKey.setDisplayedMnemonic('k'); 145 lblDescriptorKey.setLabelFor(tfDescriptorKey); 146 lblDescriptorKey.setText("Descriptor Key:"); 147 gridBagConstraints = new java.awt.GridBagConstraints (); 148 gridBagConstraints.gridx = 1; 149 gridBagConstraints.gridy = 5; 150 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 151 add(lblDescriptorKey, gridBagConstraints); 152 153 tfDescriptorKey.setText("jTextField1"); 154 tfDescriptorKey.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DESCRIPTOR_PBKEY); 155 gridBagConstraints = new java.awt.GridBagConstraints (); 156 gridBagConstraints.gridx = 2; 157 gridBagConstraints.gridy = 5; 158 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 159 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 160 gridBagConstraints.weightx = 1.0; 161 add(tfDescriptorKey, gridBagConstraints); 162 163 lblJDBCLevel.setDisplayedMnemonic('J'); 164 lblJDBCLevel.setLabelFor(tfJDBCLevel); 165 lblJDBCLevel.setText("JDBC Level:"); 166 gridBagConstraints = new java.awt.GridBagConstraints (); 167 gridBagConstraints.gridx = 1; 168 gridBagConstraints.gridy = 6; 169 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 170 add(lblJDBCLevel, gridBagConstraints); 171 172 tfJDBCLevel.setText("jTextField1"); 173 tfJDBCLevel.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_JDBC_LEVEL); 174 gridBagConstraints = new java.awt.GridBagConstraints (); 175 gridBagConstraints.gridx = 2; 176 gridBagConstraints.gridy = 6; 177 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 178 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 179 gridBagConstraints.weightx = 1.0; 180 add(tfJDBCLevel, gridBagConstraints); 181 182 tfPassword.setText("jTextField1"); 183 tfPassword.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_PASSWORD); 184 gridBagConstraints = new java.awt.GridBagConstraints (); 185 gridBagConstraints.gridx = 2; 186 gridBagConstraints.gridy = 7; 187 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 188 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 189 gridBagConstraints.weightx = 1.0; 190 add(tfPassword, gridBagConstraints); 191 192 lblPassword.setDisplayedMnemonic('p'); 193 lblPassword.setLabelFor(tfPassword); 194 lblPassword.setText("Password:"); 195 gridBagConstraints = new java.awt.GridBagConstraints (); 196 gridBagConstraints.gridx = 1; 197 gridBagConstraints.gridy = 7; 198 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 199 add(lblPassword, gridBagConstraints); 200 201 lblProtocol.setDisplayedMnemonic('o'); 202 lblProtocol.setLabelFor(tfProtocol); 203 lblProtocol.setText("Protocol:"); 204 gridBagConstraints = new java.awt.GridBagConstraints (); 205 gridBagConstraints.gridx = 1; 206 gridBagConstraints.gridy = 8; 207 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 208 add(lblProtocol, gridBagConstraints); 209 210 tfProtocol.setText("jTextField1"); 211 tfProtocol.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_PROTOCOL); 212 gridBagConstraints = new java.awt.GridBagConstraints (); 213 gridBagConstraints.gridx = 2; 214 gridBagConstraints.gridy = 8; 215 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 216 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 217 gridBagConstraints.weightx = 1.0; 218 add(tfProtocol, gridBagConstraints); 219 220 lblSubProtocol.setDisplayedMnemonic('s'); 221 lblSubProtocol.setLabelFor(tfSubProtocol); 222 lblSubProtocol.setText("Sub Protocol:"); 223 gridBagConstraints = new java.awt.GridBagConstraints (); 224 gridBagConstraints.gridx = 1; 225 gridBagConstraints.gridy = 9; 226 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 227 add(lblSubProtocol, gridBagConstraints); 228 229 tfSubProtocol.setText("jTextField1"); 230 tfSubProtocol.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_SUBPROTOCOL); 231 gridBagConstraints = new java.awt.GridBagConstraints (); 232 gridBagConstraints.gridx = 2; 233 gridBagConstraints.gridy = 9; 234 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 235 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 236 gridBagConstraints.weightx = 1.0; 237 add(tfSubProtocol, gridBagConstraints); 238 239 tfUsername.setText("jTextField1"); 240 tfUsername.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_USERNAME); 241 gridBagConstraints = new java.awt.GridBagConstraints (); 242 gridBagConstraints.gridx = 2; 243 gridBagConstraints.gridy = 10; 244 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 245 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 246 gridBagConstraints.weightx = 1.0; 247 gridBagConstraints.weighty = 1.0; 248 add(tfUsername, gridBagConstraints); 249 250 lblUsername.setDisplayedMnemonic('m'); 251 lblUsername.setLabelFor(tfUsername); 252 lblUsername.setText("Username:"); 253 gridBagConstraints = new java.awt.GridBagConstraints (); 254 gridBagConstraints.gridx = 1; 255 gridBagConstraints.gridy = 10; 256 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 257 gridBagConstraints.weighty = 1.0; 258 add(lblUsername, gridBagConstraints); 259 260 } 262 public void setEditorTarget (PropertyEditorTarget target) 263 { 264 if (target instanceof OjbMetaJdbcConnectionDescriptorNode) 265 { 266 super.setEditorTarget(target); 267 } 268 else 269 { 270 throw new UnsupportedOperationException ("This editor can only edit OjbMetaJdbcConnectionDescriptorNode objects"); 271 } 272 } 273 274 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfProtocol; 276 private javax.swing.JLabel lblDriver; 277 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfJDBCLevel; 278 private javax.swing.JLabel lblDBMS; 279 private javax.swing.JLabel lblDatabaseAlias; 280 private javax.swing.JLabel lblProtocol; 281 private javax.swing.JLabel lblUsername; 282 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDBMS; 283 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDatasourceName; 284 private javax.swing.JLabel lblDatasourceName; 285 private javax.swing.JLabel lblJDBCLevel; 286 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfUsername; 287 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDescriptorKey; 288 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfSubProtocol; 289 private javax.swing.JLabel lblSubProtocol; 290 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfPassword; 291 private javax.swing.JLabel lblPassword; 292 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDatabaseAlias; 293 private javax.swing.JLabel lblDescriptorKey; 294 private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDriver; 295 297 } 298 | Popular Tags |