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