use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class TaskTemplateSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
taskTemplate = (TaskTemplate) selection;
// id text field
idEditor = new PropertyEditor(taskTemplate, PropertyEditor.TYPE_TEXT);
idEditor.setLabel("ID");
idEditor.setWidth(150);
idEditor.setReadOnly(true);
idEditor.render(composite);
// name text field
nameEditor = new PropertyEditor(taskTemplate, PropertyEditor.TYPE_TEXT);
nameEditor.setLabel("Name");
nameEditor.setWidth(300);
nameEditor.setReadOnly(true);
nameEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class ActivityImplDesignSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
activityImpl = (ActivityImpl) selection;
// base class combo
baseClassPropertyEditor = new PropertyEditor(activityImpl, PropertyEditor.TYPE_COMBO);
baseClassPropertyEditor.setLabel("Category");
baseClassPropertyEditor.setReadOnly(true);
baseClassPropertyEditor.setWidth(475);
List<String> implementorBaseClasses = new ArrayList<String>();
if (!activityImpl.getProject().checkRequiredVersion(5, 5)) {
implementorBaseClasses = Arrays.asList(ActivityImpl.getOldBaseClasses());
} else {
for (Class<?> baseClass : ActivityImpl.getBaseClasses()) implementorBaseClasses.add(baseClass.getName());
}
baseClassPropertyEditor.setValueOptions(implementorBaseClasses);
baseClassPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activityImpl.setBaseClassName((String) newValue);
}
});
baseClassPropertyEditor.render(composite);
// attr description text area
attrDescriptionPropertyEditor = new PropertyEditor(activityImpl, PropertyEditor.TYPE_TEXT);
attrDescriptionPropertyEditor.setLabel("Pagelet");
attrDescriptionPropertyEditor.setMultiLine(true);
attrDescriptionPropertyEditor.setWidth(475);
attrDescriptionPropertyEditor.setHeight(150);
attrDescriptionPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activityImpl.setAttrDescriptionXml((String) newValue);
}
});
attrDescriptionPropertyEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class AssetDrivenActivityCustomSection method select.
@Override
public boolean select(Object toTest) {
if (toTest == null || !(toTest instanceof Activity))
return false;
Activity testActivity = (Activity) toTest;
if (// manual tasks have asset-driven widgets
testActivity.isManualTask())
// but no custom section
return false;
if (// so do subprocess launch activities
testActivity.isSubProcessInvoke())
return false;
if (testActivity.isForProcessInstance())
return false;
PropertyEditorList propEditorList = new PropertyEditorList((Activity) toTest);
for (PropertyEditor propertyEditor : propEditorList) {
// return true if any widgets are considered asset-driven
if (propertyEditor instanceof WorkflowAssetEditor)
return true;
}
return false;
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class AssetDrivenActivityCustomSection method clear.
private void clear() {
activity.removeAttribute("CustomAttributes");
for (PropertyEditor propertyEditor : propertyEditors) {
propertyEditor.setValue((String) null);
}
activity.fireDirtyStateChanged(true);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor in project mdw-designer by CenturyLinkCloud.
the class BamMonitoringSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
element = (WorkflowElement) selection;
// trigger dropdown
triggerPropertyEditor = new PropertyEditor(element, PropertyEditor.TYPE_COMBO);
triggerPropertyEditor.setLabel("BAM Trigger");
triggerPropertyEditor.setWidth(100);
triggerPropertyEditor.setReadOnly(true);
ArrayList<String> triggerOpts = new ArrayList<String>();
triggerOpts.add("Start");
triggerOpts.add("Finish");
triggerPropertyEditor.setValueOptions(triggerOpts);
triggerPropertyEditor.setFireDirtyStateChange(false);
triggerPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
if (newValue.equals("Start"))
selectedTrigger = WorkAttributeConstant.BAM_START_MSGDEF;
else if (newValue.equals("Finish"))
selectedTrigger = WorkAttributeConstant.BAM_FINISH_MSGDEF;
if (bamEventDefs.get(selectedTrigger) == null) {
bamEventDefs.put(selectedTrigger, getValue(selectedTrigger));
}
bamMessagePropertyEditor.setValue(bamEventDefs.get(selectedTrigger));
// otherwise
bamMessagePropertyEditor.setEditable(isEditable());
// reverts
// Add/Delete
// buttons
// to
// enabled
}
});
triggerPropertyEditor.render(composite);
separatorPropertyEditor = new PropertyEditor(element, PropertyEditor.TYPE_SEPARATOR);
separatorPropertyEditor.setWidth(500);
separatorPropertyEditor.render(composite);
// bam message def
bamMessagePropertyEditor = new PropertyEditor(element, PropertyEditor.TYPE_BAM_MESSAGE);
bamMessagePropertyEditor.setLabel("BAM Message");
bamMessagePropertyEditor.setWidth(500);
bamMessagePropertyEditor.setFireDirtyStateChange(false);
bamMessagePropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
BamMessageDefinition bamMessageDef = (BamMessageDefinition) newValue;
bamEventDefs.put(selectedTrigger, bamMessageDef);
element.setAttribute(selectedTrigger, valueConverter.toPropertyValue(bamMessageDef));
setDirty(true);
}
});
bamMessagePropertyEditor.render(composite);
createSaveButton();
// help link
// spacer
new Label(composite, SWT.NONE);
helpPropertyEditor = new PropertyEditor(element, PropertyEditor.TYPE_LINK);
helpPropertyEditor.setLabel("BAM Monitoring Help");
helpPropertyEditor.render(composite);
helpPropertyEditor.setValue("/MDWHub/doc/bam.html");
}
Aggregations