IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain.java.swt
Class ButtonProxy

java.lang.Object   extended by com.rational.test.ft.sys.RegisteredObject       extended by com.rational.test.ft.domain.ProxyTestObject
          extended by com.rational.test.ft.domain.java.JavaProxy
              extended by com.rational.test.ft.domain.java.JavaGuiProxy
                  extended by com.rational.test.ft.domain.java.swt.ControlProxy
                      extended by com.rational.test.ft.domain.java.swt.ButtonProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IPropertyFilter, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.IToggle, com.rational.test.ft.object.interfaces.IToggleGUI
Direct Known Subclasses:
CoolItemProxy, ToolItemProxy

public class ButtonProxy
extends ControlProxy
implements com.rational.test.ft.object.interfaces.IToggleGUI

This is the proxy class for org.eclipse.swt.widgets.Control.Button.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
ControlProxy.ChildEnumerator, ControlProxy.ImmediateChildEnumerator
 
Field Summary
 
Fields inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, clickArgs, currentMethod, GROUPTEXT, GROUPTEXTWEIGHT, HANDLE, MAPPABLECLASSINDEX, MAPPABLECLASSINDEXWEIGHT, MAX_NAME, predownScreenRect, PRIORLABEL, PRIORLABELWEIGHT, TOOLTIPTEXT, TOOLTIPTEXTWEIGHT
 
Fields inherited from class com.rational.test.ft.domain.java.JavaGuiProxy
LEFT, preDownState, processMouseEventHandler, ROLEINDEX, ROLEINDEXWEIGHT, TESTDATA_SPECIALFRAMESTATE, TESTDATA_SPECIALFRAMESTATE_DESCRIPTION, topLevelWindow
 
Fields inherited from class com.rational.test.ft.domain.java.JavaProxy
debug, uniqueId
 
Fields inherited from class com.rational.test.ft.domain.ProxyTestObject
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, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
 
Fields inherited from class com.rational.test.ft.sys.RegisteredObject
theTestObject
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
ButtonProxy(java.lang.Object theObjectInTheSUT)
          This sole constructor for all proxy objects sets the SUT object as a member variable for the proxy.
 
Method Summary
 void clickToState(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.State state)
          This method performs the necessary mouse actions to attain the desired state for the associated component.
 void clickToState(com.rational.test.ft.script.State state)
          This method performs the necessary mouse actions to attain the desired state for the associated component.
 void deselect()
          This method sets the state of the associated object to NOT_SELECTED.
 void dragToState(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.State state)
          This method performs the necessary mouse actions to attain the desired state for the associated component.
 void dragToState(com.rational.test.ft.script.State state)
          This method performs the necessary mouse actions to attain the desired state for the associated component.
 java.lang.String getDescriptiveName()
          Returns a name that can be used to describe the associated UI object in a script.
 java.lang.String getLabel()
          Returns the Label for the Button object.
 com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
          Return a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates.
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value for a specific property.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_BUTTON.
 com.rational.test.ft.script.State getState()
          This method returns the state of the associated object.
 com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
          This method constructs the specified verification data object.
 java.util.Hashtable getTestDataTypes()
          Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT.
 java.lang.String getTestObjectClassName()
          Return the test object.
 java.lang.String getUniqueId()
          Returns a unique string for the associated object.
 void indeterminate()
          This method sets the state of the associated object to INDETERMINATE.
 void processSingleMouseEvent(IMouseActionInfo action)
          Return a MethodSpecification for the specified mouse event.
 void select()
          This method sets the state of the associated object to SELECTED.
 void setState(com.rational.test.ft.script.State state)
          Set the state of the associated object to the specified state.
 com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType, com.rational.test.ft.vp.ITestData testData)
          This method updates the supplied test data object and returns it.
 
