use of org.talend.designer.runtime.visualization.internal.ui.properties.PropertiesColumn in project tdi-studio-se by Talend.
the class NotificationDetailsDialog method configureTree.
/**
* Configures the tree.
*
* @param detailsTree The tree
*/
private void configureTree(Tree detailsTree) {
detailsTree.setLinesVisible(true);
detailsTree.setHeaderVisible(true);
for (PropertiesColumn column : PropertiesColumn.values()) {
TreeColumn treeColumn = new TreeColumn(detailsTree, SWT.NONE);
treeColumn.setText(column.label);
treeColumn.setWidth(column.defalutWidth);
treeColumn.setAlignment(column.alignment);
treeColumn.setToolTipText(column.toolTip);
}
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(copyAction);
}
});
Menu menu = menuMgr.createContextMenu(detailsTree);
detailsTree.setMenu(menu);
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.PropertiesColumn in project tdi-studio-se by Talend.
the class InvokeDialog method configureTree.
/**
* Configures the tree.
*
* @param tree The tree
*/
private void configureTree(Tree tree) {
tree.setLinesVisible(true);
tree.setHeaderVisible(true);
for (PropertiesColumn column : PropertiesColumn.values()) {
TreeColumn treeColumn = new TreeColumn(tree, SWT.NONE);
treeColumn.setText(column.label);
treeColumn.setWidth(column.defalutWidth);
treeColumn.setAlignment(column.alignment);
treeColumn.setToolTipText(column.toolTip);
}
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(copyAction);
}
});
Menu menu = menuMgr.createContextMenu(tree);
tree.setMenu(menu);
}
Aggregations