Search in sources :

Example 81 with JRadioButton

use of javax.swing.JRadioButton in project abstools by abstools.

the class SmallStringSelectionConfigurator method _actionPerformed.

protected void _actionPerformed(ActionEvent e) {
    JRadioButton button = (JRadioButton) e.getSource();
    applyValue(button.getText());
}
Also used : JRadioButton(javax.swing.JRadioButton)

Example 82 with JRadioButton

use of javax.swing.JRadioButton in project Course_Generator by patrovite.

the class FrmSelectMap method initComponents.

private void initComponents() {
    int line = 0;
    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(bundle.getString("FrmSelectMap.title"));
    setAlwaysOnTop(true);
    setResizable(false);
    setType(java.awt.Window.Type.UTILITY);
    // -- Layout
    // ------------------------------------------------------------
    Container paneGlobal = getContentPane();
    paneGlobal.setLayout(new GridBagLayout());
    // == Panel start
    panelMain = new JPanel();
    panelMain.setLayout(new GridBagLayout());
    Utils.addComponent(paneGlobal, panelMain, 0, 0, 1, 1, 1, 1, 10, 10, 10, 10, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.BOTH);
    rbOpenStreetMap = new JRadioButton(bundle.getString("FrmSelectMap.rbOpenStreetMap.Text"));
    Utils.addComponent(panelMain, rbOpenStreetMap, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL);
    rbOpenTopoMap = new JRadioButton(bundle.getString("FrmSelectMap.rbOpenTopoMap.Text"));
    Utils.addComponent(panelMain, rbOpenTopoMap, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL);
    rbBingAerialMap = new JRadioButton(bundle.getString("FrmSelectMap.rbBingAerialMap.Text"));
    Utils.addComponent(panelMain, rbBingAerialMap, 0, 2, 1, 1, 1, 1, 0, 0, 0, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL);
    groupMap = new ButtonGroup();
    groupMap.add(rbOpenStreetMap);
    groupMap.add(rbOpenTopoMap);
    groupMap.add(rbBingAerialMap);
    // == BUTTONS
    // ===========================================================
    jPanelButtons = new javax.swing.JPanel();
    jPanelButtons.setLayout(new FlowLayout());
    Utils.addComponent(paneGlobal, jPanelButtons, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL);
    btCancel = new javax.swing.JButton();
    btCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/cancel.png")));
    btCancel.setText(bundle.getString("Global.btCancel.text"));
    btCancel.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            setVisible(false);
        }
    });
    btOk = new javax.swing.JButton();
    btOk.setIcon(new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/valid.png")));
    btOk.setText(bundle.getString("Global.btOk.text"));
    btOk.setMinimumSize(btCancel.getMinimumSize());
    btOk.setPreferredSize(btCancel.getPreferredSize());
    btOk.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            RequestToClose();
        }
    });
    // -- Add buttons
    jPanelButtons.add(btOk);
    jPanelButtons.add(btCancel);
    // --
    pack();
    setLocationRelativeTo(null);
}
Also used : JPanel(javax.swing.JPanel) JRadioButton(javax.swing.JRadioButton) FlowLayout(java.awt.FlowLayout) JButton(javax.swing.JButton) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) Container(java.awt.Container) ButtonGroup(javax.swing.ButtonGroup) JPanel(javax.swing.JPanel)

Example 83 with JRadioButton

use of javax.swing.JRadioButton in project sldeditor by robward-scisys.

the class ExpressionSubPanel method setUpFunctionPanel.

/**
 * Sets the up function panel.
 */
protected void setUpFunctionPanel() {
    panelFunction = new JPanel();
    FlowLayout fl_panelFunction = (FlowLayout) panelFunction.getLayout();
    fl_panelFunction.setAlignment(FlowLayout.LEFT);
    rdbtnFunction = new JRadioButton(Localisation.getString(ExpressionPanelv2.class, "ExpressionPanelv2.function"));
    rdbtnFunction.setActionCommand(FUNCTION);
    buttonGroup.add(rdbtnFunction);
    panelFunction.add(rdbtnFunction);
    functionPanel = new FunctionField(new SubPanelUpdatedInterface() {

        @Override
        public void updateSymbol() {
            buttonGroup.setSelected(rdbtnFunction.getModel(), true);
            updateButtonState(true);
        }
    }, FunctionManager.getInstance());
    panelFunction.add(functionPanel);
    box.add(panelFunction);
}
Also used : FunctionField(com.sldeditor.filter.v2.function.FunctionField) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JRadioButton(javax.swing.JRadioButton) SubPanelUpdatedInterface(com.sldeditor.ui.attribute.SubPanelUpdatedInterface)

