Package javax.swing

Examples of javax.swing.ButtonGroup


        add(Box.createVerticalStrut(25));
        JPanel limitsProperties = new JPanel();
        limitsProperties.setLayout(new BoxLayout(limitsProperties, BoxLayout.Y_AXIS));
        // limit axis
        JPanel axisPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        ButtonGroup direction = new ButtonGroup();
        horizontal = new JRadioButton(resources.getString("horizontal"), true);
        vertical = new JRadioButton(resources.getString("vertical"), true);
        direction.add(horizontal);
        direction.add(vertical);
        axisPanel.add(horizontal);
        axisPanel.add(vertical);
        horizontal.addActionListener(this);
        vertical.addActionListener(this);
        ButtonGroup axe = new ButtonGroup();
        primary = new JRadioButton(resources.getString("primary"), true);
        secondary = new JRadioButton(resources.getString("secondary"), true);
        axe.add(primary);
        axe.add(secondary);
        axisPanel.add(primary);
        axisPanel.add(secondary);
        primary.addActionListener(this);
        secondary.addActionListener(this);
        limitsProperties.add(axisPanel);
View Full Code Here


            lstatic.setText(currentFile.getName());
        }
        bChoose = new JButton(resources.getString("Choose"));
        rbFit = new JRadioButton(resources.getString("ScaleImageToFitObjectSize"), false);
        rbResize = new JRadioButton(resources.getString("ChangeObjectSizeToFitImage"), false);
        ButtonGroup bg = new ButtonGroup();
        bg.add(rbFit);
        bg.add(rbResize);
        bChoose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                // Set up the file chooser.
                if (fileChooser == null) {
                    fileChooser = new JFileChooser();
View Full Code Here

            }
        };
        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();
            }
        });
        rbsourceend = new ActionRadioButton(resources.getString("UseDataSource")) {
            public void stateChanged(ChangeEvent e) {
                nfend.setEnabled(!isSelected());
                dstreeend.setEnabled(isSelected());
                updateWarnings();
            }
        };
        bg = new ButtonGroup();
        bg.add(rbfixedend);
        bg.add(rbsourceend);
        rbsourcestart.apply();
        rbsourceend.apply();
        rbfull.apply();
        // Create panel
        GridBagPanel unitPanel = new GridBagPanel();
View Full Code Here

        radioPanel = new JPanel();
        eventPanel = new JPanel();
        eventMonitor = new JTextArea(10,10);
        radioPanel.setLayout( new GridLayout(1,6) );
        eventPanel.setLayout( new BorderLayout() );
        buttongroup = new ButtonGroup();

        //  Set up TextArea
        eventMonitor.setEditable(false);

        setUpRadioButtons();
View Full Code Here

        radioPanel = new JPanel();
        eventPanel = new JPanel();
        eventMonitor = new JTextArea(10,10);
        radioPanel.setLayout( new GridLayout(1,6) );
        eventPanel.setLayout( new BorderLayout() );
        buttongroup = new ButtonGroup();

        //  Set up TextArea
        eventMonitor.setEditable(false);

        setUpRadioButtons();
View Full Code Here

      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);


      ButtonGroup bg = new ButtonGroup();
      bg.add(radFormatCSV);
      bg.add(radFormatXLS);
      bg.add(radFormatXML);

      return ret;
   }
View Full Code Here

      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);


      ButtonGroup bg = new ButtonGroup();
      bg.add(radUseGlobalPrefsFormating);
      bg.add(radUseDefaultFormating);

      return ret;


   }
View Full Code Here

      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);


      ButtonGroup bg = new ButtonGroup();
      bg.add(radComplete);
      bg.add(radSelection);

      return ret;
   }
View Full Code Here

    externalCoverRadionButton.addItemListener(new EnableListener(externalCoverPathFileChooserPanel));
   
    builder.append(externalCoverPathFileChooserPanel, 5);
    builder.nextLine();
   
    ButtonGroup buttonGroup = new ButtonGroup();
    buttonGroup.add(internalCoverRadionButton);
    buttonGroup.add(externalCoverRadionButton);
   
    sendCoverAsDocumentCheckBox = new JCheckBox();
    settingMediator.add(Settings.SEND_COVER_AS_DOCUMENT, sendCoverAsDocumentCheckBox);
    builder.append(sendCoverAsDocumentCheckBox, 5);
    builder.nextLine();
View Full Code Here

      gbc = new GridBagConstraints(0,1,1,1,0,0,GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL, new Insets(0, 4, 4, 4),0,0);
      add(optUseDefaultFormat, gbc);



      ButtonGroup bg = new ButtonGroup();
      bg.add(optUseDefaultFormat);
      bg.add(optUseLocaleDependendFormat);

      optUseLocaleDependendFormat.setSelected(!useJavaDefaultFormat);
      optUseDefaultFormat.setSelected(useJavaDefaultFormat);
    }
View Full Code Here

TOP

Related Classes of javax.swing.ButtonGroup

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.