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());
}
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);
}
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);
}
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);
}
}
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);
}
Aggregations