private JPanel createXPathVersionPanel() { JPanel p = new JPanel(); p.add(new JLabel("XPath Version:")); for (Entry<String, String> values : XPathRule.VERSION_DESCRIPTOR.mappings().entrySet()) { JRadioButton b = new JRadioButton(); b.setText(values.getKey()); b.setActionCommand(b.getText()); if (values.getKey().equals(XPathRule.VERSION_DESCRIPTOR.defaultValue())) { b.setSelected(true); } xpathVersionButtonGroup.add(b); p.add(b); } return p; }
private JRadioButton getButton(final Object value) { for (final JRadioButton radioButton : radioButtons) { if (radioButton.getText().equals(value)) return radioButton; } return null; }
public void actionPerformed(ActionEvent event) { JRadioButton btn = (JRadioButton)event.getSource(); quantitationColumn = btn.getText(); } });
private Object[] findDeployment(String name) { for (Object[] deployment : data) { JRadioButton nameButton = (JRadioButton)deployment[0]; if (nameButton.getText().equals(name)) return deployment; } throw new IllegalStateException("Deployment " + name + " exists in server group but not in content repository."); }
private Object[] findDeployment(String name) { for (Object[] deployment : data) { JRadioButton nameButton = (JRadioButton)deployment[0]; if (nameButton.getText().equals(name)) return deployment; } throw new IllegalStateException("Deployment " + name + " exists in server group but not in content repository."); }
public void actionPerformed(ActionEvent arg0) { String sequenceDirectory = ""; for (JRadioButton button : buttonList) { if (button.isSelected()) sequenceDirectory = button.getText() + "/"; } writeToFile(posePlaybackRobotPoseSequence, sequenceDirectory + fileNameInput.getText()); saveFrame.dispose(); } });
public void itemStateChanged(ItemEvent event) { JRadioButton radio = (JRadioButton) event.getSource(); if (radio.isSelected()) { curCrypto = radio.getText().trim(); } } });
@Override public String getValue() { final JRadioButton selectedButton = getSelectedButton(); return selectedButton == null ? null : selectedButton.getText(); }
public void actionPerformed(ActionEvent arg0) { String sequenceDirectory = ""; for (JRadioButton button : buttonList) { if (button.isSelected()) sequenceDirectory = button.getText() + "/"; } writeToFile(posePlaybackRobotPoseSequence, sequenceDirectory + fileNameInput.getText()); saveFrame.dispose(); } });
ActionListener actionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if(e.getSource() instanceof JRadioButton){ JRadioButton radioButton = (JRadioButton) e.getSource(); if(radioButton.isSelected()){ jtfAnswer.setText(radioButton.getText()); } } } }; jrbMale.addActionListener(actionListener); jrbFemale.addActionListener(actionListener);
public void setValue(Object o) { Component[] c = getComponents(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof JRadioButton) { if (((JRadioButton) c[i]).getText().equals(o)) { ((JRadioButton) c[i]).setSelected(true); } else { //Necessary for renderer, its buttons don't fire changes ((JRadioButton) c[i]).setSelected(false); } } } }
public void itemStateChanged(ItemEvent event) { JRadioButton radio = (JRadioButton) event.getSource(); if (radio.isSelected()) { curCrypto = radio.getText().trim(); } } });
private void initComponents() { radioButton = new JRadioButton(); Mnemonics.setLocalizedText(radioButton, NbBundle.getMessage(PropertyEditorDefaultCommand.class, "LBL_DEF_COMMAND_STR")); // NOI18N radioButton.getAccessibleContext().setAccessibleName( radioButton.getText()); radioButton.getAccessibleContext().setAccessibleDescription( radioButton.getText()); customEditor = new CustomEditor(); radioButton.addActionListener(customEditor); }
private void initComponents(boolean useSpinner) { radioButton = new JRadioButton(); Mnemonics.setLocalizedText(radioButton, label); radioButton.getAccessibleContext().setAccessibleName( radioButton.getText()); radioButton.getAccessibleContext().setAccessibleDescription( radioButton.getText()); customEditor = new CustomEditor(useSpinner); }
public AbstractButton makeButtonColumn(String text /*,ActionListener al)*/ ) { JRadioButton xx = new JRadioButton(text) ; xx.setBorder(new EmptyBorder(5,5, 0,0)) ; // xx.setMnemonic(text.charAt(0)); xx.getAccessibleContext().setAccessibleDescription(xx.getText()); selections.add( xx ) ; addToTabOrder( xx ) ; return xx ; }
private void initComponents() { radioButton = new JRadioButton(); Mnemonics.setLocalizedText(radioButton, valueLabel); radioButton.getAccessibleContext().setAccessibleName(radioButton.getText()); radioButton.getAccessibleContext().setAccessibleDescription(radioButton.getText()); customEditor = new CustomEditor(); customEditor.updateModel(); }
public String getSelectedDeployment() { if (!hasDeployments()) return null; for (Enumeration e=deploymentsButtonGroup.getElements(); e.hasMoreElements();) { JRadioButton radio = (JRadioButton)e.nextElement(); if (radio.getModel() == deploymentsButtonGroup.getSelection()) { return radio.getText(); } } throw new IllegalStateException("No deployment selected"); } }
public String getSelectedDeployment() { if (!hasDeployments()) return null; for (Enumeration e=deploymentsButtonGroup.getElements(); e.hasMoreElements();) { JRadioButton radio = (JRadioButton)e.nextElement(); if (radio.getModel() == deploymentsButtonGroup.getSelection()) { return radio.getText(); } } throw new IllegalStateException("No deployment selected"); } }