use of net.sourceforge.nattable.style.editor.command.DisplayColumnStyleEditorCommand in project translationstudio8 by heartsome.
the class MenuItemProviders method columnStyleEditorMenuItemProvider.
public static IMenuItemProvider columnStyleEditorMenuItemProvider(final String menuLabel) {
return new IMenuItemProvider() {
public void addMenuItem(final NatTable natTable, final Menu popupMenu) {
MenuItem columnStyleEditor = new MenuItem(popupMenu, SWT.PUSH);
columnStyleEditor.setText(menuLabel);
columnStyleEditor.setImage(GUIHelper.getImage("preferences"));
columnStyleEditor.setEnabled(true);
columnStyleEditor.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
int rowPosition = getNatEventData(event).getRowPosition();
int columnPosition = getNatEventData(event).getColumnPosition();
natTable.doCommand(new DisplayColumnStyleEditorCommand(natTable, natTable.getConfigRegistry(), columnPosition, rowPosition));
}
});
}
};
}
Aggregations