1 19 20 package org.netbeans.modules.j2ee.ddloaders.multiview.ui; 21 22 import org.netbeans.modules.xml.multiview.Refreshable; 23 import org.netbeans.modules.xml.multiview.ui.SectionNodeInnerPanel; 24 import org.netbeans.modules.xml.multiview.ui.SectionNodeView; 25 26 import javax.swing.*; 27 28 31 public class MessageDrivenOverviewForm extends SectionNodeInnerPanel { 32 33 private static final String ACKNOWLEDGE_MODE_AUTO = "Auto-acknowledge"; private static final String ACKNOWLEDGE_MODE_DUPS_OK = "Dups-ok-acknowledge"; 40 public MessageDrivenOverviewForm(SectionNodeView sectionNodeView) { 41 super(sectionNodeView); 42 initComponents(); 43 beanTransactionTypeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SessionOverviewForm.TRANSACTION_TYPE_BEAN); 44 containerTransactionTypeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SessionOverviewForm.TRANSACTION_TYPE_CONTAINER); 45 autoAckModeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, ACKNOWLEDGE_MODE_AUTO); 46 dupsOkAckModeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, ACKNOWLEDGE_MODE_DUPS_OK); 47 } 48 49 55 private void initComponents() { 57 java.awt.GridBagConstraints gridBagConstraints; 58 59 transactionTypeButtonGroup = new javax.swing.ButtonGroup (); 60 acknowledgeModeButtonGroup = new javax.swing.ButtonGroup (); 61 jLabel1 = new javax.swing.JLabel (); 62 jLabel2 = new javax.swing.JLabel (); 63 jLabel3 = new javax.swing.JLabel (); 64 jLabel4 = new javax.swing.JLabel (); 65 jLabel5 = new javax.swing.JLabel (); 66 jLabel6 = new javax.swing.JLabel (); 67 spacerLabel = new javax.swing.JLabel (); 68 nameTextField = new javax.swing.JTextField (); 69 beanTransactionTypeRadioButton = new javax.swing.JRadioButton (); 70 containerTransactionTypeRadioButton = new javax.swing.JRadioButton (); 71 messageSelectorTextField = new javax.swing.JTextField (); 72 autoAckModeRadioButton = new javax.swing.JRadioButton (); 73 dupsOkAckModeRadioButton = new javax.swing.JRadioButton (); 74 destinationTypeComboBox = new javax.swing.JComboBox (); 75 durabilityComboBox = new javax.swing.JComboBox (); 76 77 setLayout(new java.awt.GridBagLayout ()); 78 79 jLabel1.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_EjbName")); 80 gridBagConstraints = new java.awt.GridBagConstraints (); 81 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 82 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 83 add(jLabel1, gridBagConstraints); 84 85 jLabel2.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_TransactionType")); 86 gridBagConstraints = new java.awt.GridBagConstraints (); 87 gridBagConstraints.gridx = 0; 88 gridBagConstraints.gridy = 1; 89 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 90 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 91 add(jLabel2, gridBagConstraints); 92 93 jLabel3.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_MessageSelector")); 94 gridBagConstraints = new java.awt.GridBagConstraints (); 95 gridBagConstraints.gridx = 0; 96 gridBagConstraints.gridy = 2; 97 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 98 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 99 add(jLabel3, gridBagConstraints); 100 101 jLabel4.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_AcknowledgeMode")); 102 gridBagConstraints = new java.awt.GridBagConstraints (); 103 gridBagConstraints.gridx = 0; 104 gridBagConstraints.gridy = 3; 105 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 106 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 107 add(jLabel4, gridBagConstraints); 108 109 jLabel5.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_DestinationType")); 110 gridBagConstraints = new java.awt.GridBagConstraints (); 111 gridBagConstraints.gridx = 0; 112 gridBagConstraints.gridy = 4; 113 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 114 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 115 add(jLabel5, gridBagConstraints); 116 117 jLabel6.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Durability")); 118 gridBagConstraints = new java.awt.GridBagConstraints (); 119 gridBagConstraints.gridx = 0; 120 gridBagConstraints.gridy = 5; 121 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 122 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 6); 123 add(jLabel6, gridBagConstraints); 124 125 spacerLabel.setText(" "); 126 gridBagConstraints = new java.awt.GridBagConstraints (); 127 gridBagConstraints.gridx = 4; 128 gridBagConstraints.gridy = 6; 129 gridBagConstraints.weightx = 1.0; 130 gridBagConstraints.weighty = 1.0; 131 add(spacerLabel, gridBagConstraints); 132 133 nameTextField.setColumns(25); 134 gridBagConstraints = new java.awt.GridBagConstraints (); 135 gridBagConstraints.gridwidth = 3; 136 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 137 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 138 add(nameTextField, gridBagConstraints); 139 140 transactionTypeButtonGroup.add(beanTransactionTypeRadioButton); 141 beanTransactionTypeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Bean")); 142 beanTransactionTypeRadioButton.setOpaque(false); 143 gridBagConstraints = new java.awt.GridBagConstraints (); 144 gridBagConstraints.gridx = 1; 145 gridBagConstraints.gridy = 1; 146 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 147 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 148 add(beanTransactionTypeRadioButton, gridBagConstraints); 149 150 transactionTypeButtonGroup.add(containerTransactionTypeRadioButton); 151 containerTransactionTypeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Container")); 152 containerTransactionTypeRadioButton.setOpaque(false); 153 gridBagConstraints = new java.awt.GridBagConstraints (); 154 gridBagConstraints.gridx = 2; 155 gridBagConstraints.gridy = 1; 156 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 157 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 158 add(containerTransactionTypeRadioButton, gridBagConstraints); 159 160 messageSelectorTextField.setColumns(25); 161 gridBagConstraints = new java.awt.GridBagConstraints (); 162 gridBagConstraints.gridx = 1; 163 gridBagConstraints.gridy = 2; 164 gridBagConstraints.gridwidth = 3; 165 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 166 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 167 add(messageSelectorTextField, gridBagConstraints); 168 169 acknowledgeModeButtonGroup.add(autoAckModeRadioButton); 170 autoAckModeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Auto")); 171 autoAckModeRadioButton.setOpaque(false); 172 gridBagConstraints = new java.awt.GridBagConstraints (); 173 gridBagConstraints.gridx = 1; 174 gridBagConstraints.gridy = 3; 175 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 176 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 177 add(autoAckModeRadioButton, gridBagConstraints); 178 179 acknowledgeModeButtonGroup.add(dupsOkAckModeRadioButton); 180 dupsOkAckModeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_DupsOk")); 181 dupsOkAckModeRadioButton.setOpaque(false); 182 gridBagConstraints = new java.awt.GridBagConstraints (); 183 gridBagConstraints.gridx = 2; 184 gridBagConstraints.gridy = 3; 185 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 186 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 187 add(dupsOkAckModeRadioButton, gridBagConstraints); 188 189 gridBagConstraints = new java.awt.GridBagConstraints (); 190 gridBagConstraints.gridx = 1; 191 gridBagConstraints.gridy = 4; 192 gridBagConstraints.gridwidth = 2; 193 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 194 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 195 add(destinationTypeComboBox, gridBagConstraints); 196 197 gridBagConstraints = new java.awt.GridBagConstraints (); 198 gridBagConstraints.gridx = 1; 199 gridBagConstraints.gridy = 5; 200 gridBagConstraints.gridwidth = 2; 201 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 202 gridBagConstraints.insets = new java.awt.Insets (2, 2, 2, 2); 203 add(durabilityComboBox, gridBagConstraints); 204 205 } 206 208 private javax.swing.ButtonGroup acknowledgeModeButtonGroup; 210 private javax.swing.JRadioButton autoAckModeRadioButton; 211 private javax.swing.JRadioButton beanTransactionTypeRadioButton; 212 private javax.swing.JRadioButton containerTransactionTypeRadioButton; 213 private javax.swing.JComboBox destinationTypeComboBox; 214 private javax.swing.JRadioButton dupsOkAckModeRadioButton; 215 private javax.swing.JComboBox durabilityComboBox; 216 private javax.swing.JLabel jLabel1; 217 private javax.swing.JLabel jLabel2; 218 private javax.swing.JLabel jLabel3; 219 private javax.swing.JLabel jLabel4; 220 private javax.swing.JLabel jLabel5; 221 private javax.swing.JLabel jLabel6; 222 private javax.swing.JTextField messageSelectorTextField; 223 private javax.swing.JTextField nameTextField; 224 private javax.swing.JLabel spacerLabel; 225 private javax.swing.ButtonGroup transactionTypeButtonGroup; 226 228 public void setValue(JComponent source, Object value) { 229 } 230 231 public void linkButtonPressed(Object ddBean, String ddProperty) { 232 } 233 234 public JComponent getErrorComponent(String errorId) { 235 return null; 236 } 237 238 public ButtonGroup getAcknowledgeModeButtonGroup() { 239 return acknowledgeModeButtonGroup; 240 } 241 242 public JRadioButton getAutoAckModeRadioButton() { 243 return autoAckModeRadioButton; 244 } 245 246 public JRadioButton getBeanTransactionTypeRadioButton() { 247 return beanTransactionTypeRadioButton; 248 } 249 250 public JRadioButton getContainerTransactionTypeRadioButton() { 251 return containerTransactionTypeRadioButton; 252 } 253 254 public JComboBox getDestinationTypeComboBox() { 255 return destinationTypeComboBox; 256 } 257 258 public JRadioButton getDupsOkAckModeRadioButton() { 259 return dupsOkAckModeRadioButton; 260 } 261 262 public JComboBox getDurabilityComboBox() { 263 return durabilityComboBox; 264 } 265 266 public JTextField getMessageSelectorTextField() { 267 return messageSelectorTextField; 268 } 269 270 public JTextField getNameTextField() { 271 return nameTextField; 272 } 273 274 public ButtonGroup getTransactionTypeButtonGroup() { 275 return transactionTypeButtonGroup; 276 } 277 } 278 | Popular Tags |