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 SessionOverviewForm extends SectionNodeInnerPanel { 32 33 static final String SESSION_TYPE_STATELESS="Stateless"; static final String SESSION_TYPE_STATEFUL="Stateful"; static final String TRANSACTION_TYPE_BEAN="Bean"; static final String TRANSACTION_TYPE_CONTAINER="Container"; 38 41 public SessionOverviewForm(SectionNodeView sectionNodeView) { 42 super(sectionNodeView); 43 initComponents(); 44 statelessRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SESSION_TYPE_STATELESS); 45 statefulRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SESSION_TYPE_STATEFUL); 46 beanRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, TRANSACTION_TYPE_BEAN); 47 containerRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, TRANSACTION_TYPE_CONTAINER); 48 } 49 50 56 private void initComponents() { 58 java.awt.GridBagConstraints gridBagConstraints; 59 60 sessionTypeButtonGroup = new javax.swing.ButtonGroup (); 61 transactionTypeButtonGroup = new javax.swing.ButtonGroup (); 62 sessionUnmatchedRadioButton = new javax.swing.JRadioButton (); 63 transactionUnmatchedRadioButton = new javax.swing.JRadioButton (); 64 nameLabel = new javax.swing.JLabel (); 65 ejbNameTextField = new javax.swing.JTextField (); 66 sessionTypeLabel = new javax.swing.JLabel (); 67 statelessRadioButton = new javax.swing.JRadioButton (); 68 statefulRadioButton = new javax.swing.JRadioButton (); 69 beanRadioButton = new javax.swing.JRadioButton (); 70 containerRadioButton = new javax.swing.JRadioButton (); 71 transactionTypeLabel = new javax.swing.JLabel (); 72 layoutHelperLabel = new javax.swing.JLabel (); 73 74 sessionTypeButtonGroup.add(sessionUnmatchedRadioButton); 75 sessionUnmatchedRadioButton.setText("null"); 76 transactionTypeButtonGroup.add(transactionUnmatchedRadioButton); 77 transactionUnmatchedRadioButton.setSelected(true); 78 transactionUnmatchedRadioButton.setText("null"); 79 80 setLayout(new java.awt.GridBagLayout ()); 81 82 nameLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_EjbName")); 83 gridBagConstraints = new java.awt.GridBagConstraints (); 84 gridBagConstraints.gridx = 0; 85 gridBagConstraints.gridy = 0; 86 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 87 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 88 add(nameLabel, gridBagConstraints); 89 90 gridBagConstraints = new java.awt.GridBagConstraints (); 91 gridBagConstraints.gridx = 1; 92 gridBagConstraints.gridy = 0; 93 gridBagConstraints.gridwidth = 2; 94 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 95 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 96 add(ejbNameTextField, gridBagConstraints); 97 98 sessionTypeLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_SessionType")); 99 gridBagConstraints = new java.awt.GridBagConstraints (); 100 gridBagConstraints.gridx = 0; 101 gridBagConstraints.gridy = 1; 102 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 103 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 104 add(sessionTypeLabel, gridBagConstraints); 105 106 sessionTypeButtonGroup.add(statelessRadioButton); 107 statelessRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Stateless")); 108 statelessRadioButton.setOpaque(false); 109 gridBagConstraints = new java.awt.GridBagConstraints (); 110 gridBagConstraints.gridx = 1; 111 gridBagConstraints.gridy = 1; 112 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 113 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 114 add(statelessRadioButton, gridBagConstraints); 115 116 sessionTypeButtonGroup.add(statefulRadioButton); 117 statefulRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Stateful")); 118 statefulRadioButton.setOpaque(false); 119 gridBagConstraints = new java.awt.GridBagConstraints (); 120 gridBagConstraints.gridx = 2; 121 gridBagConstraints.gridy = 1; 122 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 123 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 124 add(statefulRadioButton, gridBagConstraints); 125 126 transactionTypeButtonGroup.add(beanRadioButton); 127 beanRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Bean")); 128 beanRadioButton.setOpaque(false); 129 gridBagConstraints = new java.awt.GridBagConstraints (); 130 gridBagConstraints.gridx = 1; 131 gridBagConstraints.gridy = 2; 132 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 133 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 134 add(beanRadioButton, gridBagConstraints); 135 136 transactionTypeButtonGroup.add(containerRadioButton); 137 containerRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Container")); 138 containerRadioButton.setOpaque(false); 139 gridBagConstraints = new java.awt.GridBagConstraints (); 140 gridBagConstraints.gridx = 2; 141 gridBagConstraints.gridy = 2; 142 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 143 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 144 add(containerRadioButton, gridBagConstraints); 145 146 transactionTypeLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Transaction_Type")); 147 gridBagConstraints = new java.awt.GridBagConstraints (); 148 gridBagConstraints.gridx = 0; 149 gridBagConstraints.gridy = 2; 150 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 151 gridBagConstraints.insets = new java.awt.Insets (3, 3, 3, 3); 152 add(transactionTypeLabel, gridBagConstraints); 153 154 layoutHelperLabel.setText(" "); 155 gridBagConstraints = new java.awt.GridBagConstraints (); 156 gridBagConstraints.gridx = 3; 157 gridBagConstraints.gridy = 3; 158 gridBagConstraints.weightx = 1.0; 159 gridBagConstraints.weighty = 1.0; 160 add(layoutHelperLabel, gridBagConstraints); 161 162 } 163 165 private javax.swing.JRadioButton beanRadioButton; 167 private javax.swing.JRadioButton containerRadioButton; 168 private javax.swing.JTextField ejbNameTextField; 169 private javax.swing.JLabel layoutHelperLabel; 170 private javax.swing.JLabel nameLabel; 171 private javax.swing.ButtonGroup sessionTypeButtonGroup; 172 private javax.swing.JLabel sessionTypeLabel; 173 private javax.swing.JRadioButton sessionUnmatchedRadioButton; 174 private javax.swing.JRadioButton statefulRadioButton; 175 private javax.swing.JRadioButton statelessRadioButton; 176 private javax.swing.ButtonGroup transactionTypeButtonGroup; 177 private javax.swing.JLabel transactionTypeLabel; 178 private javax.swing.JRadioButton transactionUnmatchedRadioButton; 179 181 public JTextField getEjbNameTextField() { 182 return ejbNameTextField; 183 } 184 185 public ButtonGroup getSessionTypeButtonGroup() { 186 return sessionTypeButtonGroup; 187 } 188 189 public ButtonGroup getTransactionTypeButtonGroup() { 190 return transactionTypeButtonGroup; 191 } 192 193 public JComponent getErrorComponent(String errorId) { 194 return null; 195 } 196 197 public void setValue(JComponent source, Object value) { 198 199 } 200 201 public void linkButtonPressed(Object ddBean, String ddProperty) { 202 203 } 204 } 205 | Popular Tags |