Package javax.swing

Examples of javax.swing.JRadioButton


        bGateDelete = resources.getButton("deleteGateButton", this);

        // Gate position

        ButtonGroup position = new ButtonGroup();
        onLeftSide = new JRadioButton(resources.getString("left"), true);
        onRightSide = new JRadioButton(resources.getString("right"), false);
        onTop = new JRadioButton(resources.getString("top"), false);
        onBottom = new JRadioButton(resources.getString("bottom"), false);
       
        position.add(onLeftSide);
        position.add(onRightSide);
        position.add(onTop);
        position.add(onBottom);
View Full Code Here


        JLabel interpolationOrder= new JLabel(resources.getString("interpolationOrder"));
        interpolationOrder.setFont(new Font("Dialog", Font.PLAIN,12));
        add(interpolationOrder, gbc);
        gbc.gridy++;

        interpolationOrder0 = new JRadioButton(resources.getString("interpolationOrder0"));
        interpolationOrder1 = new JRadioButton(resources.getString("interpolationOrder1"));
        interpolationOrder0.setSelected(true);//by default
        ButtonGroup bg = new ButtonGroup();
        bg.add(interpolationOrder0);
        bg.add(interpolationOrder1);

       
        interpolationOrder0.addActionListener(this);
        interpolationOrder1.addActionListener(this);
       
        add(interpolationOrder0, gbc);
        gbc.gridy++;

        add(interpolationOrder1, gbc);
        gbc.gridy++;

        add(Box.createVerticalStrut(20), gbc);
        gbc.gridy++;


        // time relative / absolute

        JLabel timeRefFormat= new JLabel(resources.getString("collectionRefTime"));
        timeRefFormat.setFont(new Font("Dialog", Font.PLAIN,12));
        add(timeRefFormat, gbc);
        gbc.gridy++;

        timeRefIsRelative = new JRadioButton(resources.getString("relative"));
        timeRefIsAbsolute = new JRadioButton(resources.getString("absolute"));
        timeRefIsRelative.setSelected(true);//by default
        ButtonGroup bg2 = new ButtonGroup();
        bg2.add(timeRefIsRelative);
        bg2.add(timeRefIsAbsolute);
View Full Code Here

     enable_udp_checkbox = new JCheckBox();
     download_capacity_label = new JLabel();
     upload_capacity_label = new JLabel();
     download_capacity_text_field = new IntegerTextField();
     upload_capacity_text_field = new IntegerTextField();
     capacity_k_bit_s_radiobox = new JRadioButton();
     capacity_k_byte_s_radiobox = new JRadioButton();
     ok_button = new JButton();
     cancel_button = new JButton();
     apply_button = new JButton();
     button_group = new ButtonGroup();
    
View Full Code Here

        public PlotGridShapesTemplatePanel(){
            super();

            dstree = FilteredSourceTree.getFromPool("PlotGridShapesTemplatePanel");
           
            rPlot = new JRadioButton(resources.getString("plot"), false);
            rTimePlot = new JRadioButton(resources.getString("timePlot"), false);
            ButtonGroup bg = new ButtonGroup();
            bg.add(rPlot);
            bg.add(rTimePlot);
            rTimePlot.setSelected(isTimePlot);
            rPlot.setSelected(!isTimePlot);
View Full Code Here

    eclipse_logo_label.setIcon(ImgRep.getIcon("wizard/eclipse_logo.jpg"));
    eclipse_logo_label.setOpaque(true);
    eclipse_logo_label.setBackground(Color.WHITE);
    swt_panel.add(eclipse_logo_label, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    eclipse_logo_label.setName("eclipse_logo_label");
    swt_radio_button = new JRadioButton("SWT");
    swt_radio_button.setSelected(true);
    swt_radio_button.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent event) {
                 swt_panel.setBackground(Color.GRAY);
                 swing_panel.setBackground(new Color(238, 238, 238));                
                 swt_radio_button.setBackground(Color.GRAY);
                 swing_radio_button.setBackground(new Color(238, 238, 238));
                 swt_text_area.setBackground(Color.GRAY);
                 swt_text_area.setForeground(Color.WHITE);
                
                 swing_text_area.setBackground(new Color(238, 238, 238));
                 swing_text_area.setForeground(Color.BLACK);
               }
            });
    swt_panel.add(swt_radio_button, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    swt_radio_button.setName("swt_radio_button");
    swt_text_area = new JTextArea();
    swt_text_area.setBackground(swt_panel.getBackground());
    swt_text_area.setEditable(false);
    swt_text_area.setText("Standard Widget Toolkit - is a native\nplatform independent user interface\nframework\nMore info on http://eclipse.org/swt");
    swt_panel.add(swt_text_area, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    swing_panel = new JPanel();
      GridBagLayout swing_panel_layout = new GridBagLayout();
    swing_panel_layout.columnWidths = new int[] {16, 121, 96, 7};
    swing_panel_layout.rowHeights = new int[] {7};
    swing_panel_layout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.1};
    swing_panel_layout.rowWeights = new double[] {0.1};
    this.add(swing_panel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(20, 0, 20, 10), 0, 0));
    swing_panel.setLayout(swing_panel_layout);
    swing_logo_label = new JLabel();
    swing_logo_label.setIcon(ImgRep.getIcon("wizard/java_logo.jpg"));
    swing_logo_label.setOpaque(true);
    swing_logo_label.setBackground(Color.WHITE);
    swing_panel.add(swing_logo_label, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    swing_logo_label.setName("swing_logo_label");
    swing_radio_button = new JRadioButton("SWING");
    swing_radio_button.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent event) {
                 swt_panel.setBackground(new Color(238, 238, 238));
                 swing_panel.setBackground(Color.GRAY);
                
View Full Code Here

    try{
      iname=getString(name+"Text");
    }
    catch(MissingResourceException mre){
    }
    JRadioButton res;
    if (iname==null) {
        res = new JRadioButton();
    } else {
        res = new JRadioButton(iname);
    }
   
    String tip=null;
    try{
      tip=getString(name+"Tip");
    }
    catch(MissingResourceException mre){
    }
    if (tip != null) {
      res.setToolTipText(tip);
    }
    if(listener!=null){
      res.addActionListener(listener);
    }
    return res;
  }
