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, getChildrenconvertCoords, validateActionCommand, validateComponentgetAlternateAncestor, getAlternateAncestorClassname, getAncestorAgent, getCaption, getClassName, getID, getLevel, getLocalAgentFactory, getName, getProperty, getPropertyNames, getStringData, getSuperClassNames, getText, isShowing, isValid, process, processAncestor, setAlternateAncestor, setAlternateAncestorClassname, setLocalAgentFactorypublic 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 forSAFSExceptionpublic java.lang.Object getSubItemAtIndex(java.lang.Object object,
                                          int index)
                                   throws java.lang.Exception
getSubItemAtIndex in interface LocalSubItemsAgentgetSubItemAtIndex in class ObjectAgentobject - 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.Exceptionpublic 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 LocalAgentgetMatchingPathObject in interface LocalSubItemsAgentgetMatchingPathObject in class ObjectAgentobject - path - to desired subitem using item->subitem->subitem format.java.lang.ExceptionLocalAgent.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 LocalAgentisMatchingPath in interface LocalSubItemsAgentisMatchingPath in class ObjectAgentobject--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.ExceptionLocalAgent.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.