Search in sources :

Example 26 with PropertyEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.

the class WorkflowAssetAttributesSection method setSelection.

public void setSelection(WorkflowElement selection) {
    if (workflowAsset != null)
        workflowAsset.removeElementChangeListener(this);
    workflowAsset = (WorkflowAsset) selection;
    workflowAsset.addElementChangeListener(this);
    if (propertyEditors != null) {
        for (PropertyEditor propertyEditor : propertyEditors) propertyEditor.dispose();
    }
    if (warningLabel != null)
        warningLabel.dispose();
    if (savePropertyEditor != null)
        savePropertyEditor.dispose();
    if (workflowAsset.getCustomAttribute().getDefinition() == null) {
        warningLabel = new Label(composite, SWT.NONE);
        warningLabel.setText("Please define the custom attributes.");
    } else {
        propertyEditors = new PropertyEditorList(workflowAsset, workflowAsset.getCustomAttribute().getDefinition());
        for (PropertyEditor propertyEditor : propertyEditors) {
            propertyEditor.render(composite);
            propertyEditor.setValue(workflowAsset);
        }
        // save button
        savePropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_BUTTON);
        savePropertyEditor.setLabel("Save");
        savePropertyEditor.setComment("Save Attributes:");
        savePropertyEditor.setWidth(65);
        savePropertyEditor.addValueChangeListener(new ValueChangeListener() {

            public void propertyValueChanged(Object newValue) {
                saveAttributes();
            }
        });
        savePropertyEditor.render(composite);
        savePropertyEditor.setElement(workflowAsset);
    }
    composite.layout(true);
}
Also used : PropertyEditorList(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList) ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) Label(org.eclipse.swt.widgets.Label) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 27 with PropertyEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor 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 28 with PropertyEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.

the class ProcessInstanceSection method drawWidgets.

@Override
public void drawWidgets(Composite composite, WorkflowElement selection) {
    process = (WorkflowProcess) selection;
    // id text field
    idPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    idPropertyEditor.setLabel("Instance ID");
    idPropertyEditor.setWidth(150);
    idPropertyEditor.setReadOnly(true);
    idPropertyEditor.render(composite);
    // master request id text field
    masterRequestIdPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    masterRequestIdPropertyEditor.setLabel("Master Req. ID");
    masterRequestIdPropertyEditor.setWidth(150);
    masterRequestIdPropertyEditor.setReadOnly(true);
    masterRequestIdPropertyEditor.render(composite);
    // status text field
    statusPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    statusPropertyEditor.setLabel("Status");
    statusPropertyEditor.setWidth(150);
    statusPropertyEditor.setReadOnly(true);
    statusPropertyEditor.render(composite);
    // owner text field
    ownerPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    ownerPropertyEditor.setLabel("Owner");
    ownerPropertyEditor.setWidth(150);
    ownerPropertyEditor.setReadOnly(true);
    ownerPropertyEditor.render(composite);
    // owner id text field
    ownerIdPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    ownerIdPropertyEditor.setLabel("Owner ID");
    ownerIdPropertyEditor.setWidth(150);
    ownerIdPropertyEditor.setReadOnly(true);
    ownerIdPropertyEditor.render(composite);
    // start date text field
    startDatePropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    startDatePropertyEditor.setLabel("Start");
    startDatePropertyEditor.setWidth(200);
    startDatePropertyEditor.setReadOnly(true);
    startDatePropertyEditor.render(composite);
    // end date text field
    endDatePropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    endDatePropertyEditor.setLabel("Finish");
    endDatePropertyEditor.setWidth(200);
    endDatePropertyEditor.setReadOnly(true);
    endDatePropertyEditor.render(composite);
    // label text field
    processLabelPropertyEditor = new PropertyEditor(process, PropertyEditor.TYPE_TEXT);
    processLabelPropertyEditor.setLabel("Label: ");
    processLabelPropertyEditor.setWidth(500);
    processLabelPropertyEditor.setReadOnly(true);
    processLabelPropertyEditor.render(composite);
}
Also used : PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 29 with PropertyEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor 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 30 with PropertyEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.

