public class JMenuAgent extends JComponentAgent
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
objectType |
alternateAncestor, alternateAncestorClassname, factory| Constructor and Description |
|---|
JMenuAgent()
Creates a new instance of JMenuAgent
|
| Modifier and Type | Method and Description |
|---|---|
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
public 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 menu or menu item controlpath - the path of the menu item on the menu hierarchyCopyright © SAS Institute. All Rights Reserved.