use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList in project mdw-designer by CenturyLinkCloud.
the class TaskVariablesSection method select.
@Override
public boolean select(Object toTest) {
if (toTest == null || !(toTest instanceof Activity))
return false;
Activity activity = (Activity) toTest;
if (!activity.isManualTask())
return false;
if (activity.isForProcessInstance())
return false;
PropertyEditorList propEditorList = new PropertyEditorList(activity);
for (PropertyEditor propertyEditor : propEditorList) {
// return true if any widgets specify Variables section
if (PropertyEditor.SECTION_VARIABLES.equals(propertyEditor.getSection()))
return true;
}
return false;
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList in project mdw-designer by CenturyLinkCloud.
the class DesignSection method setSelection.
@Override
public void setSelection(WorkflowElement selection) {
activity = (Activity) selection;
if (propertyEditors != null) {
for (PropertyEditor propertyEditor : propertyEditors) {
propertyEditor.dispose();
}
}
if (warningLabel != null) {
warningLabel.dispose();
}
if (activity.getActivityImpl().getAttrDescriptionXml() == null) {
warningLabel = new Label(composite, SWT.NONE);
warningLabel.setText("Please configure this attribute's parameters.");
} else {
propertyEditors = new PropertyEditorList(activity);
for (PropertyEditor propertyEditor : propertyEditors) {
if (selectForSection(propertyEditor)) {
preRender(propertyEditor);
propertyEditor.render(composite);
propertyEditor.setValue(activity);
if (!propertyEditor.getType().equals(PropertyEditor.TYPE_LINK)) {
propertyEditor.setEditable(!(propertyEditor.isReadOnly() || activity.isReadOnly()));
}
}
}
}
composite.layout(true);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList in project mdw-designer by CenturyLinkCloud.
the class ExpressionSection method select.
/**
* For IFilter interface, determine which activities include this section in
* their Design properties tab page.
*/
public boolean select(Object toTest) {
if (toTest == null || !(toTest instanceof Activity))
return false;
activity = (Activity) toTest;
if (activity.isForProcessInstance())
return false;
if (activity.getActivityImpl().getAttrDescriptionXml() == null)
return false;
PropertyEditorList propEditorList = new PropertyEditorList(activity);
for (PropertyEditor propertyEditor : propEditorList) {
if (propertyEditor.getType().equals(PropertyEditor.TYPE_SCRIPT)) {
activity.setScriptLanguages(propertyEditor.getScriptLanguages());
return "EXPRESSION".equals(propertyEditor.getScriptType());
}
}
return false;
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList 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;
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList 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);
}
Aggregations