use of net.sourceforge.nattable.columnRename.DisplayColumnRenameDialogCommand in project translationstudio8 by heartsome.
the class MenuItemProviders method renameColumnMenuItemProvider.
public static IMenuItemProvider renameColumnMenuItemProvider(final String label) {
return new IMenuItemProvider() {
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem menuItem = new MenuItem(popupMenu, SWT.PUSH);
menuItem.setText(label);
menuItem.setEnabled(true);
menuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
natTable.doCommand(new DisplayColumnRenameDialogCommand(natTable, getNatEventData(event).getColumnPosition()));
}
});
}
};
}
Aggregations