Class OperationMenuItem

  • All Implemented Interfaces:
    java.lang.Comparable<MenuItem>, MenuItem

    public class OperationMenuItem
    extends java.lang.Object
    implements MenuItem
    • Method Detail

      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: MenuItem
        The Label of the menu item.
        Specified by:
        getLabel in interface MenuItem
        Returns:
        The label of the menu item.
      • isVisible

        public boolean isVisible​(java.util.List<VertexRef> targets,
                                 OperationContext operationContext)
        Description copied from interface: MenuItem
        Defines if the current MenuItem is visible.
        Specified by:
        isVisible in interface MenuItem
        Parameters:
        targets - The current targets (e.g. the selection)
        operationContext - The current OperationContext.
        Returns:
        True if visible, false otherwise.
      • getChildren

        public java.util.List<MenuItem> getChildren()
        Description copied from interface: MenuItem
        The MenuItems can be cascaded (allowing a tree).
        Specified by:
        getChildren in interface MenuItem
        Returns:
        the children, or an empty list if no children exits. Must not be null.
      • addChildren

        public void addChildren​(MenuItem menuItem)
        Description copied from interface: MenuItem
        Adds a children to the current MenuItem
        Specified by:
        addChildren in interface MenuItem
        Parameters:
        menuItem - the child to add.
      • setOrder

        public void setOrder​(int order)
        Specified by:
        setOrder in interface MenuItem
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface MenuItem
      • isCheckable

        public boolean isCheckable()
        Description copied from interface: MenuItem
        Defines if the current MenuItem is a checkable item.
        Specified by:
        isCheckable in interface MenuItem
        Returns:
        true if checkable, false otherwise
        See Also:
        MenuBar.MenuItem.isCheckable()