Search in sources :

Example 1 with VariableValuesTableContainer

use of com.centurylink.mdw.plugin.variables.VariableValuesTableContainer in project mdw-designer by CenturyLinkCloud.

the class ProcessVariablesTab method createProcessVariablesSection.

private void createProcessVariablesSection(Composite parent) {
    tableContainer = new VariableValuesTableContainer();
    tableContainer.getColumnSpecs().get(0).label = "Input Variable";
    tableContainer.create(parent);
    tableContainer.addDirtyStateListener(this);
}
Also used : VariableValuesTableContainer(com.centurylink.mdw.plugin.variables.VariableValuesTableContainer)

Example 2 with VariableValuesTableContainer

use of com.centurylink.mdw.plugin.variables.VariableValuesTableContainer in project mdw-designer by CenturyLinkCloud.

the class ProcessInstanceFilterDialog method createVariablesTabItem.

private TabItem createVariablesTabItem(TabFolder tabFolder) {
    TabItem variablesTabItem = new TabItem(tabFolder, SWT.NULL);
    variablesTabItem.setText("Variables");
    Composite composite = new Composite(tabFolder, SWT.NONE);
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    // variables table
    tableContainer = new VariableValuesTableContainer();
    tableContainer.create(composite);
    tableContainer.addDirtyStateListener(new DirtyStateListener() {

        public void dirtyStateChanged(boolean dirty) {
            filter.getVariableValues().clear();
            if (variableValues != null) {
                for (VariableValue variableValue : variableValues) filter.getVariableValues().put(variableValue.getName(), variableValue.getValue());
            }
        }
    });
    variablesTabItem.setControl(composite);
    variableValues = new ArrayList<>();
    tableContainer.setInput(variableValues);
    return variablesTabItem;
}
Also used : TabItem(org.eclipse.swt.widgets.TabItem) GridLayout(org.eclipse.swt.layout.GridLayout) DirtyStateListener(com.centurylink.mdw.plugin.designer.DirtyStateListener) Composite(org.eclipse.swt.widgets.Composite) VariableValue(com.centurylink.mdw.plugin.designer.model.VariableValue) GridData(org.eclipse.swt.layout.GridData) VariableValuesTableContainer(com.centurylink.mdw.plugin.variables.VariableValuesTableContainer)

Aggregations

VariableValuesTableContainer (com.centurylink.mdw.plugin.variables.VariableValuesTableContainer)2 DirtyStateListener (com.centurylink.mdw.plugin.designer.DirtyStateListener)1 VariableValue (com.centurylink.mdw.plugin.designer.model.VariableValue)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 TabItem (org.eclipse.swt.widgets.TabItem)1