public class JMenuBarAgent extends JComponentAgent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
objectType |
alternateAncestor, alternateAncestorClassname, factory
Constructor and Description |
---|
JMenuBarAgent()
Constructor for JMenuBarAgent.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doClick(javax.swing.JMenuBar bar,
java.lang.String path,
int pressTime)
does a click operation on the menu item relevant to the path
|
java.lang.Object |
getMatchingPathObject(java.lang.Object object,
java.lang.String path)
Return the subitem at the specified string path from the given object.
|
java.lang.Object |
getSubItemAtIndex(java.lang.Object object,
int index)
Return the subitem at the specified index from the given object.
|
boolean |
isMatchingPath(java.lang.Object object,
java.lang.String path)
Determine if the object contains a subitem/object identified
by the provided Path.
|
protected java.lang.Object |
traverseMenu(java.lang.Object object,
java.lang.String path)
returns a menu item control according to the path
|
getChildCount, getChildren
convertCoords, validateActionCommand, validateComponent
getAlternateAncestor, getAlternateAncestorClassname, getAncestorAgent, getCaption, getClassName, getID, getLevel, getLocalAgentFactory, getName, getProperty, getPropertyNames, getStringData, getSuperClassNames, getText, isShowing, isValid, process, processAncestor, setAlternateAncestor, setAlternateAncestorClassname, setLocalAgentFactory
public static final java.lang.String objectType
protected void doClick(javax.swing.JMenuBar bar, java.lang.String path, int pressTime) throws SAFSException
bar
- the Swing menubar controlpath
- the menu path stringpressTime
- the time to press the menu buttons forSAFSException
public java.lang.Object getSubItemAtIndex(java.lang.Object object, int index) throws java.lang.Exception
getSubItemAtIndex
in interface LocalSubItemsAgent
getSubItemAtIndex
in class ObjectAgent
object
- reference from which to locate the subitem.index
- of the subitem to retrieve.an
- Exception if the subitem index is invalid or subitem is unobtainable.java.lang.Exception
public java.lang.Object getMatchingPathObject(java.lang.Object object, java.lang.String path) throws java.lang.Exception
Ex:
File->Exit
Root->Branch->Leaf
getMatchingPathObject
in interface LocalAgent
getMatchingPathObject
in interface LocalSubItemsAgent
getMatchingPathObject
in class ObjectAgent
object
- path
- to desired subitem using item->subitem->subitem format.java.lang.Exception
LocalAgent.getMatchingPathObject(Object, String)
public boolean isMatchingPath(java.lang.Object object, java.lang.String path) throws java.lang.Exception
Ex:
File->Exit
Root->Branch->Leaf
isMatchingPath
in interface LocalAgent
isMatchingPath
in interface LocalSubItemsAgent
isMatchingPath
in class ObjectAgent
object--Object
- proxy for the object to be evaluated.path
- information to locate another object or subitem relative to object.
this is usually something like a menuitem or tree node where supported.java.lang.Exception
LocalAgent.isMatchingPath(Object, String)
protected java.lang.Object traverseMenu(java.lang.Object object, java.lang.String path)
object
- a menubar, a menu or a menu item controlpath
- the path of the menu item on the menu hierarchyCopyright © SAS Institute. All Rights Reserved.