use of com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener 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);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener in project mdw-designer by CenturyLinkCloud.
the class VariableInstancesSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
process = (WorkflowProcess) selection;
tableEditor = new TableEditor(process, TableEditor.TYPE_TABLE);
tableEditor.setReadOnly(true);
tableEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
openDialog((VariableInstanceInfo) newValue);
}
});
if (columnSpecs == null)
columnSpecs = createColumnSpecs();
tableEditor.setColumnSpecs(columnSpecs);
if (contentProvider == null)
contentProvider = new VariableInstanceContentProvider();
tableEditor.setContentProvider(contentProvider);
if (labelProvider == null)
labelProvider = new VariableInstanceLabelProvider();
tableEditor.setLabelProvider(labelProvider);
tableEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener 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);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetLockSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
workflowAsset = (WorkflowAsset) selection;
// lock user read-only text field
lockUserPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_TEXT);
lockUserPropertyEditor.setLabel("Locked By");
lockUserPropertyEditor.setWidth(150);
lockUserPropertyEditor.setReadOnly(true);
lockUserPropertyEditor.render(composite);
// lock date read-only text field
modDatePropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_TEXT);
modDatePropertyEditor.setLabel("Lock Date");
modDatePropertyEditor.setWidth(150);
modDatePropertyEditor.setValueConverter(new DateConverter());
modDatePropertyEditor.setReadOnly(true);
modDatePropertyEditor.render(composite);
// lock button
lockButtonPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_BUTTON);
lockButtonPropertyEditor.setLabel("");
lockButtonPropertyEditor.setWidth(65);
lockButtonPropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
toggleLock();
}
});
lockButtonPropertyEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetVersionsSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
workflowAsset = (WorkflowAsset) selection;
tableEditor = new TableEditor(workflowAsset, TableEditor.TYPE_TABLE);
List<ColumnSpec> columnSpecs = new ArrayList<ColumnSpec>();
ColumnSpec packageColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Package", "package");
packageColSpec.width = 160;
columnSpecs.add(packageColSpec);
ColumnSpec versionColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Version", "version");
versionColSpec.width = 60;
columnSpecs.add(versionColSpec);
ColumnSpec idColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "ID", "id");
idColSpec.width = 65;
columnSpecs.add(idColSpec);
ColumnSpec createDateColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Created", "createDate");
createDateColSpec.width = 110;
columnSpecs.add(createDateColSpec);
ColumnSpec userColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "User", "user");
userColSpec.width = 75;
columnSpecs.add(userColSpec);
ColumnSpec commentsColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Comments", "comments");
commentsColSpec.width = 200;
columnSpecs.add(commentsColSpec);
ColumnSpec lockedToColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Locked To", "lockedTo");
lockedToColSpec.width = 75;
columnSpecs.add(lockedToColSpec);
ColumnSpec modDateColSpec = new ColumnSpec(PropertyEditor.TYPE_TEXT, "Last Modified", "modDate");
modDateColSpec.width = 110;
columnSpecs.add(modDateColSpec);
tableEditor.setColumnSpecs(columnSpecs);
// tableEditor.setFillWidth(true);
tableEditor.setReadOnly(true);
tableEditor.setContentProvider(new AssetVersionContentProvider());
tableEditor.setLabelProvider(new AssetVersionLabelProvider());
tableEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
openAsset((WorkflowAsset) newValue);
}
});
tableEditor.render(composite);
// right-click menu
tableEditor.getTable().addListener(SWT.MenuDetect, new Listener() {
public void handleEvent(Event event) {
tableEditor.getTable().setMenu(createContextMenu(tableEditor.getTable().getShell()));
}
});
}
Aggregations