1 19 20 23 24 package org.netbeans.modules.j2ee.sun.ws7.ui; 25 26 30 public class WS70ConfigSelectorPanel extends javax.swing.JPanel { 31 String [] values; 32 33 public WS70ConfigSelectorPanel(String [] vals) { 34 initComponents(); 35 values = vals; 36 jConfigSelectionCb.setModel(new javax.swing.DefaultComboBoxModel (values)); 37 38 } 39 public String [] getValues(){ 40 return values; 41 } 42 public String getSelectedConfig(){ 43 return (String )jConfigSelectionCb.getSelectedItem(); 44 } 45 46 51 private void initComponents() { 53 jConfigSelectionCb = new javax.swing.JComboBox (); 54 jInstaructionLbl = new javax.swing.JLabel (); 55 jConfigLbl = new javax.swing.JLabel (); 56 57 jConfigSelectionCb.setEditable(true); 58 jConfigSelectionCb.getAccessibleContext().setAccessibleParent(this); 59 60 jInstaructionLbl.setLabelFor(jConfigSelectionCb); 61 jInstaructionLbl.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/ws7/ui/Bundle").getString("LBL_INSTRUCTIONS")); 62 jInstaructionLbl.setVerticalTextPosition(javax.swing.SwingConstants.TOP); 63 jInstaructionLbl.getAccessibleContext().setAccessibleParent(this); 64 65 jConfigLbl.setLabelFor(jConfigSelectionCb); 66 jConfigLbl.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/ws7/ui/Bundle").getString("LBL_CONFIG")); 67 68 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 69 this.setLayout(layout); 70 layout.setHorizontalGroup( 71 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 72 .add(layout.createSequentialGroup() 73 .add(41, 41, 41) 74 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 75 .add(jInstaructionLbl, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 76 .add(layout.createSequentialGroup() 77 .add(jConfigLbl) 78 .add(37, 37, 37) 79 .add(jConfigSelectionCb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 122, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 80 .add(52, 52, 52)) 81 ); 82 layout.setVerticalGroup( 83 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 84 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 85 .add(19, 19, 19) 86 .add(jInstaructionLbl, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 87 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35, Short.MAX_VALUE) 88 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 89 .add(jConfigLbl) 90 .add(jConfigSelectionCb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 91 .add(95, 95, 95)) 92 ); 93 } 95 96 private javax.swing.JLabel jConfigLbl; 98 private javax.swing.JComboBox jConfigSelectionCb; 99 private javax.swing.JLabel jInstaructionLbl; 100 102 } 103 | Popular Tags |