use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class TestCaseSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
testCase = (AutomatedTestCase) selection;
testNameEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
testNameEditor.setLabel("Test Name");
testNameEditor.setWidth(250);
testNameEditor.render(composite);
testNameEditor.setEditable(false);
commandFileEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
commandFileEditor.setLabel("Command File");
commandFileEditor.setWidth(600);
commandFileEditor.render(composite);
commandFileEditor.setEditable(false);
commandEditEditor = new PropertyEditor(selection, PropertyEditor.TYPE_LINK);
commandEditEditor.setLabel("Edit Command File");
commandEditEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
WorkflowElementActionHandler handler = new WorkflowElementActionHandler();
handler.open(testCase);
}
});
commandEditEditor.render(composite);
statusEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
statusEditor.setLabel("Status");
statusEditor.setWidth(250);
statusEditor.render(composite);
statusEditor.setEditable(false);
startTimeEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
startTimeEditor.setLabel("Start Time");
startTimeEditor.setWidth(110);
startTimeEditor.render(composite);
startTimeEditor.setEditable(false);
endTimeEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
endTimeEditor.setLabel("End Time");
endTimeEditor.setWidth(110);
endTimeEditor.render(composite);
endTimeEditor.setEditable(false);
messageEditor = new PropertyEditor(selection, PropertyEditor.TYPE_TEXT);
messageEditor.setLabel("Message");
commandFileEditor.setWidth(600);
messageEditor.render(composite);
messageEditor.setEditable(false);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor 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.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class EmbeddedSubProcessSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
embeddedSubProcess = (EmbeddedSubProcess) selection;
// id text field
idPropertyEditor = new PropertyEditor(embeddedSubProcess, PropertyEditor.TYPE_TEXT);
idPropertyEditor.setLabel("ID");
idPropertyEditor.setWidth(150);
idPropertyEditor.setReadOnly(true);
idPropertyEditor.render(composite);
// name text field
namePropertyEditor = new PropertyEditor(embeddedSubProcess, PropertyEditor.TYPE_TEXT);
namePropertyEditor.setLabel("Name");
namePropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
embeddedSubProcess.setName((String) newValue);
}
});
namePropertyEditor.render(composite);
// description text area
descriptionPropertyEditor = new PropertyEditor(embeddedSubProcess, PropertyEditor.TYPE_TEXT);
descriptionPropertyEditor.setLabel("Description");
descriptionPropertyEditor.setHeight(100);
descriptionPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
embeddedSubProcess.setDescription((String) newValue);
}
});
descriptionPropertyEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor 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.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class ExpressionSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
activity = (Activity) selection;
// language combo
languagePropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_COMBO);
languagePropertyEditor.setLabel("Language");
languagePropertyEditor.setReadOnly(true);
languagePropertyEditor.setWidth(150);
languagePropertyEditor.setValueOptions(activity.getScriptLanguages());
languagePropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activity.setScriptLanguage((String) newValue);
}
});
languagePropertyEditor.render(composite);
// expression editor
expressionPropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_TEXT);
expressionPropertyEditor.setLabel("Expression");
expressionPropertyEditor.setWidth(400);
expressionPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activity.setAttribute("Expression", (String) newValue);
}
});
expressionPropertyEditor.render(composite);
// help link
helpPropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_LINK);
helpPropertyEditor.setLabel("Expression Activity Help");
helpPropertyEditor.render(composite);
}
Aggregations