1 19 20 package org.netbeans.modules.j2ee.ddloaders.web.multiview; 21 22 29 public class MessageDestRefPanel extends javax.swing.JPanel { 30 31 32 public MessageDestRefPanel() { 33 initComponents(); 34 org.netbeans.modules.xml.multiview.Utils.makeTextAreaLikeTextField(descriptionTA, nameTF); 35 } 36 37 void setMessageDestRefName(String name) { 38 nameTF.setText(name); 39 } 40 41 void setMessageDestRefType(String value) { 42 typeCB.setSelectedItem(value); 43 } 44 45 void setUsage(String value) { 46 usageCB.setSelectedItem(value); 47 } 48 49 void setLink(String value) { 50 linkTF.setText(value); 51 } 52 53 void setDescription(String value) { 54 descriptionTA.setText(value); 55 } 56 57 String getMessageDestRefName() { 58 return nameTF.getText(); 59 } 60 61 String getMessageDestRefType() { 62 return (String )typeCB.getSelectedItem(); 63 } 64 65 String getUsage() { 66 return (String )usageCB.getSelectedItem(); 67 } 68 69 String getLink() { 70 return linkTF.getText(); 71 } 72 73 String getDescription() { 74 return descriptionTA.getText(); 75 } 76 77 javax.swing.JTextField getNameTF() { 78 return nameTF; 79 } 80 81 86 private void initComponents() { 88 java.awt.GridBagConstraints gridBagConstraints; 89 90 buttonGroup1 = new javax.swing.ButtonGroup (); 91 nameLabel = new javax.swing.JLabel (); 92 nameTF = new javax.swing.JTextField (); 93 typeLabel = new javax.swing.JLabel (); 94 typeCB = new javax.swing.JComboBox (); 95 usageLabel = new javax.swing.JLabel (); 96 usageCB = new javax.swing.JComboBox (); 97 linkLabel = new javax.swing.JLabel (); 98 linkTF = new javax.swing.JTextField (); 99 descriptionLabel = new javax.swing.JLabel (); 100 descriptionTA = new javax.swing.JTextArea (); 101 102 setLayout(new java.awt.GridBagLayout ()); 103 104 nameLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefName_mnem").charAt(0)); 105 nameLabel.setLabelFor(nameTF); 106 nameLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefName")); 107 gridBagConstraints = new java.awt.GridBagConstraints (); 108 gridBagConstraints.gridx = 0; 109 gridBagConstraints.gridy = 0; 110 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 111 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 112 add(nameLabel, gridBagConstraints); 113 114 nameTF.setColumns(20); 115 gridBagConstraints = new java.awt.GridBagConstraints (); 116 gridBagConstraints.gridx = 1; 117 gridBagConstraints.gridy = 0; 118 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 119 gridBagConstraints.weightx = 1.0; 120 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 121 add(nameTF, gridBagConstraints); 122 123 typeLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefType_mnem").charAt(0)); 124 typeLabel.setLabelFor(typeCB); 125 typeLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefType")); 126 gridBagConstraints = new java.awt.GridBagConstraints (); 127 gridBagConstraints.gridx = 0; 128 gridBagConstraints.gridy = 1; 129 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 130 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 131 add(typeLabel, gridBagConstraints); 132 133 typeCB.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "javax.jms.Queue", "javax.jms.Topic" })); 134 gridBagConstraints = new java.awt.GridBagConstraints (); 135 gridBagConstraints.gridx = 1; 136 gridBagConstraints.gridy = 1; 137 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 138 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 139 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 140 add(typeCB, gridBagConstraints); 141 142 usageLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefUsage_mnem").charAt(0)); 143 usageLabel.setLabelFor(usageCB); 144 usageLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefUsage")); 145 gridBagConstraints = new java.awt.GridBagConstraints (); 146 gridBagConstraints.gridx = 0; 147 gridBagConstraints.gridy = 2; 148 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 149 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 150 add(usageLabel, gridBagConstraints); 151 152 usageCB.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "Consumes", "Produces", "ConsumesProduces" })); 153 gridBagConstraints = new java.awt.GridBagConstraints (); 154 gridBagConstraints.gridx = 1; 155 gridBagConstraints.gridy = 2; 156 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 157 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 158 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 159 add(usageCB, gridBagConstraints); 160 161 linkLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefLink_mnem").charAt(0)); 162 linkLabel.setLabelFor(linkTF); 163 linkLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefLink")); 164 gridBagConstraints = new java.awt.GridBagConstraints (); 165 gridBagConstraints.gridx = 0; 166 gridBagConstraints.gridy = 3; 167 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 168 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 169 add(linkLabel, gridBagConstraints); 170 171 gridBagConstraints = new java.awt.GridBagConstraints (); 172 gridBagConstraints.gridx = 1; 173 gridBagConstraints.gridy = 3; 174 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 175 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 176 add(linkTF, gridBagConstraints); 177 178 descriptionLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_description_mnem").charAt(0)); 179 descriptionLabel.setLabelFor(descriptionTA); 180 descriptionLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_description")); 181 gridBagConstraints = new java.awt.GridBagConstraints (); 182 gridBagConstraints.gridx = 0; 183 gridBagConstraints.gridy = 4; 184 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 185 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 186 add(descriptionLabel, gridBagConstraints); 187 188 descriptionTA.setRows(3); 189 gridBagConstraints = new java.awt.GridBagConstraints (); 190 gridBagConstraints.gridx = 1; 191 gridBagConstraints.gridy = 4; 192 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 193 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 194 add(descriptionTA, gridBagConstraints); 195 196 } 197 199 200 private javax.swing.ButtonGroup buttonGroup1; 202 private javax.swing.JLabel descriptionLabel; 203 private javax.swing.JTextArea descriptionTA; 204 private javax.swing.JLabel linkLabel; 205 private javax.swing.JTextField linkTF; 206 private javax.swing.JLabel nameLabel; 207 private javax.swing.JTextField nameTF; 208 private javax.swing.JComboBox typeCB; 209 private javax.swing.JLabel typeLabel; 210 private javax.swing.JComboBox usageCB; 211 private javax.swing.JLabel usageLabel; 212 214 } 215 | Popular Tags |