Class ActionsMenuCreator.AMC_ActionsVisitor

    • Constructor Detail

      • AMC_ActionsVisitor

        protected AMC_ActionsVisitor()
    • Method Detail

      • visit

        public void visit​(NMAction action)
        Description copied from interface: ActionsVisitor
        Visits action.
        Specified by:
        visit in interface ActionsVisitor
        Parameters:
        action - the action to visit.
      • isEmpty

        private boolean isEmpty​(ActionsCategory category)
        Check if this category is empty recursively - contains no actions or contains only empty other categories
        Parameters:
        category - category
        Returns:
        true if empty
      • isLastComponentVisibleSeparator

        private boolean isLastComponentVisibleSeparator()
        Returns:
        true if last visible component is a visible separator or there is no last visible component at all
      • addInvisibleSeparator

        private void addInvisibleSeparator​(ActionsCategory category)
      • createSeparator

        private javax.swing.JSeparator createSeparator​(ActionsCategory category)
      • addCategoryHeader

        private boolean addCategoryHeader​(ActionsCategory category)
      • createMenuHeader

        @CheckForNull
        private javax.swing.JComponent createMenuHeader​(@CheckForNull
                                                        java.lang.String headerText,
                                                        @CheckForNull
                                                        javax.swing.Icon icon)
        Create header component for a menu with a given text.
        Parameters:
        headerText - text to add
        Returns:
        header component or null if header text is null