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, topLevelWindow
BROWSERTABTESTOBJECT_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
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
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(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) |
IChannel |
getChannel()
return the channel for the object.
|
protected 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.
|
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
|
ProxyTestObject |
getMappableParent()
Returns a proxy object for the parent of this object.
|
java.lang.String |
getName()
get the name of the object
|
ProxyTestObject[] |
getOwnedObjects()
Return an array of proxies for the objects owned
by this object.
|
ProxyTestObject |
getOwner()
Returns a proxy object for the owner of this object.
|
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.
|
ProxyTestObject |
getTopMappableParent()
Returns a proxy object for the top parent of this object.
|
ProxyTestObject |
getTopParent()
Returns a proxy object for the top parent of this object.
|
java.awt.Rectangle |
getVisualClippedRectangle()
The optimized way to obtain the ClippedRectangle.
|
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(IMouseActionInfo action) |
protected void |
processPreDownMouseEvent(IMouseActionInfo action)
Process the Pre-down mouse event and determine what action might
be recorded for this object (if any).
|
protected void |
processPreUpMouseEvent(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(IMouseActionInfo action,
int modifiers,
java.awt.Point firstPoint,
java.awt.Point nthPoint) |
protected void |
setMethodSpecification(IMouseActionInfo action,
java.lang.String method,
java.util.Vector args,
ScriptCommandFlags flags)
Set the method specification for the action that should be recorded for the current
set of events.
|
protected java.util.Vector |
setMultiClickAction(IMouseActionInfo action,
int clicks,
int modifiers,
boolean isDrag,
java.awt.Point firstPoint,
java.awt.Point lastPoint) |
protected void |
setRecordCache() |
activateTopWindow, click, click, click, 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, shouldBeMapped
addMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDataTypes, getTestDomain, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setProperty
addDataDrivableCommands, 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, updateTestData
protected 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 JavaGuiProxy
public java.lang.String getRole()
TestObjectRole.ROLE_SWT
.public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in class JavaProxy
propertyName
- The name of the property to fetch.ProxyTestObject.getProperties()
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getRecognitionProperties()
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public long getHandle()
public java.lang.String getToolTipText()
public boolean isShowing()
isShowing
in class JavaGuiProxy
public boolean isEnabled()
isEnabled
in class JavaGuiProxy
public boolean hasFocus()
hasFocus
in class JavaGuiProxy
public java.awt.Rectangle getScreenRectangle()
getScreenRectangle
in class JavaGuiProxy
public java.awt.Rectangle getClippedScreenRectangle()
getClippedScreenRectangle
in class JavaGuiProxy
public java.awt.Rectangle getVisualClippedRectangle()
ProxyTestObject
getVisualClippedRectangle
in class ProxyTestObject
public java.awt.Point getLocationOnScreen()
public ProxyTestObject getParent()
getParent
in class JavaGuiProxy
public java.lang.Object getParentObject()
getParentObject
in class JavaGuiProxy
protected boolean isShell(java.lang.Object theTestObject)
public ProxyTestObject getMappableParent()
getMappableParent
in class JavaGuiProxy
public ProxyTestObject getTopParent()
getTopParent
in class JavaProxy
public ProxyTestObject getTopMappableParent()
getTopMappableParent
in class JavaProxy
protected ProxyTestObject getChildProxy(java.lang.Object childObject)
public java.util.Enumeration getChildrenEnumeration()
getChildrenEnumeration
in class JavaGuiProxy
public java.util.Enumeration getImmediateChildren()
getImmediateChildren
in class JavaGuiProxy
protected org.eclipse.swt.widgets.Widget[] getReorderedChildren(org.eclipse.swt.widgets.Widget[] children)
public void childConstructed(ProxyTestObject child)
childConstructed
in class JavaProxy
child
- The child proxy that was just constructed.protected int getStyle()
public ProxyTestObject getOwner()
public ProxyTestObject[] getOwnedObjects()
getOwnedObjects
in class JavaProxy
protected 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 IChannel getChannel()
getChannel
in class ProxyTestObject
protected boolean isGTK()
protected void processPreDownMouseEvent(IMouseActionInfo action)
action
- recorder supplied ActionInfoprotected void processPreUpMouseEvent(IMouseActionInfo action)
action
- recorder supplied ActionInfoprotected void processHoverMouseEvent(IMouseActionInfo action)
processHoverMouseEvent
in class JavaGuiProxy
protected void setRecordCache()
protected java.util.Vector setClickArgs(int modifiers)
protected void setMethodSpecification(IMouseActionInfo action, java.lang.String method, java.util.Vector args, 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(IMouseActionInfo action, int modifiers, java.awt.Point firstPoint, java.awt.Point nthPoint)
protected java.util.Vector setMultiClickAction(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 JavaGuiProxy
public ProxyTestObject getElementWithFocus()
getElementWithFocus
in class ProxyTestObject