use of com.centurylink.mdw.plugin.designer.dialogs.AttributeDialog in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetVersionsSection method openViewCommentsDialog.
private void openViewCommentsDialog(WorkflowAsset asset) {
// just use the attribute dialog
String comment = asset.getRevisionComment();
if (comment == null)
comment = asset.getComment();
AttributeVO attr = new AttributeVO(asset.getLabel(), comment);
AttributeDialog dialog = new AttributeDialog(getShell(), attr);
dialog.open();
}
use of com.centurylink.mdw.plugin.designer.dialogs.AttributeDialog in project mdw-designer by CenturyLinkCloud.
the class AttributesSection method drawWidgets.
@Override
public void drawWidgets(Composite composite, WorkflowElement selection) {
this.element = selection;
tableEditor = new TableEditor(element, TableEditor.TYPE_TABLE);
List<ColumnSpec> columnSpecs = new ArrayList<>();
columnSpecs.add(new ColumnSpec(PropertyEditor.TYPE_TEXT, "Attribute Name", "name"));
columnSpecs.add(new ColumnSpec(PropertyEditor.TYPE_TEXT, "Value", "value"));
tableEditor.setColumnSpecs(columnSpecs);
tableEditor.setReadOnly(true);
tableEditor.setContentProvider(new AttributeContentProvider());
tableEditor.setLabelProvider(new AttributeLabelProvider());
tableEditor.render(composite);
tableEditor.getTable().addSelectionListener(new SelectionAdapter() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
AttributeVO attributeVO = (AttributeVO) e.item.getData();
AttributeDialog dialog = new AttributeDialog(getShell(), attributeVO);
dialog.open();
}
});
}
Aggregations