Interface ContextMenuItemManipulator

  • All Superinterfaces:
    Manipulator
    All Known Subinterfaces:
    EdgesManipulator, NodesManipulator

    public interface ContextMenuItemManipulator
    extends Manipulator

    This interface defines a common extension for the manipulators that appear as context menu items such as NodesManipulator, EdgesManipulator and GraphContextMenuItem (from Visualization API)

    Author:
    Eduardo Ramos
    See Also:
    NodesManipulator
    • Method Detail

      • getSubItems

        ContextMenuItemManipulator[] getSubItems()

        This is optional. Return sub items for this menu item if desired.

        If this item should contain more items, return a new instance of each sub item. If not return null and implement execute for this item.

        In order to declare mnemonic keys for subitem(s), the implementation of this item must return the subitem(s) with the mnemonic even when it has not been setup. If you don't need a mnemonic, return null if the item is not setup.

        Returned items have to be of the same type as the subinterface (NodesManipulator for example)

        Returns:
        sub items
      • isAvailable

        boolean isAvailable()
        Indicates if this item has to appear in the context menu at all
        Returns:
        True to show, false otherwise
      • getMnemonicKey

        Integer getMnemonicKey()
        Optional. Allows to declare a mnemonic key for this item in the menu. There should not be 2 items with the same mnemonic at the same time.
        Returns:
        Integer from KeyEvent values or null