Search in sources :

Example 21 with PropertyEditor

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

the class PreferencesSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    project = (WorkflowProject) selection;
    createNoticesTable();
    noticesEditor.render(composite, false);
    intervalEditor = new PropertyEditor(selection, PropertyEditor.TYPE_SPINNER);
    intervalEditor.setLabel("Check Interval (mins)");
    intervalEditor.setWidth(50);
    intervalEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            project.setNoticeCheckInterval(Integer.parseInt((String) newValue));
        }
    });
    intervalEditor.render(composite);
    intervalEditor.setMinValue(1);
    intervalEditor.setMaxValue(60);
    intervalEditor.setElement(project);
    intervalEditor.setValue(project.getNoticeCheckInterval());
}
Also used : ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 22 with PropertyEditor

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

the class ProcessesSection method select.

@Override
public boolean select(Object toTest) {
    if (toTest == null || !(toTest instanceof Activity))
        return false;
    Activity activity = (Activity) toTest;
    if (activity.isForProcessInstance())
        return false;
    PropertyEditorList propEditorList = new PropertyEditorList(activity);
    for (PropertyEditor propertyEditor : propEditorList) {
        // return true if any widgets specify PROCESSES section
        if (PropertyEditor.SECTION_PROCESSES.equals(propertyEditor.getSection()))
            return true;
    }
    return false;
}
Also used : PropertyEditorList(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList) Activity(com.centurylink.mdw.plugin.designer.model.Activity) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 23 with PropertyEditor

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

the class JavaSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    activity = (Activity) selection;
    // artifact editor
    artifactEditor = new ArtifactEditor(activity, new JavaEditorValueProvider(activity), null);
    artifactEditor.render(composite);
    // output docs
    outputDocsPropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_PICKLIST);
    outputDocsPropertyEditor.setLabel("Documents:Read-Only~Writable");
    outputDocsPropertyEditor.setValueOptions(activity.getProcess().getDocRefVariableNames());
    outputDocsPropertyEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            activity.setAttribute("Output Documents", (String) newValue);
        }
    });
    outputDocsPropertyEditor.render(composite);
    outputDocsPropertyEditor.setVisible(activity.canWriteOutputDocs());
    // help link
    helpPropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_LINK);
    helpPropertyEditor.setLabel("Dynamic Java Activity Help");
    helpPropertyEditor.render(composite);
}
Also used : ArtifactEditor(com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor) ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) JavaEditorValueProvider(com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 24 with PropertyEditor

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

the class NoteSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    note = (Note) selection;
    // content text area
    contentEditor = new PropertyEditor(note, PropertyEditor.TYPE_TEXT);
    contentEditor.setLabel("Note");
    contentEditor.setWidth(475);
    contentEditor.setHeight(100);
    contentEditor.setMultiLine(true);
    contentEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            note.setText((String) newValue);
            note.adjustSize();
        }
    });
    contentEditor.render(composite);
}
Also used : ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) PropertyEditor(com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)

Example 25 with PropertyEditor

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

the class PackagePermissionsSection method drawWidgets.

public void drawWidgets(Composite composite, WorkflowElement selection) {
    workflowPackage = (WorkflowPackage) selection;
    // user text field
    userEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_TEXT);
    userEditor.setLabel("Current User");
    userEditor.setWidth(150);
    userEditor.setReadOnly(true);
    userEditor.render(composite);
    // edit processes checkbox
    editProcessesEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_CHECKBOX);
    editProcessesEditor.setLabel("Create/Edit Assets");
    editProcessesEditor.setReadOnly(true);
    editProcessesEditor.render(composite);
    // run processes checkbox
    runProcessesEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_CHECKBOX);
    runProcessesEditor.setLabel("Execute Processes");
    runProcessesEditor.setReadOnly(true);
    runProcessesEditor.render(composite);
    // admin checkbox
    adminPermissionsEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_CHECKBOX);
    adminPermissionsEditor.setLabel("Administrator Privileges");
    adminPermissionsEditor.setReadOnly(true);
    adminPermissionsEditor.render(composite);
    // sys admin checkbox
    sysAdminPermissionsEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_CHECKBOX);
    sysAdminPermissionsEditor.setLabel("System Admin Privileges");
    sysAdminPermissionsEditor.setReadOnly(true);
    sysAdminPermissionsEditor.render(composite);
    // MDW Hub link
    mdwHubLinkEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_LINK);
    mdwHubLinkEditor.setLabel("Launch MDW Hub to Change Role Assignments");
    mdwHubLinkEditor.setIndent(-100);
    mdwHubLinkEditor.setWidth(500);
    mdwHubLinkEditor.setHeight(20);
    mdwHubLinkEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            launchMdwHub();
        }
    });
    mdwHubLinkEditor.render(composite);
    // reload button
    reloadButtonEditor = new PropertyEditor(workflowPackage, PropertyEditor.TYPE_BUTTON);
    reloadButtonEditor.setLabel("Reload");
    reloadButtonEditor.setIndent(-100);
    reloadButtonEditor.addValueChangeListener(new ValueChangeListener() {

        public void propertyValueChanged(Object newValue) {
            reloadPermissions();
        }
    });
    reloadButtonEditor.render(composite);
}
Also used : ValueChangeListener(com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener) 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