Example 84 with JRadioButton

use of javax.swing.JRadioButton in project sldeditor by robward-scisys.

the class ExpressionSubPanel method setUpEnvVarPanel.

/**
 * Sets the up env var panel.
 */
protected void setUpEnvVarPanel() {
    if (VendorOptionManager.getInstance().isAllowed(this.parent.getVendorOptionList(), EnvironmentVariableField.getVendorOption())) {
        panelEnvVar = new JPanel();
        FlowLayout fl_panelEnvVar = (FlowLayout) panelEnvVar.getLayout();
        fl_panelEnvVar.setAlignment(FlowLayout.LEFT);
        rdbtnEnvVar = new JRadioButton(ENVVAR);
        rdbtnEnvVar.setActionCommand(ENVVAR);
        buttonGroup.add(rdbtnEnvVar);
        panelEnvVar.add(rdbtnEnvVar);
        envVarField = new EnvironmentVariableField(new SubPanelUpdatedInterface() {

            @Override
            public void updateSymbol() {
                buttonGroup.setSelected(rdbtnEnvVar.getModel(), true);
                updateButtonState(true);
            }
        }, EnvironmentVariableManager.getInstance());
        panelEnvVar.add(envVarField);
        box.add(panelEnvVar);
    }
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JRadioButton(javax.swing.JRadioButton) SubPanelUpdatedInterface(com.sldeditor.ui.attribute.SubPanelUpdatedInterface) EnvironmentVariableField(com.sldeditor.filter.v2.envvar.EnvironmentVariableField)

Example 85 with JRadioButton

use of javax.swing.JRadioButton in project sldeditor by robward-scisys.

the class ExpressionSubPanel method setUpPropertyPanel.

/**
 * Sets the up property panel.
 */
protected void setUpPropertyPanel() {
    panelAttribute = new JPanel();
    FlowLayout fl_panelAttribute = (FlowLayout) panelAttribute.getLayout();
    fl_panelAttribute.setAlignment(FlowLayout.LEFT);
    rdbtnAttribute = new JRadioButton(Localisation.getString(ExpressionPanelv2.class, "ExpressionPanelv2.attribute"));
    rdbtnAttribute.setActionCommand(ATTRIBUTE);
    buttonGroup.add(rdbtnAttribute);
    panelAttribute.add(rdbtnAttribute);
    dataSourceAttributePanel = new DataSourceAttributePanel(new SubPanelUpdatedInterface() {

        @Override
        public void updateSymbol() {
            buttonGroup.setSelected(rdbtnAttribute.getModel(), true);
            updateButtonState(true);
        }
    });
    panelAttribute.add(dataSourceAttributePanel);
    box.add(panelAttribute);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JRadioButton(javax.swing.JRadioButton) SubPanelUpdatedInterface(com.sldeditor.ui.attribute.SubPanelUpdatedInterface) DataSourceAttributePanel(com.sldeditor.ui.attribute.DataSourceAttributePanel)

Aggregations

JRadioButton (javax.swing.JRadioButton)323 ButtonGroup (javax.swing.ButtonGroup)185 JPanel (javax.swing.JPanel)168 JLabel (javax.swing.JLabel)144 ActionEvent (java.awt.event.ActionEvent)104 ActionListener (java.awt.event.ActionListener)95 JTextField (javax.swing.JTextField)81 JButton (javax.swing.JButton)77 BoxLayout (javax.swing.BoxLayout)61 JCheckBox (javax.swing.JCheckBox)59 GridBagLayout (java.awt.GridBagLayout)57 BorderLayout (java.awt.BorderLayout)52 GridBagConstraints (java.awt.GridBagConstraints)52 Insets (java.awt.Insets)51 Dimension (java.awt.Dimension)45 FlowLayout (java.awt.FlowLayout)42 JScrollPane (javax.swing.JScrollPane)41 GridLayout (java.awt.GridLayout)32 JComboBox (javax.swing.JComboBox)32 ItemEvent (java.awt.event.ItemEvent)25