View Full Code Here

            box.add(Box.createHorizontalGlue());
            box.add(nfParam2 = new NumberField(1.0));
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbStatic = new JRadioButton(resources.getString("static"),true));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbDynamic = new JRadioButton(resources.getString("dynamic"),false));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            ButtonGroup bg = new ButtonGroup();
            bg.add(rbStatic);
View Full Code Here

          }
        });
        options.add(box);

        box = Box.createHorizontalBox();
        box.add(rbUseSource = new JRadioButton(resources.getString("UseDataSourceValueAs")));
        box.add(Box.createHorizontalGlue());
        box.add(cbxformat = new JComboBox());
        cbxformat.addItem(resources.getString("String"));
        cbxformat.addItem(resources.getString("Decimal"));
        cbxformat.addItem(resources.getString("Scientific"));
        cbxformat.addItem(resources.getString("Hexadecimal"));
        cbxformat.addItem(resources.getString("Octal"));
        cbxformat.addItem(resources.getString("Binary"));
        cbxformat.setEditable(false);
        options.add(box);
       
        ButtonGroup bg = new ButtonGroup();
        bg.add(rbFixedText);
        bg.add(rbUseSource);

        box = Box.createHorizontalBox();
        box.add(lformatdigits = new JLabel(resources.getString("DecimalDigits")));
        box.add(Box.createHorizontalGlue());
        box.add(nfformat = new NumberField(3,3));
        nfformat.setColumns(3);
        nfformat.setHorizontalAlignment(JTextField.RIGHT);

        cbxformat.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            currentAction.option = new Object[] { new Integer(cbxformat.getSelectedIndex()) };
            setActionProperties();
          }
        });

        options.add(box);

        JPanel textOptions = new JPanel(new BorderLayout());
        textOptions.add(options, BorderLayout.NORTH);
        optionPanel.add(textOptions, "text");
       
        // ---------- Move options -----------

        options = Box.createVerticalBox();
        options.add(Box.createVerticalGlue());

        Box descPanel = Box.createHorizontalBox();
        descPanel.add(new JLabel(resources.getString("WhenReachingAnArrayEdge")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        descPanel = Box.createHorizontalBox();
        descPanel.add(rbDoNothing = new JRadioButton(resources.getString("DoNothing")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);
       
        descPanel = Box.createHorizontalBox();
        descPanel.add(rbWrap = new JRadioButton(resources.getString("WrapToOtherSide")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        descPanel = Box.createHorizontalBox();
        descPanel.add(rbExtend = new JRadioButton(resources.getString("ExtendArray")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        options.add(Box.createVerticalGlue());
View Full Code Here

        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);
View Full Code Here

        lstatic = new JLabel();
        if (currentFile != null) {
            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) {
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.