Package javax.swing

Examples of javax.swing.JRadioButton


                    rbfixedend.setSelected(false);
                    rbsourceend.apply();
                }
            }
        };
        rbpie = new JRadioButton(resources.getString("Pie"));
        rbchord = new JRadioButton(resources.getString("Chord"));
        rbopen = new JRadioButton(resources.getString("Open"));
        ButtonGroup bg = new ButtonGroup();
        bg.add(rbfull);
        bg.add(rbpie);
        bg.add(rbchord);
        bg.add(rbopen);
        GridBagPanel typePanel = new GridBagPanel();
        typePanel.addOnCurrentRow(ltype);
        typePanel.addOnCurrentRow(rbfull);
        typePanel.addOnCurrentRow(rbpie);
        typePanel.addOnCurrentRow(rbchord);
        typePanel.addOnCurrentRow(rbopen);
        typePanel.carriageReturn();
        // start angle
        GridBagPanel startAnglePanel = new GridBagPanel(resources.getString("StartAngle"));
        lunitstart = new JLabel(resources.getString("Unit:"));
        rbdegstart = new JRadioButton(resources.getString("Degree"), true);
        rbradstart = new JRadioButton(resources.getString("Radian"), false);
        bg = new ButtonGroup();
        bg.add(rbdegstart);
        bg.add(rbradstart);
        rbfixedstart = new JRadioButton(resources.getString("FixedValue:"));
        nfstart = new NumberField(0.0);
        dstreestart = FilteredSourceTree.getFromPool("PropertiesPanel0");
        dstreestart.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
            }
        });
        rbsourcestart = new ActionRadioButton(resources.getString("UseDataSource")) {
            public void stateChanged(ChangeEvent e) {
                nfstart.setEnabled(!isSelected());
                dstreestart.setEnabled(isSelected());
                updateWarnings();
            }
        };
        bg = new ButtonGroup();
        bg.add(rbfixedstart);
        bg.add(rbsourcestart);
        // end angle
        GridBagPanel endAnglePanel = new GridBagPanel(resources.getString("EndAngle"));
        lunitend = new JLabel(resources.getString("Unit:"));
        rbdegend = new JRadioButton(resources.getString("Degree"), true);
        rbradend = new JRadioButton(resources.getString("Radian"), false);
        bg = new ButtonGroup();
        bg.add(rbdegend);
        bg.add(rbradend);
        rbfixedend = new JRadioButton(resources.getString("FixedValue:"));
        nfend = new NumberField(0.0);
        dstreeend = FilteredSourceTree.getFromPool("PropertiesPanel1");
        dstreeend.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
View Full Code Here


        Icon normal,
        Icon selected,
        boolean isSelected,
        ButtonGroup group) {
       
        JRadioButton b = new JRadioButton(text,normal,isSelected);
        b.setSelectedIcon(selected);
        b.setPressedIcon(normal);
        b.setVerticalTextPosition(SwingConstants.BOTTOM);
        b.setHorizontalTextPosition(SwingConstants.CENTER);
        group.add(b);
        return b;
    }
View Full Code Here

        Icon normal,
        Icon selected,
        boolean isSelected,
        ButtonGroup group) {
       
        JRadioButton b = new JRadioButton(text,normal,isSelected);
        b.setSelectedIcon(selected);
        b.setPressedIcon(normal);
        b.setVerticalTextPosition(SwingConstants.BOTTOM);
        b.setHorizontalTextPosition(SwingConstants.CENTER);
        group.add(b);
        return b;
    }
