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; }
public StoreTypePanel() { this.setLayout(new FlowLayout(FlowLayout.LEFT)); ButtonGroup grp = new ButtonGroup(); grp.add(jrb_jks); grp.add(jrb_pkcs12); grp.add(jrb_pem); // JKS to be selected by default: jrb_jks.setSelected(true); add(jrb_jks); add(jrb_pkcs12); add(jrb_pem); }
public void addItem(T item, String text, boolean selected) { JRadioButton checkBox = new JRadioButton(text, selected); if (myItemMap.isEmpty()) { checkBox.setSelected(true); if (radioListListener != null) { radioListListener.radioSelectionChanged(0); } } myItemMap.put(item, checkBox); buttonGroup.add(checkBox); //noinspection unchecked ((DefaultListModel) getModel()).addElement(checkBox); }
private JPanel createOnErrorPanel() { JPanel panel = new JPanel(new GridLayout(4, 2)); panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); //$NON-NLS-1$ ButtonGroup group = new ButtonGroup(); continueBox = addRadioButton("sampler_on_error_continue", group, panel); //$NON-NLS-1$ breakLoopBox = addRadioButton("sampler_on_error_break_loop", group, panel); //$NON-NLS-1$ startNextThreadLoopBox = addRadioButton("sampler_on_error_start_next_loop", group, panel); //$NON-NLS-1$ startNextIterationOfCurrentLoopBox = addRadioButton("sampler_on_error_start_next_iteration_current_loop", group, panel); //$NON-NLS-1$ stopTestBox = addRadioButton("sampler_on_error_stop_test", group, panel); //$NON-NLS-1$ stopTestNowBox = addRadioButton("sampler_on_error_stop_test_now", group, panel); //$NON-NLS-1$ stopThrdBox = addRadioButton("sampler_on_error_stop_thread", group, panel); //$NON-NLS-1$ continueBox.setSelected(true); return panel; }
radioButtonOutXml.setSelected(true); } else if ("yaml".equalsIgnoreCase(lastServiceGeneratorLanguage)) { radioButtonOutYaml.setSelected(true); radioButtonOutYaml.setSelected(true); } else if(this.psiFile instanceof XmlFile) { radioButtonOutXml.setSelected(true); radioButtonOutYaml.setSelected(true); this.tableView.setModelAndUpdateColumns(this.modelList); tableViewPanel.add(ToolbarDecorator.createDecorator(this.tableView) .disableAddAction() .disableDownAction()
private void rcSetupComponent() { // objDisplayPositionJPanel this.objDisplayPositionJPanel.setBorder(this.objDisplayJPanelBorder); // objDisplayPositionButtonGroup this.objDisplayPositionButtonGroup.add(this.objDisplayTopJRadioButton); this.objDisplayPositionButtonGroup.add(this.objDisplayBottomJRadioButton); this.objDisplayPositionButtonGroup.add(this.objDisplayLeftJRadioButton); this.objDisplayPositionButtonGroup.add(this.objDisplayRightJRadioButton); this.objDisplayTopJRadioButton.setSelected(true); }
protected JPanel createProxyPanel() { JPanel mainPanel = new VerticalPanel(); ButtonGroup group = new ButtonGroup(); createDirectProxy(mainPanel, group); createAutoDetectProxy(mainPanel, group); createSystemProxy(mainPanel, group); createManualProxy(mainPanel, group); createPacUrlProxy(mainPanel, group); systemProxy.setSelected(true); return mainPanel; }
public OptionsConnectionPanel() { ButtonGroup bg = new ButtonGroup(); bg.add(jrb_minutes); bg.add(jrb_seconds); bg.add(jrb_millisecs); jrb_millisecs.setSelected(true); lastSelected = MILLISECONDS; jrb_millisecs.addActionListener(al); JPanel jp_radio = new JPanel(); jp_radio.setLayout(new FlowLayout(FlowLayout.LEFT)); jp_radio.add(jrb_minutes); jp_radio.add(jrb_seconds); jp_radio.add(jrb_millisecs); JPanel jp_timeout = new JPanel(); jp_timeout.setLayout(new FlowLayout(FlowLayout.LEFT)); jftf_timeout.setColumns(20); jp_timeout.add(jftf_timeout); JPanel jp_label_grid = new JPanel(); jp_label_grid.setLayout(new GridLayout(2, 1)); jp_label_grid.add(new JLabel("Timeout in: "));
JRadioButton birdButton = new JRadioButton(birdString); birdButton.setSelected(true); JRadioButton catButton = new JRadioButton(catString); //Group the radio buttons. ButtonGroup group = new ButtonGroup(); group.add(birdButton); group.add(catButton);
/** Creates new form LibraryOptionPanel */ public LibraryOptionPanel() { initComponents(); buttonGroup.add(staticRadioButton); buttonGroup.add(dynamicRadioButton); buttonGroup.add(otherRadioButton); staticRadioButton.setSelected(true); otherTextField.setEnabled(false); // Accessibility getAccessibleContext().setAccessibleDescription(getString("LINKER_OPTIONS_PANEL_SD")); dynamicRadioButton.getAccessibleContext().setAccessibleDescription(getString("LINKER_OPTIONS_DYNAMIC_RB_SD")); otherRadioButton.getAccessibleContext().setAccessibleDescription(getString("LINKER_OPTIONS_OTHER_RB_SD")); otherTextField.getAccessibleContext().setAccessibleDescription(getString("LINKER_OPTIONS_OTHER_TF_SD")); staticRadioButton.getAccessibleContext().setAccessibleDescription(getString("LINKER_OPTIONS_STATIC_RB_SD")); }
fontPanel.add(fontSizeSpinner, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 10), 0, 0)); ((JSpinner.DefaultEditor)fontSizeSpinner.getEditor()).getTextField().setColumns(2); fontPanel.add(fontScroll, new GridBagConstraints(1, 1, 3, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0)); systemFontRadio = new JRadioButton("System:", true); fontFileRadio = new JRadioButton("File:"); unicodePanel = new JPanel(new GridBagLayout()); GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); freeTypeRadio = new JRadioButton("FreeType"); freeTypeRadio.setSelected(true); sampleTextRadio.setSelected(true); GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); ButtonGroup buttonGroup = new ButtonGroup();
classpathLocationRadio.addActionListener(new RadioButtonActionListener()); final ButtonGroup locationGroup = new ButtonGroup(); locationGroup.add(fileLocationRadio); locationGroup.add(urlLocationRadio); locationGroup.add(classpathLocationRadio); fileLocationRadio.setSelected(true); enabledLocation(FILE);
fontPanel.add(fontSizeSpinner, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 10), 0, 0)); ((JSpinner.DefaultEditor)fontSizeSpinner.getEditor()).getTextField().setColumns(2); fontPanel.add(fontScroll, new GridBagConstraints(1, 1, 3, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0)); systemFontRadio = new JRadioButton("System:", true); fontFileRadio = new JRadioButton("File:"); unicodePanel = new JPanel(new GridBagLayout()); GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); freeTypeRadio = new JRadioButton("FreeType"); freeTypeRadio.setSelected(true); sampleTextRadio.setSelected(true); GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); ButtonGroup buttonGroup = new ButtonGroup();
ButtonGroup authMethodGroup = new ButtonGroup(); authMethodGroup.add(mongoCRAuthRadioButton); authMethodGroup.add(scramSHA1AuthRadioButton); authMethodGroup.add(plainAuthMethodRadioButton); privateKeyPathField.getTextField().setName("sshPrivateKeyPathField"); scramSHA1AuthRadioButton.setSelected(true);
jtf_custom.setEnabled(false); ButtonGroup bg = new ButtonGroup(); bg.add(jrb_req_get); bg.add(jrb_req_post); bg.add(jrb_req_put); bg.add(jrb_req_patch); bg.add(jrb_req_delete); jrb_req_get.setSelected(true); JPanel jp_method = new JPanel(); jp_method.setBorder(BorderFactory.createTitledBorder("HTTP Method")); jp_method.setLayout(new GridLayout(5, 2)); jp_method.add(jrb_req_get); jp_method.add(jrb_req_post); jp_method.add(jrb_req_put); jp_method.add(jrb_req_patch); jp_method.add(jrb_req_delete);
public DockerfileArtifactTypePanel() { ButtonGroup dockerfileTypeGroup = new ButtonGroup(); dockerfileTypeGroup.add(jarRadioButton); dockerfileTypeGroup.add(warRadioButton); warRadioButton.setSelected(IS_WAR_DOCKERFILE_DEFAULT); jarRadioButton.setSelected(!IS_WAR_DOCKERFILE_DEFAULT); }
private JComponent makePrefsPanel() { JPanel pane = new JPanel(); pane.setLayout(new GridLayout(0, 2)); pane.add(walkCheckBox); bikeCheckBox = new JCheckBox("bike"); pane.add(bikeCheckBox); trainCheckBox = new JCheckBox("trainish"); pane.add(trainCheckBox); busCheckBox = new JCheckBox("busish"); pane.add(busCheckBox); pane.add(optimizeTypeLabel); opQuick = new JRadioButton("Quick"); opQuick.setSelected(true); opSafe = new JRadioButton("Safe"); opFlat = new JRadioButton("Flat"); opGreenways = new JRadioButton("Greenways"); optimizeTypeGrp = new ButtonGroup(); optimizeTypeGrp.add(opQuick); optimizeTypeGrp.add(opSafe); optimizeTypeGrp.add(opFlat); optimizeTypeGrp.add(opGreenways); JPanel optimizeTypePane = new JPanel(); optimizeTypePane.add(opQuick); optimizeTypePane.add(opSafe);
JRadioButton button1 = ...; button1.setSelected(true); JRadioButton button2 = ...; ButtonGroup group = new ButtonGroup(); group.add(button1); group.add(button2);
jfc.addChoosableFileFilter(new RCFileFilter(FileType.ARCHIVE_EXT)); ButtonGroup group = new ButtonGroup(); group.add(jrb_archive); group.add(jrb_last); jrb_archive.setSelected(true); c.setLayout(new BorderLayout()); jp_center_file.add(jb_archive_browse); jp_center.add(jp_center_file); jp_center.add(jrb_last); c.add(jp_center, BorderLayout.CENTER); JPanel jp_south = new JPanel(); jp_south.setLayout(new FlowLayout(FlowLayout.RIGHT)); jb_next.setMnemonic('n');
public MybatisSettingForm() { ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(closeNaviRadioButton); buttonGroup.add(openNaviButton); openNaviButton.setSelected(true); }