Package org.fest.swing.driver
Class JMenuItemLocation
java.lang.Object
org.fest.swing.driver.JMenuItemLocation
Understands the location of a
JMenuItem.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
parentOrInvoker
-
parentPopup
-
inMenuBar
private final boolean inMenuBar
-
-
Constructor Details
-
JMenuItemLocation
Creates a newJMenuItemLocation.Note: This constructor is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this constructor in the EDT.
- Parameters:
menuItem- the targetJMenuItem.
-
-
Method Details
-
inMenuBar
public boolean inMenuBar()- Returns:
trueif theJMenuItemis in aJMenuBar,falseotherwise.
-
isParentAMenu
Indicates whether the parent of theis another menu.JMenuItem- Returns:
trueif the parent of theJMenuItemis another menu,falseotherwise.
-
parentOrInvoker
Returns the parent of, or its invoker (if it is in a pop-up.)JMenuItem- Returns:
- the parent or the invoker of the
JMenuItem.
-
parentPopup
Returns the parent pop-up menu, ornullif theis not in a pop-up.JMenuItem- Returns:
- the parent pop-up menu, or
nullif theJMenuItemis not in a pop-up.
-