Search in sources :

Example 1 with EnvironmentVariableField

use of com.sldeditor.filter.v2.envvar.EnvironmentVariableField 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 2 with EnvironmentVariableField

use of com.sldeditor.filter.v2.envvar.EnvironmentVariableField in project sldeditor by robward-scisys.

the class EnvVarPanel method createUI.

/**
 * Creates the ui.
 */
private void createUI() {
    setLayout(new BorderLayout());
    envVarField = new EnvironmentVariableField(new SubPanelUpdatedInterface() {

        @Override
        public void updateSymbol() {
            updateButtonState(true);
        }
    }, EnvironmentVariableManager.getInstance());
    add(envVarField, BorderLayout.NORTH);
    add(createApplyRevertPanel(), BorderLayout.CENTER);
}
Also used : SubPanelUpdatedInterface(com.sldeditor.ui.attribute.SubPanelUpdatedInterface) BorderLayout(java.awt.BorderLayout) EnvironmentVariableField(com.sldeditor.filter.v2.envvar.EnvironmentVariableField)

Aggregations

EnvironmentVariableField (com.sldeditor.filter.v2.envvar.EnvironmentVariableField)2 SubPanelUpdatedInterface (com.sldeditor.ui.attribute.SubPanelUpdatedInterface)2 BorderLayout (java.awt.BorderLayout)1 FlowLayout (java.awt.FlowLayout)1 JPanel (javax.swing.JPanel)1 JRadioButton (javax.swing.JRadioButton)1