List of usage examples for javax.swing JRadioButton JRadioButton
public JRadioButton()
From source file:org.monome.pages.MIDITriggersPage.java
public JPanel getPanel() { if (this.panel != null) { return this.panel; }/*ww w. j a v a 2 s . c o m*/ JPanel panel = new JPanel(); panel.setLayout(null); panel.setPreferredSize(new java.awt.Dimension(531, 180)); pageNameLBL = new JLabel("Page " + (this.index + 1) + ": MIDI Triggers"); row16Label = new JLabel(); row16Label.setText("Row 16"); row15Label = new JLabel(); row15Label.setText("Row 15"); row14Label = new JLabel(); row14Label.setText("Row 14"); row13Label = new JLabel(); row13Label.setText("Row 13"); rowRB = new JRadioButton(); rowRB.setText("Rows"); colRB = new JRadioButton(); colRB.setText("Columns"); this.getRowColBG().add(rowRB); this.getRowColBG().add(colRB); addMidiOutButton = new JButton(); addMidiOutButton.addActionListener(this); panel.add(addMidiOutButton); panel.add(colRB); panel.add(rowRB); rowRB.setBounds(19, 104, 86, 18); colRB.setBounds(19, 123, 86, 18); addMidiOutButton.setText("Set MIDI Output"); addMidiOutButton.setBounds(285, 120, 164, 21); row5Label = new JLabel(); row5Label.setText("Row 5"); row6Label = new JLabel(); row6Label.setText("Row 6"); row7Label = new JLabel(); row7Label.setText("Row 7"); row8Label = new JLabel(); row8Label.setText("Row 8"); row9Label = new JLabel(); row9Label.setText("Row 9"); row10Label = new JLabel(); row10Label.setText("Row 10"); row11Label = new JLabel(); row11Label.setText("Row 11"); row12Label = new JLabel(); row12Label.setText("Row 12"); panel.add(toggles[3]); toggles[3].setBounds(58, 78, 74, 18); row3Label = new JLabel(); row3Label.setText("Row 3"); row4Label = new JLabel(); panel.add(row4Label); panel.add(toggles[7]); panel.add(row8Label); panel.add(toggles[11]); panel.add(row12Label); panel.add(toggles[15]); panel.add(row16Label); panel.add(toggles[2]); panel.add(row3Label); panel.add(toggles[6]); panel.add(row7Label); panel.add(toggles[10]); panel.add(row11Label); panel.add(toggles[14]); panel.add(row15Label); row15Label.setBounds(405, 60, 46, 14); toggles[14].setBounds(451, 58, 74, 18); row11Label.setBounds(274, 60, 46, 14); toggles[10].setBounds(320, 58, 74, 18); row7Label.setBounds(143, 60, 46, 14); toggles[6].setBounds(189, 58, 74, 18); row3Label.setBounds(12, 60, 46, 14); toggles[2].setBounds(58, 58, 74, 18); row16Label.setBounds(405, 80, 46, 14); toggles[15].setBounds(451, 78, 74, 18); row12Label.setBounds(274, 80, 46, 14); toggles[11].setBounds(320, 78, 74, 18); row8Label.setBounds(143, 80, 46, 14); toggles[7].setBounds(189, 78, 74, 18); row4Label.setText("Row 4"); row4Label.setBounds(12, 80, 46, 14); row2Label = new JLabel(); row2Label.setText("Row 2"); panel.add(toggles[1]); panel.add(row2Label); panel.add(toggles[5]); panel.add(row6Label); panel.add(toggles[9]); panel.add(row10Label); panel.add(toggles[13]); panel.add(row14Label); row14Label.setBounds(405, 40, 46, 14); toggles[13].setBounds(451, 38, 74, 18); row10Label.setBounds(274, 40, 46, 14); toggles[9].setBounds(320, 38, 74, 18); row6Label.setBounds(143, 40, 46, 14); toggles[5].setBounds(189, 38, 74, 18); row2Label.setBounds(12, 40, 46, 14); toggles[1].setBounds(58, 38, 74, 18); row1Label = new JLabel(); row1Label.setText("Row 1"); panel.add(toggles[0]); panel.add(row1Label); panel.add(toggles[4]); panel.add(row5Label); panel.add(toggles[8]); panel.add(row9Label); panel.add(toggles[12]); panel.add(row13Label); panel.add(pageNameLBL); panel.add(getJLabel1()); pageNameLBL.setBounds(0, 0, 189, 14); row13Label.setBounds(405, 20, 46, 14); toggles[12].setBounds(451, 18, 74, 18); row9Label.setBounds(274, 20, 46, 14); toggles[8].setBounds(320, 18, 74, 18); row5Label.setBounds(143, 20, 46, 14); toggles[4].setBounds(189, 18, 74, 18); row1Label.setBounds(12, 20, 63, 14); toggles[0].setBounds(58, 18, 74, 18); rowRB.setSelected(true); rowRB.addActionListener(this); colRB.addActionListener(this); this.panel = panel; return panel; }
From source file:org.nyu.edu.dlts.dbCopyFrame.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); apiLabel = new JLabel(); panel4 = new JPanel(); label9 = new JLabel(); beanShellRadioButton = new JRadioButton(); jrubyRadioButton = new JRadioButton(); pythonRadioButton = new JRadioButton(); javascriptRadioButton = new JRadioButton(); loadExcelFileButton = new JButton(); excelTextField = new JTextField(); loadMapperScriptButton = new JButton(); mapperScriptTextField = new JTextField(); editScriptButton = new JButton(); separator2 = new JSeparator(); panel5 = new JPanel(); createRepositoryCheckBox = new JCheckBox(); repoShortNameTextField = new JTextField(); repoNameTextField = new JTextField(); repoCodeTextField = new JTextField(); repoURLTextField = new JTextField(); panel2 = new JPanel(); label1 = new JLabel(); label3 = new JLabel(); label10 = new JLabel(); locationsTextField = new JTextField(); locationsLabel = new JLabel(); label5 = new JLabel(); subjectsTextField = new JTextField(); subjectsLabel = new JLabel(); label4 = new JLabel(); namesTextField = new JTextField(); namesLabel = new JLabel(); label6 = new JLabel(); accessionsTextField = new JTextField(); accessionsLabel = new JLabel(); label7 = new JLabel(); digitalObjectsTextField = new JTextField(); digitalObjectLabel = new JLabel(); label8 = new JLabel(); resourcesTextField = new JTextField(); resourcesLabel = new JLabel(); separator1 = new JSeparator(); copyToASpaceButton = new JButton(); hostLabel = new JLabel(); hostTextField = new JTextField(); simulateCheckBox = new JCheckBox(); adminLabel = new JLabel(); adminTextField = new JTextField(); adminPasswordLabel = new JLabel(); adminPasswordTextField = new JTextField(); label2 = new JLabel(); repositoryURITextField = new JTextField(); developerModeCheckBox = new JCheckBox(); outputConsoleLabel = new JLabel(); copyProgressBar = new JProgressBar(); scrollPane1 = new JScrollPane(); consoleTextArea = new JTextArea(); recordURIComboBox = new JComboBox(); panel1 = new JPanel(); paramsLabel = new JLabel(); paramsTextField = new JTextField(); viewRecordButton = new JButton(); buttonBar = new JPanel(); errorLogButton = new JButton(); saveErrorsLabel = new JLabel(); errorCountLabel = new JLabel(); stopButton = new JButton(); utillitiesButton = new JButton(); okButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Archives Space Excel Data Migrator"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//w w w . java 2 s .c o m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- apiLabel ---- apiLabel.setText(" Archives Space Version: v1.1.0"); apiLabel.setHorizontalTextPosition(SwingConstants.CENTER); apiLabel.setFont(new Font("Lucida Grande", Font.BOLD, 14)); contentPanel.add(apiLabel, cc.xy(1, 1)); //======== panel4 ======== { panel4.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label9 ---- label9.setText("Select Script Type"); panel4.add(label9, cc.xy(1, 1)); //---- beanShellRadioButton ---- beanShellRadioButton.setText("Beanshell"); beanShellRadioButton.setSelected(true); beanShellRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearMapperScript(); } }); panel4.add(beanShellRadioButton, cc.xy(3, 1)); //---- jrubyRadioButton ---- jrubyRadioButton.setText("JRuby"); jrubyRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearMapperScript(); } }); panel4.add(jrubyRadioButton, cc.xy(5, 1)); //---- pythonRadioButton ---- pythonRadioButton.setText("Jython"); pythonRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearMapperScript(); } }); panel4.add(pythonRadioButton, cc.xy(7, 1)); //---- javascriptRadioButton ---- javascriptRadioButton.setText("Javascript"); javascriptRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearMapperScript(); } }); panel4.add(javascriptRadioButton, cc.xy(9, 1)); } contentPanel.add(panel4, cc.xywh(3, 1, 7, 1)); //---- loadExcelFileButton ---- loadExcelFileButton.setText("Load Excel File"); loadExcelFileButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { loadExcelFileButtonActionPerformed(); } }); contentPanel.add(loadExcelFileButton, cc.xy(1, 3)); contentPanel.add(excelTextField, cc.xywh(3, 3, 5, 1)); //---- loadMapperScriptButton ---- loadMapperScriptButton.setText("Load Mapper Script"); loadMapperScriptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { loadMapperScriptButtonActionPerformed(); } }); contentPanel.add(loadMapperScriptButton, cc.xy(1, 5)); //---- mapperScriptTextField ---- mapperScriptTextField.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { loadMapperScript(); } }); contentPanel.add(mapperScriptTextField, cc.xywh(3, 5, 5, 1)); //---- editScriptButton ---- editScriptButton.setText("Edit"); editScriptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { editScriptButtonActionPerformed(); } }); contentPanel.add(editScriptButton, cc.xy(9, 5)); contentPanel.add(separator2, cc.xywh(1, 7, 9, 1)); //======== panel5 ======== { panel5.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- createRepositoryCheckBox ---- createRepositoryCheckBox.setText("Create Repository"); createRepositoryCheckBox.setSelected(true); panel5.add(createRepositoryCheckBox, cc.xy(1, 1)); //---- repoShortNameTextField ---- repoShortNameTextField.setText("Repo Short Name 1"); panel5.add(repoShortNameTextField, cc.xy(1, 3)); //---- repoNameTextField ---- repoNameTextField.setText("Repo Name 1"); panel5.add(repoNameTextField, cc.xy(1, 5)); //---- repoCodeTextField ---- repoCodeTextField.setText("Organization Code 1"); panel5.add(repoCodeTextField, cc.xy(1, 7)); //---- repoURLTextField ---- repoURLTextField.setText("http://repository.url.org"); panel5.add(repoURLTextField, cc.xy(1, 9)); } contentPanel.add(panel5, cc.xy(1, 9)); //======== panel2 ======== { panel2.setLayout(new FormLayout("default, default:grow, right:default", "default, default, default, fill:default:grow, fill:default:grow, default, fill:default:grow")); //---- label1 ---- label1.setText("Record Type"); panel2.add(label1, cc.xy(1, 1)); //---- label3 ---- label3.setText("Spreadsheet Number (starting at 1)"); panel2.add(label3, cc.xy(2, 1)); //---- label10 ---- label10.setText("Locations"); panel2.add(label10, cc.xy(1, 2)); //---- locationsTextField ---- locationsTextField.setText("1"); panel2.add(locationsTextField, cc.xy(2, 2)); //---- locationsLabel ---- locationsLabel.setText("not supported"); panel2.add(locationsLabel, cc.xy(3, 2)); //---- label5 ---- label5.setText("Subjects"); panel2.add(label5, cc.xy(1, 3)); //---- subjectsTextField ---- subjectsTextField.setColumns(2); subjectsTextField.setText("2"); panel2.add(subjectsTextField, cc.xy(2, 3)); //---- subjectsLabel ---- subjectsLabel.setText("not supported"); panel2.add(subjectsLabel, cc.xy(3, 3)); //---- label4 ---- label4.setText("Names"); panel2.add(label4, cc.xy(1, 4)); //---- namesTextField ---- namesTextField.setColumns(12); namesTextField.setText("3"); panel2.add(namesTextField, cc.xy(2, 4)); //---- namesLabel ---- namesLabel.setText("not supported"); panel2.add(namesLabel, cc.xy(3, 4)); //---- label6 ---- label6.setText("Accessions"); panel2.add(label6, cc.xy(1, 5)); //---- accessionsTextField ---- accessionsTextField.setColumns(2); accessionsTextField.setText("4"); panel2.add(accessionsTextField, cc.xy(2, 5)); //---- accessionsLabel ---- accessionsLabel.setText("not supported"); panel2.add(accessionsLabel, cc.xy(3, 5)); //---- label7 ---- label7.setText("Digital Objects"); panel2.add(label7, cc.xy(1, 6)); //---- digitalObjectsTextField ---- digitalObjectsTextField.setColumns(2); digitalObjectsTextField.setText("5"); panel2.add(digitalObjectsTextField, cc.xy(2, 6)); //---- digitalObjectLabel ---- digitalObjectLabel.setText("not supported"); panel2.add(digitalObjectLabel, cc.xy(3, 6)); //---- label8 ---- label8.setText("Resources"); panel2.add(label8, cc.xy(1, 7)); //---- resourcesTextField ---- resourcesTextField.setText("6, 7"); resourcesTextField.setColumns(2); panel2.add(resourcesTextField, cc.xy(2, 7)); //---- resourcesLabel ---- resourcesLabel.setText("not supported"); panel2.add(resourcesLabel, cc.xy(3, 7)); } contentPanel.add(panel2, cc.xywh(3, 9, 7, 1)); contentPanel.add(separator1, cc.xywh(1, 11, 9, 1)); //---- copyToASpaceButton ---- copyToASpaceButton.setText("Copy To Archives Space"); copyToASpaceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CopyToASpaceButtonActionPerformed(); } }); contentPanel.add(copyToASpaceButton, cc.xy(1, 13)); //---- hostLabel ---- hostLabel.setText("Archives Space Host"); contentPanel.add(hostLabel, cc.xywh(3, 13, 2, 1)); //---- hostTextField ---- hostTextField.setText("http://localhost:8089"); contentPanel.add(hostTextField, cc.xywh(5, 13, 5, 1)); //---- simulateCheckBox ---- simulateCheckBox.setText("Simulate REST Calls"); simulateCheckBox.setSelected(true); contentPanel.add(simulateCheckBox, cc.xy(1, 15)); //---- adminLabel ---- adminLabel.setText("Administrator User ID"); contentPanel.add(adminLabel, cc.xy(3, 15)); //---- adminTextField ---- adminTextField.setText("admin"); contentPanel.add(adminTextField, cc.xywh(5, 15, 2, 1)); //---- adminPasswordLabel ---- adminPasswordLabel.setText("Password"); contentPanel.add(adminPasswordLabel, cc.xy(7, 15)); //---- adminPasswordTextField ---- adminPasswordTextField.setText("admin"); contentPanel.add(adminPasswordTextField, cc.xy(9, 15)); //---- label2 ---- label2.setText("Target Repository URI"); contentPanel.add(label2, cc.xy(3, 17)); contentPanel.add(repositoryURITextField, cc.xywh(5, 17, 5, 1)); //---- developerModeCheckBox ---- developerModeCheckBox.setText( "Developer Mode (Locations/Names/Subjects are copied once and random IDs are used other records)"); contentPanel.add(developerModeCheckBox, cc.xywh(1, 19, 9, 1)); //---- outputConsoleLabel ---- outputConsoleLabel.setText("Output Console:"); contentPanel.add(outputConsoleLabel, cc.xy(1, 21)); contentPanel.add(copyProgressBar, cc.xywh(3, 21, 7, 1)); //======== scrollPane1 ======== { //---- consoleTextArea ---- consoleTextArea.setRows(12); scrollPane1.setViewportView(consoleTextArea); } contentPanel.add(scrollPane1, cc.xywh(1, 23, 9, 1)); //---- recordURIComboBox ---- recordURIComboBox.setModel(new DefaultComboBoxModel(new String[] { "/repositories", "/users", "/subjects", "/agents/families/1", "/agents/people/1", "/agents/corporate_entities/1", "/repositories/2/accessions/1", "/repositories/2/resources/1", "/repositories/2/archival_objects/1", "/config/enumerations" })); recordURIComboBox.setEditable(true); contentPanel.add(recordURIComboBox, cc.xy(1, 25)); //======== panel1 ======== { panel1.setLayout(new FlowLayout(FlowLayout.LEFT)); //---- paramsLabel ---- paramsLabel.setText("Params"); panel1.add(paramsLabel); //---- paramsTextField ---- paramsTextField.setColumns(20); panel1.add(paramsTextField); } contentPanel.add(panel1, cc.xywh(3, 25, 3, 1)); //---- viewRecordButton ---- viewRecordButton.setText("View"); viewRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { viewRecordButtonActionPerformed(); } }); contentPanel.add(viewRecordButton, cc.xywh(7, 25, 3, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- errorLogButton ---- errorLogButton.setText("View Error Log"); errorLogButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { errorLogButtonActionPerformed(); } }); buttonBar.add(errorLogButton, cc.xy(2, 1)); //---- saveErrorsLabel ---- saveErrorsLabel.setText(" Errors: "); buttonBar.add(saveErrorsLabel, cc.xy(4, 1)); //---- errorCountLabel ---- errorCountLabel.setText("N/A "); errorCountLabel.setForeground(Color.red); errorCountLabel.setFont(new Font("Lucida Grande", Font.BOLD, 13)); buttonBar.add(errorCountLabel, cc.xy(6, 1)); //---- stopButton ---- stopButton.setText("Cancel Copy"); stopButton.setEnabled(false); stopButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { stopButtonActionPerformed(); stopButtonActionPerformed(); } }); buttonBar.add(stopButton, cc.xy(9, 1)); //---- utillitiesButton ---- utillitiesButton.setText("Utilities"); buttonBar.add(utillitiesButton, cc.xy(11, 1)); //---- okButton ---- okButton.setText("Close"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { okButtonActionPerformed(); } }); buttonBar.add(okButton, cc.xy(14, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(beanShellRadioButton); buttonGroup1.add(jrubyRadioButton); buttonGroup1.add(pythonRadioButton); buttonGroup1.add(javascriptRadioButton); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.pentaho.ui.xul.swing.tags.SwingRadio.java
public SwingRadio(Element self, XulComponent parent, XulDomContainer domContainer, String tagName) { super("radio"); radioButton = new JRadioButton(); setManagedObject(radioButton);/* w w w . j av a 2 s.com*/ // wrong type of event to listen to.. this one fires even on mouse over. use itemlistener // radioButton.addChangeListener(new ChangeListener(){ // public void stateChanged(ChangeEvent evt){ // logger.debug("firing selected property change: isSelected="+SwingRadio.this.isSelected()); // SwingRadio.this.changeSupport.firePropertyChange("selected", null, SwingRadio.this.isSelected()); // } // }); radioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { boolean selected = (e.getStateChange() == ItemEvent.SELECTED); logger.debug("firing selected property change: isSelected=" + selected); SwingRadio.this.changeSupport.firePropertyChange("selected", null, selected); } }); }
From source file:org.springframework.richclient.factory.DefaultComponentFactory.java
protected JRadioButton createNewRadioButton() { return new JRadioButton(); }