Search in sources :

Example 1 with OpenCreateColumnGroupDialog

use of net.sourceforge.nattable.group.command.OpenCreateColumnGroupDialog in project translationstudio8 by heartsome.

the class MenuItemProviders method createColumnGroupMenuItemProvider.

public static IMenuItemProvider createColumnGroupMenuItemProvider() {
    return new IMenuItemProvider() {

        public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
            MenuItem columnStyleEditor = new MenuItem(popupMenu, SWT.PUSH);
            columnStyleEditor.setText("Create column group");
            columnStyleEditor.setEnabled(true);
            columnStyleEditor.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    natTable.doCommand(new OpenCreateColumnGroupDialog(natTable.getShell()));
                }
            });
        }
    };
}
Also used : OpenCreateColumnGroupDialog(net.sourceforge.nattable.group.command.OpenCreateColumnGroupDialog) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) NatTable(net.sourceforge.nattable.NatTable) MenuItem(org.eclipse.swt.widgets.MenuItem) Menu(org.eclipse.swt.widgets.Menu)

Aggregations

NatTable (net.sourceforge.nattable.NatTable)1 OpenCreateColumnGroupDialog (net.sourceforge.nattable.group.command.OpenCreateColumnGroupDialog)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 Menu (org.eclipse.swt.widgets.Menu)1 MenuItem (org.eclipse.swt.widgets.MenuItem)1