Search in sources :

Example 1 with JavaEditorValueProvider

use of com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider 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 2 with JavaEditorValueProvider

use of com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider in project mdw-designer by CenturyLinkCloud.

the class JavaSection method setSelection.

public void setSelection(WorkflowElement selection) {
    activity = (Activity) selection;
    artifactEditor.setElement(activity);
    artifactEditor.setValueProvider(new JavaEditorValueProvider(activity));
    artifactEditor.setEditable(!activity.isReadOnly());
    outputDocsPropertyEditor.setElement(activity);
    outputDocsPropertyEditor.setValue(activity.getAttribute("Output Documents"));
    outputDocsPropertyEditor.setEditable(!activity.isReadOnly());
    outputDocsPropertyEditor.setVisible(true);
    helpPropertyEditor.setValue("/MDWHub/doc/dynamicJavaActivity.html");
}
Also used : JavaEditorValueProvider(com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider)

Aggregations

JavaEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider)2 ArtifactEditor (com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor)1 PropertyEditor (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)1 ValueChangeListener (com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener)1