Methods inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
childConstructed, getActionArgs, getChannel, getChildProxy, getChildrenEnumeration, getClippedScreenRectangle, getDefaultActionArgs, getHandle, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParentObject, getReorderedChildren, getScreenRectangle, getStyle, getToolTipText, getTopMappableParent, getTopParent, getVisualClippedRectangle, hasFocus, isEnabled, isGTK, isLabelled, isObjectMoved, isShell, isShowing, processHoverMouseEvent, processPreDownMouseEvent, processPreUpMouseEvent, scrollRectToVisible, setClickArgs, setDownPointArgs, setDrag, setMethodSpecification, setMultiClickAction, setRecordCache
 
Methods inherited from class com.rational.test.ft.domain.java.JavaGuiProxy
activateTopWindow, click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getChildAtPoint, getClippedRect, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, isDrag, isOpaque, isPointInObject, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processMouseEvent, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMapped
 
Methods inherited from class com.rational.test.ft.domain.java.JavaProxy
addMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDomain, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setProperty
 
Methods inherited from class com.rational.test.ft.domain.ProxyTestObject
addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction
 
Methods inherited from class com.rational.test.ft.sys.RegisteredObject
addProxyReference, dereference, getObject, getRegisteredId, getTransactionId, isReferenced, isReleaseRequired, register, registerTransiently, release, toString, unregister
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonProxy

public ButtonProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects sets the SUT object as a member variable for the proxy. All interactions with the supplied object are performed through this class.

Method Detail

getTestObjectClassName

public java.lang.String getTestObjectClassName()
Return the test object. If the test object is a JRadioButton, return the test object implement IToggleGUI.

Specified by:
getTestObjectClassName in interface IProxyBase
Overrides:
getTestObjectClassName in class JavaGuiProxy
Returns:
The stateful test object class full name.

getUniqueId

public java.lang.String getUniqueId()
Returns a unique string for the associated object. This string needs to be identical for each call to this method for the same instance of the UI object. This value must also be as unique as possible.

Overrides:
getUniqueId in class JavaProxy
Returns:
Return a unique and repeatable identifier for the object being evaluated.

getRole

public java.lang.String getRole()
Returns TestObjectRole.ROLE_BUTTON.

Overrides:
getRole in class ControlProxy
Returns:
A brief type name that describes the role this object plays in the UI.
Since:
RFT1.0

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Get the value for a specific property.

Overrides:
getProperty in class ControlProxy
Parameters:
propertyName - The name of the property to fetch.
Returns:
The active value of the specified property for the associated test object.
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.setProperty(String,Object), ProxyTestObject.getRecognitionProperties(), ProxyTestObject.addRecognitionProperty(String,Object,int)

getDescriptiveName

public java.lang.String getDescriptiveName()
Returns a name that can be used to describe the associated UI object in a script. This name may be further adjusted to be made unique to the script, but will act as the base for the name used in the script. Only characters used in Java identifiers should be returned (alphabetic, numeric or underscore characters). Non-identifier characters will cause script compilation failures. An example of what to return may be "OKButton" for a java.awt.Button with the text "OK" on it.

Overrides:
getDescriptiveName in class ControlProxy
Returns:
A descriptive object name.

getLabel

public java.lang.String getLabel()
Returns the Label for the Button object.


processSingleMouseEvent

public void processSingleMouseEvent(IMouseActionInfo action)
Return a MethodSpecification for the specified mouse event. This is the primary record interface for mouse events against a particular control.

Overrides:
processSingleMouseEvent in class JavaGuiProxy
Parameters:
action - The event cache and other mouse state information for this mouse action.
See Also:
MethodSpecification

getMethodSpecForPoint

public com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
Return a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates. By default a method specification for IGraphical.getScreenPoint will be returned. However, if a proxy can find

Overrides:
getMethodSpecForPoint in class JavaGuiProxy
Parameters:
x - The screen relative x coordinate.
y - The screen relative y coordinate.
See Also:
MethodSpecification

clickToState

public void clickToState(com.rational.test.ft.script.State state)
This method performs the necessary mouse actions to attain the desired state for the associated component. If the state of the component is already in the desired state, multiple actions may be performed to reset the state appropriately.

