1 19 20 package org.netbeans.modules.tasklist.usertasks.translators; 21 22 import javax.swing.DefaultComboBoxModel ; 23 24 27 public class XslTemplatesPanel extends javax.swing.JPanel { 28 private static final long serialVersionUID = 1; 29 30 33 public XslTemplatesPanel() { 34 initComponents(); 35 } 36 37 42 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 44 45 jLabel1 = new javax.swing.JLabel (); 46 jComboBoxLayout = new javax.swing.JComboBox (); 47 jCheckBoxOpen = new javax.swing.JCheckBox (); 48 49 setLayout(new java.awt.GridBagLayout ()); 50 51 setName(org.openide.util.NbBundle.getBundle(XslTemplatesPanel.class).getString("ChooseHtmlLayout")); 52 jLabel1.setLabelFor(jComboBoxLayout); 53 org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(XslTemplatesPanel.class, "Layout")); 54 gridBagConstraints = new java.awt.GridBagConstraints (); 55 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 56 gridBagConstraints.insets = new java.awt.Insets (0, 0, 11, 12); 57 add(jLabel1, gridBagConstraints); 58 59 gridBagConstraints = new java.awt.GridBagConstraints (); 60 gridBagConstraints.ipadx = 100; 61 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 62 gridBagConstraints.insets = new java.awt.Insets (0, 0, 11, 0); 63 add(jComboBoxLayout, gridBagConstraints); 64 65 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxOpen, org.openide.util.NbBundle.getBundle(XslTemplatesPanel.class).getString("ViewExportedHTML")); 66 gridBagConstraints = new java.awt.GridBagConstraints (); 67 gridBagConstraints.gridx = 0; 68 gridBagConstraints.gridy = 1; 69 gridBagConstraints.gridwidth = 2; 70 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 71 add(jCheckBoxOpen, gridBagConstraints); 72 73 } 75 76 private javax.swing.JCheckBox jCheckBoxOpen; 78 private javax.swing.JComboBox jComboBoxLayout; 79 private javax.swing.JLabel jLabel1; 80 82 87 public void setAvailableLayouts(String [] l) { 88 jComboBoxLayout.setModel(new DefaultComboBoxModel (l)); 89 } 90 91 96 public void setLayoutIndex(int index) { 97 jComboBoxLayout.setSelectedIndex(index); 98 } 99 100 105 public void setOpenFile(boolean b) { 106 jCheckBoxOpen.setSelected(b); 107 } 108 109 114 public boolean getOpenFile() { 115 return jCheckBoxOpen.isSelected(); 116 } 117 118 123 public int getLayoutIndex() { 124 return jComboBoxLayout.getSelectedIndex(); 125 } 126 } 127 | Popular Tags |