Package com.nomagic.actions
Class ActionsMenuCreator.AMC_ActionsVisitor
- java.lang.Object
 - 
- com.nomagic.actions.ActionsMenuCreator.AMC_ActionsVisitor
 
 
- 
- All Implemented Interfaces:
 ActionsVisitor
- Enclosing class:
 - ActionsMenuCreator
 
protected class ActionsMenuCreator.AMC_ActionsVisitor extends java.lang.Object implements ActionsVisitor
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAMC_ActionsVisitor() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanaddCategoryHeader(ActionsCategory category)private voidaddInvisibleSeparator(ActionsCategory category)private javax.swing.JComponentcreateMenuHeader(java.lang.String headerText, javax.swing.Icon icon)Create header component for a menu with a given text.private javax.swing.JSeparatorcreateSeparator(ActionsCategory category)private ActionsMenuCreator.MutableActionListenerfindListener(java.util.Collection<ActionsMenuCreator.MutableActionListener> mutableListeners, java.awt.Container menu, ActionsCategory category)private booleanisEmpty(ActionsCategory category)Check if this category is empty recursively - contains no actions or contains only empty other categoriesprivate booleanisLastComponentVisibleSeparator()voidvisit(ActionsCategory category)Visits ActionsCategory.voidvisit(NMAction action)Visits action.voidvisit(NMStateAction action)Visits NMStateAction. 
 - 
 
- 
- 
Method Detail
- 
visit
public void visit(ActionsCategory category)
Description copied from interface:ActionsVisitorVisits ActionsCategory.- Specified by:
 visitin interfaceActionsVisitor- Parameters:
 category- the category to visit.
 
- 
visit
public void visit(NMAction action)
Description copied from interface:ActionsVisitorVisits action.- Specified by:
 visitin interfaceActionsVisitor- Parameters:
 action- the action to visit.
 
- 
visit
public void visit(NMStateAction action)
Description copied from interface:ActionsVisitorVisits NMStateAction.- Specified by:
 visitin interfaceActionsVisitor- Parameters:
 action- the action to visit.
 
- 
findListener
@CheckForNull private ActionsMenuCreator.MutableActionListener findListener(java.util.Collection<ActionsMenuCreator.MutableActionListener> mutableListeners, java.awt.Container menu, ActionsCategory category)
 
- 
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
 
 
 - 
 
 -