use of net.sourceforge.nattable.hideshow.command.ColumnHideCommand in project translationstudio8 by heartsome.
the class MenuItemProviders method hideColumnMenuItemProvider.
public static IMenuItemProvider hideColumnMenuItemProvider() {
return new IMenuItemProvider() {
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem menuItem = new MenuItem(popupMenu, SWT.PUSH);
menuItem.setText("Hide column");
menuItem.setImage(GUIHelper.getImage("hide_column"));
menuItem.setEnabled(true);
menuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
int columnPosition = getNatEventData(event).getColumnPosition();
natTable.doCommand(new ColumnHideCommand(natTable, columnPosition));
}
});
}
};
}
Aggregations