Class MenuItemProviders
IMenuItemProvider for menu items
that can be used within a popup menu in the NatTable to execute NatTable
specific actions.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey that is used to put the NatEventData into the data of a menu. -
Method Summary
Modifier and TypeMethodDescriptionstatic IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderautoResizeColumnMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderautoResizeRowMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderclearAllFiltersMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderclearToggleFilterRowMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProvidercolumnChooserMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProvidercolumnStyleEditorMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProvidercreateColumnGroupMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProvidercreateRowGroupMenuItemProvider(String menuLabel) static IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theExportTableCommandto a popup menu.static IMenuItemProviderexportToImageMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theExportTableCommandto a popup menu.static IMenuItemProviderstatic IMenuItemProviderfreezeColumnMenuItemProvider(String menuLabel) static IMenuItemProviderfreezePositionMenuItemProvider(boolean include) static IMenuItemProviderfreezePositionMenuItemProvider(String menuLabel, boolean include) static IMenuItemProviderstatic IMenuItemProviderfreezeRowMenuItemProvider(String menuLabel) static NatEventDatagetNatEventData(org.eclipse.swt.events.SelectionEvent selectionEvent) Walk up the MenuItems (in case they are nested) and find the parentMenustatic IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theColumnHideCommandto a popup menu.static IMenuItemProviderhideColumnMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theColumnHideCommandto a popup menu.static IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theRowHideCommandto a popup menu.static IMenuItemProviderhideRowMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theRowHideCommandto a popup menu.static IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theRowPositionHideCommandto a popup menu.static IMenuItemProviderhideRowPositionMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theRowPositionHideCommandto a popup menu.static IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderremoveColumnGroupMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderremoveRowGroupMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderrenameColumnGroupMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderstatic IMenuItemProviderrenameRowGroupMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu.static IMenuItemProvidershowAllColumnsMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu.static IMenuItemProvidershowAllColumnsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu.static IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu.static IMenuItemProvidershowAllRowsMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu.static IMenuItemProvidershowAllRowsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu.static IMenuItemProvidershowColumnMenuItemProvider(boolean showAll) Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu.static IMenuItemProvidershowColumnMenuItemProvider(boolean showAll, String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu.static IMenuItemProvidershowColumnMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu.static IMenuItemProvidershowRowMenuItemProvider(boolean showAll) Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu.static IMenuItemProvidershowRowMenuItemProvider(boolean showAll, String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu.static IMenuItemProvidershowRowMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu.static IMenuItemProviderWill create and return theIMenuItemProviderthat adds the action for executing theDisplayPersistenceDialogCommandto a popup menu.static IMenuItemProviderstateManagerMenuItemProvider(String menuLabel) Will create and return theIMenuItemProviderthat adds the action for executing theDisplayPersistenceDialogCommandto a popup menu.static IMenuItemProviderstatic IMenuItemProviderunfreezeMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderungroupColumnsMenuItemProvider(String menuLabel) static IMenuItemProviderstatic IMenuItemProviderungroupRowsMenuItemProvider(String menuLabel)
-
Field Details
-
NAT_EVENT_DATA_KEY
Key that is used to put the NatEventData into the data of a menu.- See Also:
-
-
Method Details
-
getNatEventData
Walk up the MenuItems (in case they are nested) and find the parentMenu- Parameters:
selectionEvent- on theMenuItem- Returns:
- data associated with the parent
Menu
-
hideColumnMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theColumnHideCommandto a popup menu. This command is intended to hide the current selected column immediately.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theColumnHideCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core.
-
hideColumnMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theColumnHideCommandto a popup menu. This command is intended to hide the current selected column immediately.The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theColumnHideCommand.
-
showAllColumnsMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllColumnsCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core.
-
showAllColumnsMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllColumnsCommand.
-
showAllColumnsMenuItemProvider
public static IMenuItemProvider showAllColumnsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllColumnsCommandto a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.The
MenuItemwill be shown with the given menu label and the given image.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItemimage- The image that will be showed with the generatedMenuItem. Can benullto not showing an image.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllColumnsCommand. - Since:
- 1.6
-
showColumnMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu. This command is intended to show the column(s) at the clicked position of the NatTable and is used to unhide previous hidden columns.- Parameters:
showAll- Whether all hidden adjacent columns should be shown again or only the single direct adjacent column.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theColumnShowCommand. - Since:
- 1.6
-
showColumnMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu. This command is intended to show the column(s) at the clicked position of the NatTable and is used to unhide previous hidden columns.The
MenuItemwill be shown with the given menu label.- Parameters:
showAll- Whether all hidden adjacent columns should be shown again or only the single direct adjacent column.menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theColumnShowCommand. - Since:
- 1.6
-
showColumnMenuItemProvider
public static IMenuItemProvider showColumnMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theColumnShowCommandto a popup menu. This command is intended to show the column(s) at the clicked position of the NatTable and is used to unhide previous hidden columns.The
MenuItemwill be shown with the given menu label and the given image.- Parameters:
showAll- Whether all hidden adjacent columns should be shown again or only the single direct adjacent column.menuLabel- The text that will be showed for the generatedMenuItemimage- The image that will be showed with the generatedMenuItem. Can benullto not showing an image.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theColumnShowCommand. - Since:
- 1.6
-
hideRowMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowHideCommandto a popup menu. This command is intended to hide the current selected row immediately.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowHideCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core.
-
hideRowMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowHideCommandto a popup menu. This command is intended to hide the current selected row immediately.The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowHideCommand.
-
hideRowPositionMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowPositionHideCommandto a popup menu. This command is intended to hide the current selected row immediately.With the additional column position information this command is intended to be used with the HierarchicalTreeLayer to support hiding of multiple rows on a spanned level header column.
- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowPositionHideCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core. - Since:
- 1.6
-
hideRowPositionMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowPositionHideCommandto a popup menu. This command is intended to hide the current selected row immediately.With the additional column position information this command is intended to be used with the HierarchicalTreeLayer to support hiding of multiple rows on a spanned level header column.
The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowPositionHideCommand. - Since:
- 1.6
-
showAllRowsMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllRowsCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core.
-
showAllRowsMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllRowsCommand.
-
showAllRowsMenuItemProvider
public static IMenuItemProvider showAllRowsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theShowAllRowsCommandto a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.The
MenuItemwill be shown with the given menu label and given image.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItemimage- The image that will be showed with the generatedMenuItem. Can benullto not showing an image.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theShowAllRowsCommand. - Since:
- 1.6
-
showRowMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu. This command is intended to show the row(s) at the clicked position of the NatTable and is used to unhide previous hidden rows.- Parameters:
showAll- Whether all hidden adjacent rows should be shown again or only the single direct adjacent row.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowShowCommand. - Since:
- 1.6
-
showRowMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu. This command is intended to show the row(s) at the clicked position of the NatTable and is used to unhide previous hidden rows.The
MenuItemwill be shown with the given menu label.- Parameters:
showAll- Whether all hidden adjacent rows should be shown again or only the single direct adjacent row.menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowShowCommand. - Since:
- 1.6
-
showRowMenuItemProvider
public static IMenuItemProvider showRowMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProviderthat adds the action for executing theRowShowCommandto a popup menu. This command is intended to show the row(s) at the clicked position of the NatTable and is used to unhide previous hidden rows.The
MenuItemwill be shown with the given menu label and given image.- Parameters:
showAll- Whether all hidden adjacent rows should be shown again or only the single direct adjacent row.menuLabel- The text that will be showed for the generatedMenuItemimage- The image that will be showed with the generatedMenuItem. Can benullto not showing an image.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theRowShowCommand. - Since:
- 1.6
-
autoResizeColumnMenuItemProvider
-
autoResizeColumnMenuItemProvider
-
autoResizeRowMenuItemProvider
-
autoResizeRowMenuItemProvider
-
autoResizeAllSelectedColumnMenuItemProvider
-
autoResizeAllSelectedColumnMenuItemProvider
-
columnChooserMenuItemProvider
-
columnChooserMenuItemProvider
-
columnStyleEditorMenuItemProvider
-
columnStyleEditorMenuItemProvider
-
renameColumnMenuItemProvider
-
renameColumnMenuItemProvider
-
createColumnGroupMenuItemProvider
-
createColumnGroupMenuItemProvider
-
createPerformanceColumnGroupMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to create a column group with the new performance ColumnGroupHeaderLayer. - Since:
- 1.6
-
createPerformanceColumnGroupMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to create a column group with the new performance ColumnGroupHeaderLayer. - Since:
- 1.6
-
ungroupColumnsMenuItemProvider
-
ungroupColumnsMenuItemProvider
-
inspectLabelsMenuItemProvider
-
categoriesBasedColumnChooserMenuItemProvider
-
categoriesBasedColumnChooserMenuItemProvider
-
clearAllFiltersMenuItemProvider
-
clearAllFiltersMenuItemProvider
-
clearToggleFilterRowMenuItemProvider
-
clearToggleFilterRowMenuItemProvider
-
stateManagerMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theDisplayPersistenceDialogCommandto a popup menu. This command is intended to open the DisplayPersistenceDialog for managing NatTable states (also called view management).- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theDisplayPersistenceDialogCommandTheMenuItemwill be shown with the localized default text configured in NatTable core.
-
stateManagerMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theDisplayPersistenceDialogCommandto a popup menu. This command is intended to open the DisplayPersistenceDialog for managing NatTable states (also called view management).The
MenuItemwill be shown with the given menu label.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theDisplayPersistenceDialogCommandTheMenuItemwill be shown with the localized default text configured in NatTable core.
-
separatorMenuItemProvider
- Returns:
- An
IMenuItemProviderfor adding a separator to the popup menu.
-
renameColumnGroupMenuItemProvider
-
renameColumnGroupMenuItemProvider
-
removeColumnGroupMenuItemProvider
-
removeColumnGroupMenuItemProvider
-
exportToImageMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theExportTableCommandto a popup menu. This command is intended to to export the NatTable to image.IMPORTANT: the
ImageExporterneeds to be configured for the configuration attributeExportConfigAttributes.TABLE_EXPORTERto really export to an image. Also theExportTableCommandHandlerneeds to be registered on anILayerin the layer stack, e.g. the GridLayer.- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theExportTableCommand. TheMenuItemwill be shown with the localized default text configured in NatTable core. - Since:
- 1.5
-
exportToImageMenuItemProvider
Will create and return theIMenuItemProviderthat adds the action for executing theExportTableCommandto a popup menu. This command is intended to export the NatTable to image.The
MenuItemwill be shown with the given menu label.IMPORTANT: the
ImageExporterneeds to be configured for the configuration attributeExportConfigAttributes.TABLE_EXPORTERto really export to an image. Also theExportTableCommandHandlerneeds to be registered on anILayerin the layer stack, e.g. the GridLayer.- Parameters:
menuLabel- The text that will be showed for the generatedMenuItem- Returns:
- The
IMenuItemProviderfor theMenuItemthat executes theExportTableCommand. - Since:
- 1.5
-
createRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to create a row group with the new performance RowGroupHeaderLayer. - Since:
- 1.6
-
createRowGroupMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to create a row group with the new performance RowGroupHeaderLayer. - Since:
- 1.6
-
ungroupRowsMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to ungroup selected rows from an existing row group. - Since:
- 1.6
-
ungroupRowsMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to ungroup selected rows from an existing row group. - Since:
- 1.6
-
renameRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item for renaming a row group. - Since:
- 1.6
-
renameRowGroupMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item for renaming a row group. - Since:
- 1.6
-
removeRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to remove a row group. - Since:
- 1.6
-
removeRowGroupMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to remove a row group. - Since:
- 1.6
-
freezeColumnMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a column. - Since:
- 1.6
-
freezeColumnMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a column. - Since:
- 1.6
-
freezeRowMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a row. - Since:
- 1.6
-
freezeRowMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a row. - Since:
- 1.6
-
freezePositionMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a cell position. - Since:
- 1.6
-
freezePositionMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.include- whether the selected cell should be included in the freeze region or not. Include means the freeze borders will be to the right and bottom, while exclude means the freeze borders are to the left and top.- Returns:
- The
IMenuItemProviderfor adding a menu item to freeze a cell position. - Since:
- 1.6
-
unfreezeMenuItemProvider
- Returns:
- The
IMenuItemProviderfor adding a menu item to remove a frozen state. - Since:
- 1.6
-
unfreezeMenuItemProvider
- Parameters:
menuLabel- The label to be used for showing the menu item.- Returns:
- The
IMenuItemProviderfor adding a menu item to remove a frozen state. - Since:
- 1.6
-