public class ControlProxy extends JavaGuiProxy
org.eclipse.swt.widgets.Control.
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. |
| .groupText | The text of a group parent. Only available if parent is a group. Omitted if the group parent has no visible text. |
| .toolTipText | The text from the associated tool tip, omitted if there is no associated tool tip. |
| Modifier and Type | Class and Description |
|---|---|
protected class |
ControlProxy.ChildEnumerator |
protected class |
ControlProxy.ImmediateChildEnumerator |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
childrenEnumerated |
protected static java.lang.String |
CLASSINDEX |
protected static int |
CLASSINDEXWEIGHT |
protected java.util.Vector |
clickArgs |
protected java.lang.String |
currentMethod |
protected static java.lang.String |
GROUPTEXT |
protected static int |
GROUPTEXTWEIGHT |
protected static java.lang.String |
HANDLE |
protected static java.lang.String |
MAPPABLECLASSINDEX |
protected static int |
MAPPABLECLASSINDEXWEIGHT |
protected static int |
MAX_NAME |
protected java.awt.Rectangle |
predownScreenRect |
protected static java.lang.String |
PRIORLABEL |
protected static int |
PRIORLABELWEIGHT |
protected static java.lang.String |
TOOLTIPTEXT |
protected static int |
TOOLTIPTEXTWEIGHT |
LEFT, 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, vomClippedRectangle| Constructor and Description |
|---|
ControlProxy(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 |
|---|---|
void |
childConstructed(com.rational.test.ft.domain.ProxyTestObject child)
Inform the parent when child proxies are constructed so additional recognition
properties can be added when needed.
|
protected java.util.Vector |
getActionArgs(java.awt.Point point) |
com.rational.test.ft.domain.IChannel |
getChannel()
return the channel for the object.
|
protected com.rational.test.ft.domain.ProxyTestObject |
getChildProxy(java.lang.Object childObject) |
java.util.Enumeration |
getChildrenEnumeration()
Return an enumeration of proxies for the children
of this object.
|
java.awt.Rectangle |
getClippedScreenRectangle() |
protected java.util.Vector |
getDefaultActionArgs(java.awt.Point point) |
java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI
object in a script.
|
com.rational.test.ft.domain.ProxyTestObject |
getElementWithFocus()
Return the element with focus
|
long |
getHandle()
Get the value for the handle field.
|
java.util.Enumeration |
getImmediateChildren()
Return an enumeration of proxies for the children of this object.
|
protected java.lang.String |
getLabelText()
Returns the label text associated with an
isLabelled
proxy. |
protected java.lang.String |
getLeadingLabel()
This method is used to generate an interesting descriptive name
for controls without persistent text.
|
java.awt.Point |
getLocationOnScreen()
Return the location on the screen for an swt control
|
com.rational.test.ft.domain.ProxyTestObject |
getMappableParent()
Returns a proxy object for the parent of this object.
|
java.lang.String |
getName()
get the name of the object
|
com.rational.test.ft.domain.ProxyTestObject[] |
getOwnedObjects()
Return an array of proxies for the objects owned
by this object.
|
com.rational.test.ft.domain.ProxyTestObject |
getOwner()
Returns a proxy object for the owner of this object.
|
com.rational.test.ft.domain.ProxyTestObject |
getParent()
Returns a proxy object for the parent of this object.
|
java.lang.Object |
getParentObject()
Returns an object for the parent of this object.
|
java.lang.Object |
getProperty(java.lang.String propertyName)
Get the value for a specific property.
|
protected org.eclipse.swt.widgets.Widget[] |
getReorderedChildren(org.eclipse.swt.widgets.Widget[] children) |
java.lang.String |
getRole()
Returns
TestObjectRole.ROLE_SWT. |
java.awt.Rectangle |
getScreenRectangle()
Returns the rectangle that contains the component being
evaluated relative to the top left corner of the screen.
|
protected int |
getStyle() |
java.lang.String |
getToolTipText()
Returns the control's tool tip text, or null if it has
not been set.
|
com.rational.test.ft.domain.ProxyTestObject |
getTopMappableParent()
Returns a proxy object for the top parent of this object.
|
com.rational.test.ft.domain.ProxyTestObject |
getTopParent()
Returns a proxy object for the top parent of this object.
|
java.awt.Rectangle |
getVisualClippedRectangle() |
boolean |
hasFocus()
The hasFocus method is private in the SWT
world, so this method always returns false.
|
boolean |
isEnabled()
Check the component under evaluation to determine if it is
enabled or disabled.
|
protected boolean |
isGTK()
This method returns true if the application is an SWT/GTK+
application.
|
protected boolean |
isLabelled()
Returns
true if the particular proxy has a label
that can be used as a recognition property for another test object. |
protected boolean |
isObjectMoved(java.awt.Point endPoint) |
protected boolean |
isShell(java.lang.Object theTestObject) |
boolean |
isShowing()
Check the component under evaluation to determine if it is
showing (as apposed to hidden).
|
protected void |
processHoverMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action) |
protected void |
processPreDownMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
Process the Pre-down mouse event and determine what action might
be recorded for this object (if any).
|
protected void |
processPreUpMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
Process the preup event and determine what action should be
recorded for this object (if any).
|
void |
scrollRectToVisible(java.awt.Rectangle rect)
Scrolls the viewport(if there's any) so that Rectangle within the viewport
becomes visible.
|
protected java.util.Vector |
setClickArgs(int modifiers) |
protected java.util.Vector |
setDownPointArgs() |
protected java.util.Vector |
setDrag(com.rational.test.ft.domain.IMouseActionInfo action,
int modifiers,
java.awt.Point firstPoint,
java.awt.Point nthPoint) |
protected void |
setMethodSpecification(com.rational.test.ft.domain.IMouseActionInfo action,
java.lang.String method,
java.util.Vector args,
com.rational.test.ft.script.ScriptCommandFlags flags)
Set the method specification for the action that should be recorded for the current
set of events.
|
protected java.util.Vector |
setMultiClickAction(com.rational.test.ft.domain.IMouseActionInfo action,
int clicks,
int modifiers,
boolean isDrag,
java.awt.Point firstPoint,
java.awt.Point lastPoint) |
protected void |
setRecordCache() |
activateTopWindow, click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getChildAtPoint, getClippedRect, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTestObjectClassName, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, invokeMethodOnEDT, isDrag, isOpaque, isPointInObject, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processMouseEvent, processSingleMouseEvent, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMappedaddMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDataTypes, getTestDomain, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setPropertyaddDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getTestData, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction, updateTestDataprotected static final int MAX_NAME
protected static final java.lang.String CLASSINDEX
protected static final java.lang.String MAPPABLECLASSINDEX
protected static final int MAPPABLECLASSINDEXWEIGHT
protected static final java.lang.String HANDLE
protected static final int CLASSINDEXWEIGHT
protected static final java.lang.String PRIORLABEL
protected static final int PRIORLABELWEIGHT
protected static final java.lang.String GROUPTEXT
protected static final int GROUPTEXTWEIGHT
protected static final java.lang.String TOOLTIPTEXT
protected static final int TOOLTIPTEXTWEIGHT
protected boolean childrenEnumerated
protected java.awt.Rectangle predownScreenRect
protected java.util.Vector clickArgs
protected java.lang.String currentMethod
public ControlProxy(java.lang.Object theObjectInTheSUT)
public java.lang.String getName()
public java.lang.String getDescriptiveName()
getDescriptiveName in class JavaGuiProxypublic java.lang.String getRole()
TestObjectRole.ROLE_SWT.public java.lang.Object getProperty(java.lang.String propertyName)
getProperty in class JavaProxypublic long getHandle()
public java.lang.String getToolTipText()
public boolean isShowing()
isShowing in interface com.rational.test.ft.object.interfaces.IGraphicalisShowing in class JavaGuiProxypublic boolean isEnabled()
isEnabled in interface com.rational.test.ft.object.interfaces.IGraphicalisEnabled in class JavaGuiProxypublic boolean hasFocus()
hasFocus in interface com.rational.test.ft.object.interfaces.IGraphicalhasFocus in class JavaGuiProxypublic java.awt.Rectangle getScreenRectangle()
getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalgetScreenRectangle in class JavaGuiProxypublic java.awt.Rectangle getClippedScreenRectangle()
getClippedScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalgetClippedScreenRectangle in class JavaGuiProxypublic java.awt.Rectangle getVisualClippedRectangle()
getVisualClippedRectangle in class com.rational.test.ft.domain.ProxyTestObjectpublic java.awt.Point getLocationOnScreen()
public com.rational.test.ft.domain.ProxyTestObject getParent()
getParent in class JavaGuiProxypublic java.lang.Object getParentObject()
getParentObject in class JavaGuiProxyprotected boolean isShell(java.lang.Object theTestObject)
public com.rational.test.ft.domain.ProxyTestObject getMappableParent()
getMappableParent in class JavaGuiProxypublic com.rational.test.ft.domain.ProxyTestObject getTopParent()
getTopParent in class JavaProxypublic com.rational.test.ft.domain.ProxyTestObject getTopMappableParent()
getTopMappableParent in class JavaProxyprotected com.rational.test.ft.domain.ProxyTestObject getChildProxy(java.lang.Object childObject)
public java.util.Enumeration getChildrenEnumeration()
getChildrenEnumeration in class JavaGuiProxypublic java.util.Enumeration getImmediateChildren()
getImmediateChildren in class JavaGuiProxyprotected org.eclipse.swt.widgets.Widget[] getReorderedChildren(org.eclipse.swt.widgets.Widget[] children)
public void childConstructed(com.rational.test.ft.domain.ProxyTestObject child)
childConstructed in class JavaProxychild - The child proxy that was just constructed.protected int getStyle()
public com.rational.test.ft.domain.ProxyTestObject getOwner()
public com.rational.test.ft.domain.ProxyTestObject[] getOwnedObjects()
getOwnedObjects in class JavaProxyprotected java.lang.String getLeadingLabel()
protected boolean isLabelled()
true if the particular proxy has a label
that can be used as a recognition property for another test object.true if the particular proxy has a label that can be used
as a recognition property for another test object.getChildrenEnumeration(),
getLabelText()protected java.lang.String getLabelText()
isLabelled
proxy. This text is used to recognize siblings in the test object finds. This
method is only called if the proxy has reported itself as isLabelled().isLabelled proxy.getChildrenEnumeration(),
isLabelled()public com.rational.test.ft.domain.IChannel getChannel()
getChannel in interface com.rational.test.ft.domain.IChannelObjectgetChannel in class com.rational.test.ft.domain.ProxyTestObjectprotected boolean isGTK()
protected void processPreDownMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
action - recorder supplied ActionInfoprotected void processPreUpMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
action - recorder supplied ActionInfoprotected void processHoverMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
processHoverMouseEvent in class JavaGuiProxyprotected void setRecordCache()
protected java.util.Vector setClickArgs(int modifiers)
protected void setMethodSpecification(com.rational.test.ft.domain.IMouseActionInfo action,
java.lang.String method,
java.util.Vector args,
com.rational.test.ft.script.ScriptCommandFlags flags)
action - method - name of method.args - List of arguments to be recorded for the the methodflags - required script command flags to be recorded.protected java.util.Vector setDownPointArgs()
protected boolean isObjectMoved(java.awt.Point endPoint)
protected java.util.Vector setDrag(com.rational.test.ft.domain.IMouseActionInfo action,
int modifiers,
java.awt.Point firstPoint,
java.awt.Point nthPoint)
protected java.util.Vector setMultiClickAction(com.rational.test.ft.domain.IMouseActionInfo action,
int clicks,
int modifiers,
boolean isDrag,
java.awt.Point firstPoint,
java.awt.Point lastPoint)
protected java.util.Vector getDefaultActionArgs(java.awt.Point point)
protected java.util.Vector getActionArgs(java.awt.Point point)
public void scrollRectToVisible(java.awt.Rectangle rect)
scrollRectToVisible in class JavaGuiProxypublic com.rational.test.ft.domain.ProxyTestObject getElementWithFocus()
getElementWithFocus in class com.rational.test.ft.domain.ProxyTestObject