1 19 20 package org.netbeans.modules.mdrxml.looks.actions; 21 22 26 public class NewAttributePanel extends javax.swing.JPanel { 27 28 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 getAttributeName () { 42 return this.name.getText(); 43 } 44 45 public String getAttributeValue () { 46 return this.value.getText(); 47 } 48 49 public void setAttributeName (String name) { 50 this.name.setText (name); 51 } 52 53 public void setAttributeValue (String value) { 54 this.value.setText (value); 55 } 56 57 62 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 64 65 jLabel1 = new javax.swing.JLabel (); 66 jLabel2 = new javax.swing.JLabel (); 67 name = new javax.swing.JTextField (); 68 value = new javax.swing.JTextField (); 69 jPanel1 = new javax.swing.JPanel (); 70 71 setLayout(new java.awt.GridBagLayout ()); 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 (); 76 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 77 gridBagConstraints.insets = new java.awt.Insets (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 (); 83 gridBagConstraints.gridx = 0; 84 gridBagConstraints.gridy = 1; 85 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 86 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (6, 6, 12, 12); 106 add(value, gridBagConstraints); 107 108 gridBagConstraints = new java.awt.GridBagConstraints (); 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 } 118 119 private javax.swing.JPanel jPanel1; 121 private javax.swing.JTextField value; 122 private javax.swing.JTextField name; 123 private javax.swing.JLabel jLabel2; 124 private javax.swing.JLabel jLabel1; 125 127 } 128 | Popular Tags |