org.eclipse.nebula.widgets.nattable.ui.menu
Class MenuItemProviders

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.ui.menu.MenuItemProviders

public class MenuItemProviders
extends Object

Helper class that provides several IMenuItemProvider for menu items that can be used within a popup menu in the NatTable to execute NatTable specific actions.


Field Summary
static String NAT_EVENT_DATA_KEY
          Key that is used to put the NatEventData into the data of a menu.
 
Constructor Summary
MenuItemProviders()
           
 
Method Summary
static IMenuItemProvider autoResizeAllSelectedColumnMenuItemProvider()
           
static IMenuItemProvider autoResizeAllSelectedColumnMenuItemProvider(String menuLabel)
           
static IMenuItemProvider autoResizeColumnMenuItemProvider()
           
static IMenuItemProvider autoResizeColumnMenuItemProvider(String menuLabel)
           
static IMenuItemProvider autoResizeRowMenuItemProvider()
           
static IMenuItemProvider autoResizeRowMenuItemProvider(String menuLabel)
           
static IMenuItemProvider categoriesBasedColumnChooserMenuItemProvider()
           
static IMenuItemProvider categoriesBasedColumnChooserMenuItemProvider(String menuLabel)
           
static IMenuItemProvider clearAllFiltersMenuItemProvider()
           
static IMenuItemProvider clearAllFiltersMenuItemProvider(String menuLabel)
           
static IMenuItemProvider clearToggleFilterRowMenuItemProvider()
           
static IMenuItemProvider clearToggleFilterRowMenuItemProvider(String menuLabel)
           
static IMenuItemProvider columnChooserMenuItemProvider()
           
static IMenuItemProvider columnChooserMenuItemProvider(String menuLabel)
           
static IMenuItemProvider columnStyleEditorMenuItemProvider()
           
static IMenuItemProvider columnStyleEditorMenuItemProvider(String menuLabel)
           
static IMenuItemProvider createColumnGroupMenuItemProvider()
           
static IMenuItemProvider createColumnGroupMenuItemProvider(String menuLabel)
           
static NatEventData getNatEventData(org.eclipse.swt.events.SelectionEvent selectionEvent)
          Walk up the MenuItems (in case they are nested) and find the parent Menu
static IMenuItemProvider hideColumnMenuItemProvider()
          Will create and return the IMenuItemProvider that adds the action for executing the ColumnHideCommand to a popup menu.
static IMenuItemProvider hideColumnMenuItemProvider(String menuLabel)
          Will create and return the IMenuItemProvider that adds the action for executing the ColumnHideCommand to a popup menu.
static IMenuItemProvider hideRowMenuItemProvider()
          Will create and return the IMenuItemProvider that adds the action for executing the RowHideCommand to a popup menu.
static IMenuItemProvider hideRowMenuItemProvider(String menuLabel)
          Will create and return the IMenuItemProvider that adds the action for executing the RowHideCommand to a popup menu.
static IMenuItemProvider inspectLabelsMenuItemProvider()
           
static IMenuItemProvider removeColumnGroupMenuItemProvider()
           
static IMenuItemProvider removeColumnGroupMenuItemProvider(String menuLabel)
           
static IMenuItemProvider renameColumnGroupMenuItemProvider()
           
static IMenuItemProvider renameColumnGroupMenuItemProvider(String menuLabel)
           
static IMenuItemProvider renameColumnMenuItemProvider()
           
static IMenuItemProvider renameColumnMenuItemProvider(String label)
           
static IMenuItemProvider separatorMenuItemProvider()
           
static IMenuItemProvider showAllColumnsMenuItemProvider()
          Will create and return the IMenuItemProvider that adds the action for executing the ShowAllColumnsCommand to a popup menu.
static IMenuItemProvider showAllColumnsMenuItemProvider(String menuLabel)
          Will create and return the IMenuItemProvider that adds the action for executing the ShowAllColumnsCommand to a popup menu.
static IMenuItemProvider showAllRowsMenuItemProvider()
          Will create and return the IMenuItemProvider that adds the action for executing the ShowAllRowsCommand to a popup menu.
static IMenuItemProvider showAllRowsMenuItemProvider(String menuLabel)
          Will create and return the IMenuItemProvider that adds the action for executing the ShowAllRowsCommand to a popup menu.
