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:
true
if theJMenuItem
is in aJMenuBar
,false
otherwise.
-
isParentAMenu
Indicates whether the parent of the
is another menu.JMenuItem
- Returns:
true
if the parent of theJMenuItem
is another menu,false
otherwise.
-
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, ornull
if the
is not in a pop-up.JMenuItem
- Returns:
- the parent pop-up menu, or
null
if theJMenuItem
is not in a pop-up.
-