Search in sources :

Example 1 with DateConverter

use of com.centurylink.mdw.plugin.designer.properties.convert.DateConverter in project mdw-designer by CenturyLinkCloud.

the class ProcessLockSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    process = (WorkflowProcess) selection;
    // lock user read-only text field
    lockUserPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    lockUserPropertyEditor.setLabel("Locked By");
    lockUserPropertyEditor.setWidth(150);
    lockUserPropertyEditor.setReadOnly(true);
    lockUserPropertyEditor.render(composite);
    // lock date read-only text field
    lockDatePropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    lockDatePropertyEditor.setLabel("Lock Date");
    lockDatePropertyEditor.setWidth(150);
    lockDatePropertyEditor.setValueConverter(new DateConverter());
    lockDatePropertyEditor.setReadOnly(true);
    lockDatePropertyEditor.render(composite);
    // lock button
    lockButtonPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_BUTTON);
    lockButtonPropertyEditor.setLabel("");
    lockButtonPropertyEditor.setWidth(65);
    lockButtonPropertyEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            toggleProcessLock();
        }
    });
    lockButtonPropertyEditor.render(composite);
}
Also used : DateConverter(com.centurylink.mdw.plugin.designer.properties.convert.DateConverter) ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 2 with DateConverter

use of com.centurylink.mdw.plugin.designer.properties.convert.DateConverter in project mdw-designer by CenturyLinkCloud.

the class WorkflowAssetLockSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    workflowAsset = (WorkflowAsset) selection;
    // lock user read-only text field
    lockUserPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_TEXT);
    lockUserPropertyEditor.setLabel("Locked By");
    lockUserPropertyEditor.setWidth(150);
    lockUserPropertyEditor.setReadOnly(true);
    lockUserPropertyEditor.render(composite);
    // lock date read-only text field
    modDatePropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_TEXT);
    modDatePropertyEditor.setLabel("Lock Date");
    modDatePropertyEditor.setWidth(150);
    modDatePropertyEditor.setValueConverter(new DateConverter());
    modDatePropertyEditor.setReadOnly(true);
    modDatePropertyEditor.render(composite);
    // lock button
    lockButtonPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_BUTTON);
    lockButtonPropertyEditor.setLabel("");
    lockButtonPropertyEditor.setWidth(65);
    lockButtonPropertyEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            toggleLock();
        }
    });
    lockButtonPropertyEditor.render(composite);
}
Also used : DateConverter(com.centurylink.mdw.plugin.designer.properties.convert.DateConverter) ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 3 with DateConverter

use of com.centurylink.mdw.plugin.designer.properties.convert.DateConverter in project mdw-designer by CenturyLinkCloud.

the class ProcessSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    process = (WorkflowProcess) selection;
    // id text field
    idPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    idPropertyEditor.setLabel("ID");
    idPropertyEditor.setWidth(150);
    idPropertyEditor.setReadOnly(true);
    idPropertyEditor.render(composite);
    // name text field
    namePropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    namePropertyEditor.setLabel("Name");
    namePropertyEditor.setReadOnly(true);
    namePropertyEditor.render(composite);
    // description text area
    descriptionPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    descriptionPropertyEditor.setLabel("Description");
    descriptionPropertyEditor.setWidth(475);
    descriptionPropertyEditor.setHeight(100);
    descriptionPropertyEditor.setMultiLine(true);
    descriptionPropertyEditor.setTextLimit(1000);
    descriptionPropertyEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            process.setDescription((String) newValue);
        }
    });
    descriptionPropertyEditor.render(composite);
    // create date read-only text field
    createDatePropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    createDatePropertyEditor.setLabel("Created");
    createDatePropertyEditor.setWidth(150);
    createDatePropertyEditor.setValueConverter(new DateConverter());
    createDatePropertyEditor.setReadOnly(true);
    createDatePropertyEditor.render(composite);
    // definition link
    definitionLinkEditor = new PropertyEditor(process, PropertyEditor.TYPE_LINK);
    definitionLinkEditor.setLabel("Definition");
    definitionLinkEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            openDefinition();
        }
    });
    definitionLinkEditor.render(composite);
}
Also used : ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) DateConverter(com.centurylink.mdw.plugin.designer.properties.convert.DateConverter) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 4 with DateConverter

use of com.centurylink.mdw.plugin.designer.properties.convert.DateConverter in project mdw-designer by CenturyLinkCloud.

the class PackageSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    workflowPackage = (WorkflowPackage) selection;
    // id text field
    idPropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
    idPropertyEditor.setLabel("ID");
    idPropertyEditor.setWidth(150);
    idPropertyEditor.setReadOnly(true);
    idPropertyEditor.render(composite);
    // name text field
    namePropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
    namePropertyEditor.setLabel("Name");
    namePropertyEditor.setReadOnly(true);
    namePropertyEditor.render(composite);
    // schema version text field
    schemaVersionPropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
    schemaVersionPropertyEditor.setLabel("Schema Version");
    schemaVersionPropertyEditor.setWidth(150);
    schemaVersionPropertyEditor.setReadOnly(true);
    schemaVersionPropertyEditor.render(composite);
    // last modified text field
    lastModifiedPropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
    lastModifiedPropertyEditor.setLabel("Last Modified");
    lastModifiedPropertyEditor.setWidth(150);
    lastModifiedPropertyEditor.setReadOnly(true);
    lastModifiedPropertyEditor.setValueConverter(new DateConverter());
    lastModifiedPropertyEditor.render(composite);
    if (workflowPackage.getProject().isFilePersist()) {
        // metafile text field
        metaFilePropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
        metaFilePropertyEditor.setLabel("Meta File");
        metaFilePropertyEditor.setWidth(150);
        metaFilePropertyEditor.setReadOnly(true);
        metaFilePropertyEditor.render(composite);
    } else {
        // exported text field
        exportedPropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
        exportedPropertyEditor.setLabel("Exported");
        exportedPropertyEditor.setWidth(100);
        exportedPropertyEditor.setReadOnly(true);
        exportedPropertyEditor.render(composite);
    }
    groupPropertyEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_COMBO);
    groupPropertyEditor.setLabel("Workgroup");
    groupPropertyEditor.setWidth(300);
    groupPropertyEditor.setReadOnly(true);
    List<String> options = new ArrayList<String>();
    options.add("");
    options.addAll(getDesignerDataModel().getWorkgroupNames());
    groupPropertyEditor.setValueOptions(options);
    groupPropertyEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            String group = newValue == null || newValue.toString().length() == 0 ? UserGroupVO.COMMON_GROUP : newValue.toString();
            workflowPackage.setGroup(group);
            dirty = true;
            saveGroupEditor.setEnabled(dirty);
        }
    });
    groupPropertyEditor.render(composite);
    saveGroupEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_BUTTON);
    saveGroupEditor.setLabel("Save");
    saveGroupEditor.setWidth(65);
    saveGroupEditor.setEnabled(dirty);
    saveGroupEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            savePackage();
        }
    });
    saveGroupEditor.render(composite);
}
Also used : DateConverter(com.centurylink.mdw.plugin.designer.properties.convert.DateConverter) ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) ArrayList(java.util.ArrayList) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Aggregations

DateConverter (com.centurylink.mdw.plugin.designer.properties.convert.DateConverter)4 PropertyEditor (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)4 ValueChangeListener (com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener)4 ArrayList (java.util.ArrayList)1