static IMenuItemProvider stateManagerMenuItemProvider()
          Will create and return the IMenuItemProvider that adds the action for executing the DisplayPersistenceDialogCommand to a popup menu.
static IMenuItemProvider stateManagerMenuItemProvider(String menuLabel)
          Will create and return the IMenuItemProvider that adds the action for executing the DisplayPersistenceDialogCommand to a popup menu.
static IMenuItemProvider ungroupColumnsMenuItemProvider()
           
static IMenuItemProvider ungroupColumnsMenuItemProvider(String menuLabel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAT_EVENT_DATA_KEY

public static final String NAT_EVENT_DATA_KEY
Key that is used to put the NatEventData into the data of a menu.

See Also:
Constant Field Values
Constructor Detail

MenuItemProviders

public MenuItemProviders()
Method Detail

getNatEventData

public static NatEventData getNatEventData(org.eclipse.swt.events.SelectionEvent selectionEvent)
Walk up the MenuItems (in case they are nested) and find the parent Menu

Parameters:
selectionEvent - on the MenuItem
Returns:
data associated with the parent Menu

hideColumnMenuItemProvider

public static IMenuItemProvider hideColumnMenuItemProvider()
Will create and return the IMenuItemProvider that adds the action for executing the ColumnHideCommand to a popup menu. This command is intended to hide the current selected column immediately.

Returns:
The IMenuItemProvider for the MenuItem that executes the ColumnHideCommand. The MenuItem will be shown with the localized default text configured in NatTable core.

hideColumnMenuItemProvider

public static IMenuItemProvider hideColumnMenuItemProvider(String menuLabel)
Will create and return the IMenuItemProvider that adds the action for executing the ColumnHideCommand 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 generated MenuItem
Returns:
The IMenuItemProvider for the MenuItem that executes the ColumnHideCommand.

showAllColumnsMenuItemProvider

public static IMenuItemProvider showAllColumnsMenuItemProvider()
Will create and return the IMenuItemProvider that adds the action for executing the ShowAllColumnsCommand 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 the MenuItem that executes the ShowAllColumnsCommand. The MenuItem will be shown with the localized default text configured in NatTable core.

showAllColumnsMenuItemProvider

public static IMenuItemProvider showAllColumnsMenuItemProvider(String menuLabel)
Will create and return the IMenuItemProvider that adds the action for executing the ShowAllColumnsCommand 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 generated MenuItem
Returns:
The IMenuItemProvider for the MenuItem that executes the ShowAllColumnsCommand.

hideRowMenuItemProvider

public static IMenuItemProvider hideRowMenuItemProvider()
Will create and return the IMenuItemProvider that adds the action for executing the RowHideCommand to a popup menu. This command is intended to hide the current selected row immediately.

Returns:
The IMenuItemProvider for the MenuItem that executes the RowHideCommand. The MenuItem will be shown with the localized default text configured in NatTable core.

hideRowMenuItemProvider

public static IMenuItemProvider hideRowMenuItemProvider(String menuLabel)
Will create and return the IMenuItemProvider that adds the action for executing the RowHideCommand 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 generated MenuItem
Returns:
The IMenuItemProvider for the MenuItem that executes the RowHideCommand.

showAllRowsMenuItemProvider

public static IMenuItemProvider showAllRowsMenuItemProvider()
Will create and return the IMenuItemProvider that adds the action for executing the ShowAllRowsCommand 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 the MenuItem that executes the ShowAllRowsCommand. The MenuItem will be shown with the localized default text configured in NatTable core.

showAllRowsMenuItemProvider

public static IMenuItemProvider showAllRowsMenuItemProvider(String menuLabel)
Will create and return the IMenuItemProvider that adds the action for executing the ShowAllRowsCommand 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 generated MenuItem
Returns:
The IMenuItemProvider for the MenuItem that executes the ShowAllRowsCommand.

autoResizeColumnMenuItemProvider

public static IMenuItemProvider autoResizeColumnMenuItemProvider()

autoResizeColumnMenuItemProvider

public static IMenuItemProvider autoResizeColumnMenuItemProvider(String menuLabel)

autoResizeRowMenuItemProvider

public static IMenuItemProvider autoResizeRowMenuItemProvider()

autoResizeRowMenuItemProvider

public static IMenuItemProvider autoResizeRowMenuItemProvider(String menuLabel)

autoResizeAllSelectedColumnMenuItemProvider

public static IMenuItemProvider autoResizeAllSelectedColumnMenuItemProvider()

autoResizeAllSelectedColumnMenuItemProvider

public static IMenuItemProvider autoResizeAllSelectedColumnMenuItemProvider(String menuLabel)

columnChooserMenuItemProvider

public static IMenuItemProvider columnChooserMenuItemProvider()

columnChooserMenuItemProvider

public static IMenuItemProvider columnChooserMenuItemProvider(String menuLabel)

columnStyleEditorMenuItemProvider

public static IMenuItemProvider columnStyleEditorMenuItemProvider()

columnStyleEditorMenuItemProvider

public static IMenuItemProvider columnStyleEditorMenuItemProvider(String menuLabel)

renameColumnMenuItemProvider

public static IMenuItemProvider renameColumnMenuItemProvider()

renameColumnMenuItemProvider

public static IMenuItemProvider renameColumnMenuItemProvider(String label)

createColumnGroupMenuItemProvider

public static IMenuItemProvider createColumnGroupMenuItemProvider()

createColumnGroupMenuItemProvider

public static IMenuItemProvider createColumnGroupMenuItemProvider(String menuLabel)

ungroupColumnsMenuItemProvider

public static IMenuItemProvider ungroupColumnsMenuItemProvider()

ungroupColumnsMenuItemProvider

public static IMenuItemProvider ungroupColumnsMenuItemProvider(String menuLabel)

inspectLabelsMenuItemProvider

public static IMenuItemProvider inspectLabelsMenuItemProvider()

categoriesBasedColumnChooserMenuItemProvider

public static IMenuItemProvider categoriesBasedColumnChooserMenuItemProvider()

categoriesBasedColumnChooserMenuItemProvider

public static IMenuItemProvider categoriesBasedColumnChooserMenuItemProvider(String menuLabel)

clearAllFiltersMenuItemProvider

public static IMenuItemProvider clearAllFiltersMenuItemProvider()

clearAllFiltersMenuItemProvider

public static IMenuItemProvider clearAllFiltersMenuItemProvider(String menuLabel)

clearToggleFilterRowMenuItemProvider

public static IMenuItemProvider clearToggleFilterRowMenuItemProvider()

clearToggleFilterRowMenuItemProvider

public static IMenuItemProvider clearToggleFilterRowMenuItemProvider(String menuLabel)

stateManagerMenuItemProvider

public static IMenuItemProvider stateManagerMenuItemProvider()
Will create and return the IMenuItemProvider that adds the action for executing the DisplayPersistenceDialogCommand to a popup menu. This command is intended to open the DisplayPersistenceDialog for managing NatTable states (also called view management).

Returns:
The IMenuItemProvider for the MenuItem that executes the DisplayPersistenceDialogCommand The MenuItem will be shown with the localized default text configured in NatTable core.

stateManagerMenuItemProvider

public static IMenuItemProvider stateManagerMenuItemProvider(String menuLabel)
Will create and return the IMenuItemProvider that adds the action for executing the DisplayPersistenceDialogCommand 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 generated MenuItem
Returns:
The IMenuItemProvider for the MenuItem that executes the DisplayPersistenceDialogCommand The MenuItem will be shown with the localized default text configured in NatTable core.

separatorMenuItemProvider

public static IMenuItemProvider separatorMenuItemProvider()
Returns:
An IMenuItemProvider for adding a separator to the popup menu.

renameColumnGroupMenuItemProvider

public static IMenuItemProvider renameColumnGroupMenuItemProvider()

renameColumnGroupMenuItemProvider

public static IMenuItemProvider renameColumnGroupMenuItemProvider(String menuLabel)

removeColumnGroupMenuItemProvider

public static IMenuItemProvider removeColumnGroupMenuItemProvider()

removeColumnGroupMenuItemProvider

public static IMenuItemProvider removeColumnGroupMenuItemProvider(String menuLabel)


Copyright © 2015. All rights reserved.