the class ProjectMonitoringSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    project = (WorkflowProject) selection;
    // launch visualvm link
    visualVmLaunchEditor = new PropertyEditor(project, PropertyEditor.TYPE_LINK);
    visualVmLaunchEditor.setLabel("Java VisualVM");
    visualVmLaunchEditor.setHeight(20);
    visualVmLaunchEditor.setFont(new FontData("Tahoma", 8, SWT.BOLD));
    visualVmLaunchEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            launchVisualVm();
        }
    });
    visualVmLaunchEditor.render(composite);
    visualVmLaunchEditor.getLabelWidget().setText("Monitoring Tools:");
    // launch jconsole link
    jConsoleLaunchEditor = new PropertyEditor(project, PropertyEditor.TYPE_LINK);
    jConsoleLaunchEditor.setLabel(" <A>JConsole</A>  (for older VMs)");
    jConsoleLaunchEditor.setHeight(20);
    jConsoleLaunchEditor.setFont(new FontData("Tahoma", 8, SWT.BOLD));
    jConsoleLaunchEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            launchJConsole();
        }
    });
    jConsoleLaunchEditor.render(composite);
    // launch filepanel link
    filePanelLaunchEditor = new PropertyEditor(project, PropertyEditor.TYPE_LINK);
    filePanelLaunchEditor.setLabel("FilePanel");
    filePanelLaunchEditor.setHeight(20);
    filePanelLaunchEditor.setFont(new FontData("Tahoma", 8, SWT.BOLD));
    filePanelLaunchEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            launchFilePanel();
        }
    });
    filePanelLaunchEditor.render(composite);
    // jmx port text field
    jmxPortEditor = new PropertyEditor(project, PropertyEditor.TYPE_TEXT);
    jmxPortEditor.setLabel("Remote JMX Port");
    jmxPortEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            project.setPersistentProperty(WorkflowProject.MDW_REMOTE_JMX_PORT, newValue == null ? null : newValue.toString());
        }
    });
    jmxPortEditor.render(composite);
    // visual vm id text field
    visualVmIdEditor = new PropertyEditor(project, PropertyEditor.TYPE_TEXT);
    visualVmIdEditor.setLabel("VisualVM ID");
    visualVmIdEditor.setComment("(Should match server \"-Dvisualvm.id\" VM argument)");
    visualVmIdEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            project.setPersistentProperty(WorkflowProject.MDW_VISUALVM_ID, newValue == null ? null : newValue.toString());
        }
    });
    visualVmIdEditor.render(composite);
}
Also used : ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) FontData(org.eclipse.swt.graphics.FontData) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Aggregations

PropertyEditor (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)51 ValueChangeListener (com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener)36 PropertyEditorList (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList)11 Activity (com.centurylink.mdw.plugin.designer.model.Activity)7 ArrayList (java.util.ArrayList)6 Label (org.eclipse.swt.widgets.Label)6 ArtifactEditor (com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor)5 TableEditor (com.centurylink.mdw.plugin.designer.properties.editor.TableEditor)5 DateConverter (com.centurylink.mdw.plugin.designer.properties.convert.DateConverter)4 WorkflowAssetEditor (com.centurylink.mdw.plugin.designer.properties.editor.WorkflowAssetEditor)4 CustomAttributeVO (com.centurylink.mdw.model.value.attribute.CustomAttributeVO)3 FontData (org.eclipse.swt.graphics.FontData)3 TimeInterval (com.centurylink.mdw.plugin.designer.properties.editor.TimeInterval)2 GridData (org.eclipse.swt.layout.GridData)2 Button (org.eclipse.swt.widgets.Button)2 Composite (org.eclipse.swt.widgets.Composite)2 MarkdownRenderer (com.centurylink.mdw.designer.utils.MarkdownRenderer)1 ActivityImplementorVO (com.centurylink.mdw.model.value.activity.ActivityImplementorVO)1 BamMessageDefinition (com.centurylink.mdw.model.value.event.BamMessageDefinition)1 VariableVO (com.centurylink.mdw.model.value.variable.VariableVO)1