use of org.eclipse.nebula.widgets.nattable.group.command.DisplayColumnGroupRenameDialogCommand in project nebula.widgets.nattable by eclipse.
the class ColumnGroupMenuItemProviders method renameColumnGroupMenuItemProvider.
public static IMenuItemProvider renameColumnGroupMenuItemProvider(final String menuLabel) {
return new IMenuItemProvider() {
@Override
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem columnStyleEditor = new MenuItem(popupMenu, SWT.PUSH);
columnStyleEditor.setText(menuLabel);
columnStyleEditor.setEnabled(true);
columnStyleEditor.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
NatEventData natEventData = MenuItemProviders.getNatEventData(e);
int columnPosition = natEventData.getColumnPosition();
natTable.doCommand(new DisplayColumnGroupRenameDialogCommand(natTable, columnPosition));
}
});
}
};
}
use of org.eclipse.nebula.widgets.nattable.group.command.DisplayColumnGroupRenameDialogCommand in project nebula.widgets.nattable by eclipse.
the class MenuItemProviders method renameColumnGroupMenuItemProvider.
public static IMenuItemProvider renameColumnGroupMenuItemProvider(final String menuLabel) {
return new IMenuItemProvider() {
@Override
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem columnStyleEditor = new MenuItem(popupMenu, SWT.PUSH);
columnStyleEditor.setText(Messages.getLocalizedMessage(menuLabel));
columnStyleEditor.setEnabled(true);
columnStyleEditor.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
NatEventData natEventData = MenuItemProviders.getNatEventData(e);
int columnPosition = natEventData.getColumnPosition();
natTable.doCommand(new DisplayColumnGroupRenameDialogCommand(natTable, columnPosition));
}
});
}
};
}
Aggregations