View Full Code Here

   
    customizeAddressBookCheckBox.addItemListener(new EnableListener(addressBookPathFileChooserPanel));
   
    builder.appendSeparator(i18n.tr("Cover"));
   
    internalCoverRadionButton = new JRadioButton();
    internalCoverRadionButton.setSelected(true);
    builder.append(internalCoverRadionButton, 5);
    builder.nextLine();
   
    externalCoverRadionButton = new JRadioButton();
    externalCoverPathFileChooserPanel = new FileChooserPanel(Constants.DEFAULT_COLUMNS);
    externalCoverPathFileChooserPanel.setEnabled(false);
    externalCoverPathFileChooserPanel.setDialogParent(this);
    builder.append(externalCoverRadionButton, 5);
    builder.nextLine();
View Full Code Here

      JPanel ret = new JPanel(new GridBagLayout());

      GridBagConstraints gbc;

      // i18n[TableExportCsvDlg.formatCSV=Export CSV file]
      radFormatCSV = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatCSV"));
      gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
      ret.add(radFormatCSV, gbc);

      // i18n[TableExportCsvDlg.formatXLS=Export MS Excel (XLS) file]
      radFormatXLS = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatXLS"));
      gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(radFormatXLS, gbc);
     
      // i18n[TableExportCsvDlg.formatXML=Export XML file]
      radFormatXML = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatXML"));
      gbc = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(radFormatXML, gbc);

      gbc = new GridBagConstraints(2, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(new JPanel(), gbc);
View Full Code Here

      JPanel ret = new JPanel(new GridBagLayout());

      GridBagConstraints gbc;

      // i18n[TableExportCsvDlg.useGlobalPrefsFormatingExcel=Use formating as configured in Global Prefs (recommended for MS Excel)]
      radUseGlobalPrefsFormating = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.useGlobalPrefsFormatingExcel"));
      gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 2, 0), 0, 0);
      ret.add(radUseGlobalPrefsFormating, gbc);

      // i18n[TableExportCsvDlg.useDefaultFormating=Use default formating]
      radUseDefaultFormating = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.useDefaultFormating"));
      gbc = new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(radUseDefaultFormating, gbc);

      gbc = new GridBagConstraints(1, 0, 1, 2, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(new JPanel(), gbc);
View Full Code Here

      JPanel ret = new JPanel(new GridBagLayout());

      GridBagConstraints gbc;

      // i18n[TableExportCsvDlg.exportCompleteTable=Export complete table]
      radComplete = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportCompleteTable"));
      gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
      ret.add(radComplete, gbc);

      // i18n[TableExportCsvDlg.exportSelection=Export selection]
      radSelection = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportSelection"));
      gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(radSelection, gbc);

      gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
      ret.add(new JPanel(), gbc);
View Full Code Here

    {
      NumberFormat numberFormat = NumberFormat.getInstance();
      numberFormat.setMaximumFractionDigits(5);

      optUseDefaultFormat =
        new JRadioButton(s_stringMgr.getString("floatingPointBase.useDefaultFormat", new Double(3.14159).toString()));
      optUseLocaleDependendFormat =
        new JRadioButton(s_stringMgr.getString("floatingPointBase.uselocaleDependendFormat", numberFormat.format(new Double(3.14159))));



      setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("floatingPointBase.typeBigDecimal")));
View Full Code Here

    new CompletionSettingDirector(Settings.backstore, "number").restore(numberCompletion);
  }     

  protected void addDateControls() {
    dateNowRadionButton = new JRadioButton();
    dateNowRadionButton.setSelected(true);
    dateLabel = builder.append("", dateNowRadionButton);
    builder.nextLine();
   
    dateLaterRadionButton = new JRadioButton();
    dateModel = new SpinnerDateModel();
    final JSpinner dateSpinner = new JSpinner(dateModel);
    dateSpinner.setEnabled(false);
    dateLaterRadionButton.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
View Full Code Here

        return queryPanel;
    }

    private void addJCheckbox(String string, JPanel panel, boolean selected)
    {
        JRadioButton radioButton = new JRadioButton(string);
        radioButton.setSelected(selected);
        type.add(radioButton);
        panel.add(radioButton);
    }
View Full Code Here

TOP

Related Classes of javax.swing.JRadioButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.