Specified by:
clickToState in interface com.rational.test.ft.object.interfaces.IToggleGUI
Parameters:
state - The desired target state for the associated component.

clickToState

public void clickToState(com.rational.test.ft.script.MouseModifiers modifiers,                          com.rational.test.ft.script.State state)
This method performs the necessary mouse actions to attain the desired state for the associated component. If the state of the component is already in the desired state, multiple actions may be performed to reset the state appropriately.

Specified by:
clickToState in interface com.rational.test.ft.object.interfaces.IToggleGUI
Parameters:
modifiers - The mouse modifiers to be used to attain the desired state.
state - The desired target state for the associated component.

dragToState

public void dragToState(com.rational.test.ft.script.State state)
This method performs the necessary mouse actions to attain the desired state for the associated component. If the state of the component is already in the desired state, multiple actions may be performed to reset the state appropriately.

Specified by:
dragToState in interface com.rational.test.ft.object.interfaces.IToggleGUI
Parameters:
state - The desired target state for the associated component.

dragToState

public void dragToState(com.rational.test.ft.script.MouseModifiers modifiers,                         com.rational.test.ft.script.State state)
This method performs the necessary mouse actions to attain the desired state for the associated component. If the state of the component is already in the desired state, multiple actions may be performed to reset the state appropriately.

Specified by:
dragToState in interface com.rational.test.ft.object.interfaces.IToggleGUI
Parameters:
modifiers - The mouse modifiers to be used to attain the desired state.
state - The desired target state for the associated component.

setState

public void setState(com.rational.test.ft.script.State state)
Set the state of the associated object to the specified state.

Specified by:
setState in interface com.rational.test.ft.object.interfaces.IToggle
See Also:
State

getState

public com.rational.test.ft.script.State getState()
This method returns the state of the associated object.

Specified by:
getState in interface com.rational.test.ft.object.interfaces.IToggle
Returns:
One of the State literals.
See Also:
State

select

public void select()
This method sets the state of the associated object to SELECTED. The UnableToPerformActionException exception will be thrown if this action can not be performed.

Specified by:
select in interface com.rational.test.ft.object.interfaces.IToggle

deselect

public void deselect()
This method sets the state of the associated object to NOT_SELECTED. The UnableToPerformActionException exception will be thrown if this action can not be performed.

Specified by:
deselect in interface com.rational.test.ft.object.interfaces.IToggle

indeterminate

public void indeterminate()
This method sets the state of the associated object to INDETERMINATE. The UnableToPerformActionException exception will be thrown if this action can not be performed.

Specified by:
indeterminate in interface com.rational.test.ft.object.interfaces.IToggle

getTestDataTypes

public java.util.Hashtable getTestDataTypes()
Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT. The hashtable keys are String objects that are used as the VP type in the associated test data. The type is a simple value that is defferent then other type values associated with this object under test. The type keys map to a verbose description of the test data, reasonable for presentation to a user.

Overrides:
getTestDataTypes in class JavaProxy
Returns:
An hashtable of type/description pairs used to describe the verification data available from this proxy.
See Also:
getTestData(String), ITestData

getTestData

public com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
This method constructs the specified verification data object. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes.

Overrides:
getTestData in class ProxyTestObject
Parameters:
testDataType - A test data type supplied by getTestDataTypes.
Returns:
The verification data for the supplied type.
See Also:
getTestDataTypes(), ITestData

updateTestData

public com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType,                                                         com.rational.test.ft.vp.ITestData testData)
This method updates the supplied test data object and returns it. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes. The testData is a previously supplied ITestData object that needs to be updated to reflect the current state of the associated test object.

Overrides:
updateTestData in class ProxyTestObject
Parameters:
testDataType - A test data type supplied by getTestDataTypes.
testData - The test data base object that requires updating.
Returns:
The testData passed in with appropriate updates.
See Also:
getTestDataTypes(), ITestData