Search in sources :

Example 1 with SubPanelUpdatedInterface

use of com.sldeditor.ui.attribute.SubPanelUpdatedInterface 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 2 with SubPanelUpdatedInterface

use of com.sldeditor.ui.attribute.SubPanelUpdatedInterface 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 3 with SubPanelUpdatedInterface

use of com.sldeditor.ui.attribute.SubPanelUpdatedInterface 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)

Example 4 with SubPanelUpdatedInterface

use of com.sldeditor.ui.attribute.SubPanelUpdatedInterface in project sldeditor by robward-scisys.

the class FilterSubPanel method createUI.

/**
 * Creates the ui.
 */
private void createUI() {
    setLayout(new BorderLayout());
    box = Box.createVerticalBox();
    add(box, BorderLayout.CENTER);
    // 
    // Filter panel
    // 
    panelFilter = new JPanel(new FlowLayout());
    lblFilter = new JLabel(Localisation.getString(ExpressionPanelv2.class, "ExpressionPanelv2.filter"));
    panelFilter.add(lblFilter);
    filterPanel = new FilterField(new SubPanelUpdatedInterface() {

        @Override
        public void updateSymbol() {
            updateButtonState(true);
        }
    }, FilterManager.getInstance());
    panelFilter.add(filterPanel);
    box.add(panelFilter);
    box.add(createAddRemoveFilterPanel());
    box.add(createApplyRevertPanel());
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) SubPanelUpdatedInterface(com.sldeditor.ui.attribute.SubPanelUpdatedInterface) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) FilterField(com.sldeditor.filter.v2.function.FilterField)

Example 5 with SubPanelUpdatedInterface

use of com.sldeditor.ui.attribute.SubPanelUpdatedInterface 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

SubPanelUpdatedInterface (com.sldeditor.ui.attribute.SubPanelUpdatedInterface)7 BorderLayout (java.awt.BorderLayout)4 FlowLayout (java.awt.FlowLayout)4 JPanel (javax.swing.JPanel)4 DataSourceAttributePanel (com.sldeditor.ui.attribute.DataSourceAttributePanel)3 JRadioButton (javax.swing.JRadioButton)3 EnvironmentVariableField (com.sldeditor.filter.v2.envvar.EnvironmentVariableField)2 FilterField (com.sldeditor.filter.v2.function.FilterField)1 FunctionField (com.sldeditor.filter.v2.function.FunctionField)1 JLabel (javax.swing.JLabel)1