use of net.sourceforge.nattable.columnChooser.command.DisplayColumnChooserCommand in project translationstudio8 by heartsome.
the class MenuItemProviders method columnChooserMenuItemProvider.
public static IMenuItemProvider columnChooserMenuItemProvider(final String menuLabel) {
return new IMenuItemProvider() {
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem columnChooser = new MenuItem(popupMenu, SWT.PUSH);
columnChooser.setText(menuLabel);
columnChooser.setImage(GUIHelper.getImage("column_chooser"));
columnChooser.setEnabled(true);
columnChooser.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
natTable.doCommand(new DisplayColumnChooserCommand(natTable));
}
});
}
};
}
Aggregations