Class MenuItemProviders
IMenuItemProvider
for menu items
that can be used within a popup menu in the NatTable to execute NatTable
specific actions.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key that is used to put the NatEventData into the data of a menu. -
Method Summary
Modifier and TypeMethodDescriptionstatic IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
autoResizeColumnMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
autoResizeRowMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
clearAllFiltersMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
clearToggleFilterRowMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
columnChooserMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
columnStyleEditorMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
createColumnGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
createRowGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theExportTableCommand
to a popup menu.static IMenuItemProvider
exportToImageMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theExportTableCommand
to a popup menu.static IMenuItemProvider
static IMenuItemProvider
freezeColumnMenuItemProvider
(String menuLabel) static IMenuItemProvider
freezePositionMenuItemProvider
(boolean include) static IMenuItemProvider
freezePositionMenuItemProvider
(String menuLabel, boolean include) static IMenuItemProvider
static IMenuItemProvider
freezeRowMenuItemProvider
(String menuLabel) static NatEventData
getNatEventData
(org.eclipse.swt.events.SelectionEvent selectionEvent) Walk up the MenuItems (in case they are nested) and find the parentMenu
static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theColumnHideCommand
to a popup menu.static IMenuItemProvider
hideColumnMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theColumnHideCommand
to a popup menu.static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowHideCommand
to a popup menu.static IMenuItemProvider
hideRowMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theRowHideCommand
to a popup menu.static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowPositionHideCommand
to a popup menu.static IMenuItemProvider
hideRowPositionMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theRowPositionHideCommand
to a popup menu.static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
removeColumnGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
removeRowGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
renameColumnGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
static IMenuItemProvider
renameRowGroupMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu.static IMenuItemProvider
showAllColumnsMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu.static IMenuItemProvider
showAllColumnsMenuItemProvider
(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu.static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu.static IMenuItemProvider
showAllRowsMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu.static IMenuItemProvider
showAllRowsMenuItemProvider
(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu.static IMenuItemProvider
showColumnMenuItemProvider
(boolean showAll) Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to a popup menu.static IMenuItemProvider
showColumnMenuItemProvider
(boolean showAll, String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to a popup menu.static IMenuItemProvider
showColumnMenuItemProvider
(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to a popup menu.static IMenuItemProvider
showRowMenuItemProvider
(boolean showAll) Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to a popup menu.static IMenuItemProvider
showRowMenuItemProvider
(boolean showAll, String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to a popup menu.static IMenuItemProvider
showRowMenuItemProvider
(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to a popup menu.static IMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theDisplayPersistenceDialogCommand
to a popup menu.static IMenuItemProvider
stateManagerMenuItemProvider
(String menuLabel) Will create and return theIMenuItemProvider
that adds the action for executing theDisplayPersistenceDialogCommand
to a popup menu.static IMenuItemProvider
static IMenuItemProvider
unfreezeMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
ungroupColumnsMenuItemProvider
(String menuLabel) static IMenuItemProvider
static IMenuItemProvider
ungroupRowsMenuItemProvider
(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 theIMenuItemProvider
that adds the action for executing theColumnHideCommand
to a popup menu. This command is intended to hide the current selected column immediately.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theColumnHideCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
hideColumnMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theColumnHideCommand
to a popup menu. This command is intended to hide the current selected column immediately.The
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theColumnHideCommand
.
-
showAllColumnsMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllColumnsCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
showAllColumnsMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.The
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllColumnsCommand
.
-
showAllColumnsMenuItemProvider
public static IMenuItemProvider showAllColumnsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllColumnsCommand
to a popup menu. This command is intended to show all columns of the NatTable and is used to unhide previous hidden columns.The
MenuItem
will be shown with the given menu label and the given image.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
image
- The image that will be showed with the generatedMenuItem
. Can benull
to not showing an image.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllColumnsCommand
. - Since:
- 1.6
-
showColumnMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to 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
IMenuItemProvider
for theMenuItem
that executes theColumnShowCommand
. - Since:
- 1.6
-
showColumnMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to 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
MenuItem
will 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
IMenuItemProvider
for theMenuItem
that executes theColumnShowCommand
. - Since:
- 1.6
-
showColumnMenuItemProvider
public static IMenuItemProvider showColumnMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theColumnShowCommand
to 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
MenuItem
will 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 generatedMenuItem
image
- The image that will be showed with the generatedMenuItem
. Can benull
to not showing an image.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theColumnShowCommand
. - Since:
- 1.6
-
hideRowMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowHideCommand
to a popup menu. This command is intended to hide the current selected row immediately.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theRowHideCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
hideRowMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowHideCommand
to a popup menu. This command is intended to hide the current selected row immediately.The
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theRowHideCommand
.
-
hideRowPositionMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowPositionHideCommand
to 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
IMenuItemProvider
for theMenuItem
that executes theRowPositionHideCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core. - Since:
- 1.6
-
hideRowPositionMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowPositionHideCommand
to 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
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theRowPositionHideCommand
. - Since:
- 1.6
-
showAllRowsMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllRowsCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
showAllRowsMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.The
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllRowsCommand
.
-
showAllRowsMenuItemProvider
public static IMenuItemProvider showAllRowsMenuItemProvider(String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theShowAllRowsCommand
to a popup menu. This command is intended to show all rows of the NatTable and is used to unhide previous hidden rows.The
MenuItem
will be shown with the given menu label and given image.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
image
- The image that will be showed with the generatedMenuItem
. Can benull
to not showing an image.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theShowAllRowsCommand
. - Since:
- 1.6
-
showRowMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to 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
IMenuItemProvider
for theMenuItem
that executes theRowShowCommand
. - Since:
- 1.6
-
showRowMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to 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
MenuItem
will 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
IMenuItemProvider
for theMenuItem
that executes theRowShowCommand
. - Since:
- 1.6
-
showRowMenuItemProvider
public static IMenuItemProvider showRowMenuItemProvider(boolean showAll, String menuLabel, org.eclipse.swt.graphics.Image image) Will create and return theIMenuItemProvider
that adds the action for executing theRowShowCommand
to 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
MenuItem
will 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 generatedMenuItem
image
- The image that will be showed with the generatedMenuItem
. Can benull
to not showing an image.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theRowShowCommand
. - Since:
- 1.6
-
autoResizeColumnMenuItemProvider
-
autoResizeColumnMenuItemProvider
-
autoResizeRowMenuItemProvider
-
autoResizeRowMenuItemProvider
-
autoResizeAllSelectedColumnMenuItemProvider
-
autoResizeAllSelectedColumnMenuItemProvider
-
columnChooserMenuItemProvider
-
columnChooserMenuItemProvider
-
columnStyleEditorMenuItemProvider
-
columnStyleEditorMenuItemProvider
-
renameColumnMenuItemProvider
-
renameColumnMenuItemProvider
-
createColumnGroupMenuItemProvider
-
createColumnGroupMenuItemProvider
-
createPerformanceColumnGroupMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for 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 theIMenuItemProvider
that adds the action for executing theDisplayPersistenceDialogCommand
to a popup menu. This command is intended to open the DisplayPersistenceDialog for managing NatTable states (also called view management).- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theDisplayPersistenceDialogCommand
TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
stateManagerMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theDisplayPersistenceDialogCommand
to a popup menu. This command is intended to open the DisplayPersistenceDialog for managing NatTable states (also called view management).The
MenuItem
will be shown with the given menu label.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theDisplayPersistenceDialogCommand
TheMenuItem
will be shown with the localized default text configured in NatTable core.
-
separatorMenuItemProvider
- Returns:
- An
IMenuItemProvider
for adding a separator to the popup menu.
-
renameColumnGroupMenuItemProvider
-
renameColumnGroupMenuItemProvider
-
removeColumnGroupMenuItemProvider
-
removeColumnGroupMenuItemProvider
-
exportToImageMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theExportTableCommand
to a popup menu. This command is intended to to export the NatTable to image.IMPORTANT: the
ImageExporter
needs to be configured for the configuration attributeExportConfigAttributes.TABLE_EXPORTER
to really export to an image. Also theExportTableCommandHandler
needs to be registered on anILayer
in the layer stack, e.g. the GridLayer.- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theExportTableCommand
. TheMenuItem
will be shown with the localized default text configured in NatTable core. - Since:
- 1.5
-
exportToImageMenuItemProvider
Will create and return theIMenuItemProvider
that adds the action for executing theExportTableCommand
to a popup menu. This command is intended to export the NatTable to image.The
MenuItem
will be shown with the given menu label.IMPORTANT: the
ImageExporter
needs to be configured for the configuration attributeExportConfigAttributes.TABLE_EXPORTER
to really export to an image. Also theExportTableCommandHandler
needs to be registered on anILayer
in the layer stack, e.g. the GridLayer.- Parameters:
menuLabel
- The text that will be showed for the generatedMenuItem
- Returns:
- The
IMenuItemProvider
for theMenuItem
that executes theExportTableCommand
. - Since:
- 1.5
-
createRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to create a row group with the new performance RowGroupHeaderLayer. - Since:
- 1.6
-
ungroupRowsMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to ungroup selected rows from an existing row group. - Since:
- 1.6
-
renameRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item for renaming a row group. - Since:
- 1.6
-
removeRowGroupMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to remove a row group. - Since:
- 1.6
-
freezeColumnMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to freeze a column. - Since:
- 1.6
-
freezeRowMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to freeze a row. - Since:
- 1.6
-
freezePositionMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to freeze a cell position. - Since:
- 1.6
-
unfreezeMenuItemProvider
- Returns:
- The
IMenuItemProvider
for 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
IMenuItemProvider
for adding a menu item to remove a frozen state. - Since:
- 1.6
-