1 19 20 25 26 package org.netbeans.modules.xml.wsdl.ui.view; 27 28 import javax.swing.ButtonGroup ; 29 import javax.swing.JRadioButton ; 30 31 import org.netbeans.modules.xml.wsdl.ui.view.wizard.ExtensibilityElementTemplateFactory; 32 import org.netbeans.modules.xml.wsdl.ui.view.wizard.TemplateType; 33 import org.netbeans.modules.xml.wsdl.ui.view.wizard.localized.LocalizedTemplate; 34 35 39 public class TemplatePanel extends javax.swing.JPanel { 40 41 private LocalizedTemplate mlt; 42 private ButtonGroup btnGroup; 43 44 45 public TemplatePanel(LocalizedTemplate lt, ButtonGroup btnGroup) { 46 this.mlt = lt; 47 this.btnGroup = btnGroup; 48 initComponents(); 49 initGUI(); 50 } 51 52 57 private void initComponents() { 59 jRadioButton1 = new javax.swing.JRadioButton (); 60 61 btnGroup.add(jRadioButton1); 62 jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 63 jRadioButton1.setMargin(new java.awt.Insets (0, 0, 0, 0)); 64 65 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 66 this.setLayout(layout); 67 layout.setHorizontalGroup( 68 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 69 .add(layout.createSequentialGroup() 70 .add(jRadioButton1) 71 .addContainerGap(202, Short.MAX_VALUE)) 72 ); 73 layout.setVerticalGroup( 74 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 75 .add(layout.createSequentialGroup() 76 .add(jRadioButton1) 77 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 78 ); 79 } 81 82 private javax.swing.JRadioButton jRadioButton1; 84 86 private void initGUI() { 87 jRadioButton1.setText(this.mlt.getName()); 88 89 } 90 91 public boolean isSelected() { 92 return jRadioButton1.isSelected(); 93 } 94 95 public JRadioButton getRadioButton() { 96 return this.jRadioButton1; 97 } 98 99 public LocalizedTemplate getTemplate() { 100 return this.mlt; 101 } 102 103 104 } 105 | Popular Tags |