Examples of JRadioButton


Examples of javax.swing.JRadioButton

    private StartParameter.ShowStacktrace getSelectedStackTraceLevel() {
        ButtonModel selectedButtonModel = stackTraceButtonGroup.getSelection();
        if (selectedButtonModel != null) {
            Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
            while (buttonEnumeration.hasMoreElements()) {
                JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
                if (radioButton.getModel() == selectedButtonModel) {
                    StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
                    return level;
                }
            }
        }
View Full Code Here

Examples of javax.swing.JRadioButton

  }

  public void addChild(Widget widget, Object constraint) throws GUIException {
    if (widget instanceof RadioButton) {
      final RadioButton radioButton = (RadioButton) widget;
      JRadioButton button = (JRadioButton) radioButton.getRealWidget();
      super.addChild(widget, constraint);
      buttonGroup.add(button);

      button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          try {
            MapDataModel model = getDataModel();
            if (model != null && key != null) {
              model.setValue(ButtonGroup.this, key, radioButton.getValue());
View Full Code Here

Examples of javax.swing.JRadioButton

   * Initializes the Swing components of this dialog.
   */
  private void initialize()
  {

    rbSeparatorTab = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.tab")); //$NON-NLS-1$
    rbSeparatorColon = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.colon")); //$NON-NLS-1$
    rbSeparatorSemicolon = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.semicolon")); //$NON-NLS-1$
    rbSeparatorOther = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.other")); //$NON-NLS-1$

    getFormValidator().registerButton(rbSeparatorColon);
    getFormValidator().registerButton(rbSeparatorOther);
    getFormValidator().registerButton(rbSeparatorSemicolon);
View Full Code Here

Examples of javax.swing.JRadioButton

    txKeywords = new JTextField();
    txKeywords.setColumns(40);
    txDescription = new JTextField();
    txDescription.setColumns(40);

    rbSecurityNone = new JRadioButton(getResources().getString("pdfsavedialog.securityNone")); //$NON-NLS-1$
    rbSecurity40Bit = new JRadioButton(getResources().getString("pdfsavedialog.security40bit")); //$NON-NLS-1$
    rbSecurity128Bit = new JRadioButton(getResources().getString("pdfsavedialog.security128bit")); //$NON-NLS-1$

    final Action securitySelectAction = new ActionSecuritySelection();
    rbSecurityNone.addActionListener(securitySelectAction);
    rbSecurity40Bit.addActionListener(securitySelectAction);
    rbSecurity128Bit.addActionListener(securitySelectAction);
View Full Code Here

Examples of javax.swing.JRadioButton

        int y = 0;
        int x = 0;
       
        for (ItemExporter exporter : ItemExporters.getInstance().getExporters(wizard.getModuleIdx())) {
            exporters.add(exporter);
            JRadioButton rb = ComponentFactory.getRadioButton(exporter.getName(), exporter.getIcon(), exporter.getKey());
            bg.add(rb);
            add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
               ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                new Insets( 0, 5, 5, 5), 0, 0));

            if (y == 1)
                rb.setSelected(true);
        }
    }
View Full Code Here

Examples of javax.swing.JRadioButton

  {
    final BufferedImage image = new BufferedImage(150, 50, BufferedImage.TYPE_INT_ARGB);
    final Graphics2D g2 = image.createGraphics();
    final JButton bt = new JButton("A Button");
    bt.setSize(90, 20);
    final JRadioButton radio = new JRadioButton("A radio button");
    radio.setSize(100, 20);

    g2.setColor(Color.darkGray);
    bt.paint(g2);
    g2.setColor(Color.blue);
    g2.setTransform(AffineTransform.getTranslateInstance(20, 20));
    radio.paint(g2);
    g2.setTransform(AffineTransform.getTranslateInstance(0, 0));
    g2.setPaint(Color.green);
    g2.setFont(new Font("Serif", Font.PLAIN, 10));
    g2.drawString("You are viewing a graphics of JFreeReport on index "
        + event.getState().getCurrentDataItem(), 10, 10);
View Full Code Here

Examples of javax.swing.JRadioButton

    final TitledBorder tb =
        new TitledBorder(resources.getString("csvdemodialog.separatorchar"));
    separatorPanel.setBorder(tb);

    rbSeparatorTab = new JRadioButton(resources.getString("csvdemodialog.separator.tab"));
    rbSeparatorColon = new JRadioButton(resources.getString("csvdemodialog.separator.colon"));
    rbSeparatorSemicolon = new JRadioButton(resources.getString("csvdemodialog.separator.semicolon"));
    rbSeparatorOther = new JRadioButton(resources.getString("csvdemodialog.separator.other"));

    getFormValidator().registerButton(rbSeparatorColon);
    getFormValidator().registerButton(rbSeparatorOther);
    getFormValidator().registerButton(rbSeparatorSemicolon);
    getFormValidator().registerButton(rbSeparatorTab);
View Full Code Here

Examples of javax.swing.JRadioButton

  private JPanel createTypeSelectionPane()
  {
    final JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(3, 1));

    rbText = new JRadioButton(new SelectTypeAction
        (resources.getString("config-description-editor.type-text"), ConfigDescriptionEditor.TYPE_TEXT)); //$NON-NLS-1$
    rbClass = new JRadioButton(new SelectTypeAction
        (resources.getString("config-description-editor.type-class"),
            ConfigDescriptionEditor.TYPE_CLASS)); //$NON-NLS-1$
    rbEnum = new JRadioButton(new SelectTypeAction
        (resources.getString("config-description-editor.type-enum"), ConfigDescriptionEditor.TYPE_ENUM)); //$NON-NLS-1$

    final ButtonGroup bg = new ButtonGroup();
    bg.add(rbText);
    bg.add(rbClass);
View Full Code Here

Examples of javax.swing.JRadioButton

    public final static String VERTICAL = "vertical";
    public final static String HORIZONTAL = "horizontal";

    public OrientationPropertyEditor() {
        setUseAltCommandStrings(true);
        trueButton = new JRadioButton("Vertical");
        trueButton.setActionCommand(VERTICAL);
        falseButton = new JRadioButton("Horizontal");
        falseButton.setActionCommand(HORIZONTAL);
    }
View Full Code Here

Examples of javax.swing.JRadioButton

        JPanel jp = createPaletteJPanel(boxlabel);

        ButtonGroup buttongroup = new ButtonGroup();

        for (int j = 0; j < buttons.length; j++) {
            JRadioButton jrb = new JRadioButton(buttons[j]);
            jrb.setActionCommand("" + j);//index in list
            jp.add(jrb);
            buttongroup.add(jrb);
            if (al != null) {
                jrb.addActionListener(al);
            }
            if (j == initiallySelected) {
                jrb.setSelected(true);
            } else {
                jrb.setSelected(false);
            }
        }
        return jp;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.