public class JComponentProxy extends ComponentProxy
GuiTestObject
| Property | Usage |
|---|---|
| .class | The Java full class name of the test object. |
| .classIndex | The zero-based index of the class relative to the immediate parent in the object map. |
| .priorLabel | The text of a preceding label. Suppressed if there is no preceding label. |
| accessibleContext.accessibleName | A programmatically defined name for the component. |
| name | The name property, suppressed if default formatted (default form = className+count). |
| toolTipText | The text from the associated tool tip, omitted if there is no associated tool tip. |
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAB_INDEX |
static java.lang.String |
TAB_TEXT |
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, MAX_NAME, NAMEPROPERTY, NAMEPROPERTYWEIGHT, PRIORLABEL, PRIORLABELWEIGHTLEFT, preDownState, processMouseEventHandler, ROLEINDEX, ROLEINDEXWEIGHT, TESTDATA_SPECIALFRAMESTATE, TESTDATA_SPECIALFRAMESTATE_DESCRIPTION, topLevelWindowBROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TIMEOUTTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangleINCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS| Constructor and Description |
|---|
JComponentProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects sets the SUT object
as a member variable for the proxy.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBorderTitle() |
java.awt.Rectangle |
getClippedRect(java.awt.Rectangle childRect) |
java.awt.Rectangle |
getClippedScreenRectangle() |
java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI
object in a script.
|
java.util.Hashtable |
getProperties()
Returns a complete set of properties for the associated
test object.
|
java.lang.Object |
getProperty(java.lang.String propertyName)
Get the value for a specific property.
|
java.lang.String |
getRole()
Returns
TestObjectRole.ROLE_JFC. |
java.util.Hashtable |
getStandardProperties()
For Java, the definition for standard properties is the same
as
getProperties(). |
java.lang.String |
getText(java.lang.Object comp)
Returns a String when there's text on the object.
|
protected java.awt.Rectangle |
getVisibleRectangle() |
java.awt.Rectangle |
getVisualClippedRectangle()
The optimized way to obtain the ClippedRectangle.
|
boolean |
hasFocus()
Return true if this component has input focus.
|
boolean |
isOpaque()
Check the component under evaluation to determine if it is
opaque or transparent.
|
boolean |
isPointInObject(java.awt.Point pt)
Determines if the specified screen relative point is
contained in the component under evaluation.
|
boolean |
isType(java.lang.Object comp,
java.lang.String strType) |
void |
scrollRectToVisible(java.awt.Rectangle rect)
Scrolls the viewport(if there's any) so that Rectangle within the viewport
becomes visible.
|
canBeScrolled, childConstructed, getChildAtPoint, getChildProxy, getChildrenEnumeration, getComponentChildren, getElementWithFocus, getEmbeddedBrowsers, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableChildren, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParent2, getParentObject, getScreenRectangle, getTopParent, getWindow, isDopeyDynamicName, isEnabled, isHScroll, isLabelled, isRecognitionProperty, isShowing, isVScroll, setParentactivateTopWindow, click, click, click, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTestObjectClassName, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, invokeMethodOnEDT, isDrag, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processHoverMouseEvent, processMouseEvent, processSingleMouseEvent, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMappedaddMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMethods, getNonValueProperties, getRecognitionProperties, getRecognitionPropertyWeight, getTestDataTypes, getTestDomain, getTopMappableParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, setIndexer, setPropertyaddDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getTestData, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction, updateTestDatapublic static final java.lang.String TAB_TEXT
public static final java.lang.String TAB_INDEX
public JComponentProxy(java.lang.Object theObjectInTheSUT)
public boolean hasFocus()
hasFocus in class ComponentProxypublic boolean isOpaque()
isOpaque in class ComponentProxypublic java.lang.String getDescriptiveName()
getDescriptiveName in class ComponentProxypublic java.lang.String getRole()
TestObjectRole.ROLE_JFC.getRole in class ComponentProxypublic java.lang.Object getProperty(java.lang.String propertyName)
getProperty in class ComponentProxypropertyName - The name of the property to fetch.ProxyTestObject.getProperties(),
ProxyTestObject.setProperty(String,Object),
ProxyTestObject.getRecognitionProperties(),
ProxyTestObject.addRecognitionProperty(String,Object,int)public java.awt.Rectangle getClippedScreenRectangle()
getClippedScreenRectangle in class JavaGuiProxypublic java.awt.Rectangle getVisualClippedRectangle()
ProxyTestObjectgetVisualClippedRectangle in class ProxyTestObjectpublic java.awt.Rectangle getClippedRect(java.awt.Rectangle childRect)
getClippedRect in class ComponentProxypublic boolean isPointInObject(java.awt.Point pt)
This functionality is performed by the proxy due to potentially
unusual aspects associated with functionality. While typically
the getScreenRectangle is
used to resolve this query, there are situations for which this
is not accurate. For instance if the clickable region on a
button is not rectangular, just checking if the point is in
the rectangle is not be valid.
isPointInObject in class JavaGuiProxypt - Screen relative point to check.ComponentProxy.getScreenRectangle()public boolean isType(java.lang.Object comp,
java.lang.String strType)
public java.lang.String getText(java.lang.Object comp)
comp - an Objectpublic void scrollRectToVisible(java.awt.Rectangle rect)
scrollRectToVisible in class JavaGuiProxyprotected java.awt.Rectangle getVisibleRectangle()
public java.lang.String getBorderTitle()
public java.util.Hashtable getProperties()
ProxyTestObject
This method does not return properties whose values are references
to objects. The method ProxyTestObject.getNonValueProperties() returns
information about such properties.
getProperties in class JavaProxyProxyTestObject.getProperty(String),
ProxyTestObject.setProperty(String,Object),
ProxyTestObject.getStandardProperties(),
ProxyTestObject.getNonValueProperties()public java.util.Hashtable getStandardProperties()
JavaProxygetProperties().getStandardProperties in class JavaProxyJavaProxy.getProperties()