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

Class SpinnerProxy

  • All Implemented Interfaces:
    com.rational.test.ft.domain.IChannelObject, com.rational.test.ft.domain.IDataDriven, com.rational.test.ft.domain.IProxyBase, IPropertyFilter, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.IGraphicalSubitem


    public class SpinnerProxy
    extends SwtGraphicalSubitemProxy
    This is the proxy class for org.eclipse.swt.widgets.Spinner.
    • TestObject interface:
      GuiTestObject

    • Default Recognition Properties:
      PropertyUsage
      .classThe Java full class name of the test object.
      .classIndexThe zero-based index of the class relative to the immediate parent in the object map.
      .priorLabelThe text of a preceding label. Suppressed if there is no preceding label.
      .groupTextThe text of a group parent. Only available if parent is a group. Omitted if the group parent has no visible text.
      .toolTipTextThe text from the associated tool tip, omitted if there is no associated tool tip.

    • Constructor Detail

      • SpinnerProxy

        public SpinnerProxy(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

      • getRole

        public java.lang.String getRole()
        Returns TestObjectRole.ROLE_SPINNER.
        Overrides:
        getRole in class ControlProxy
        Returns:
        A brief type name that describes the role this object plays in the UI.
        Since:
        RFT1.0
      • getTestObjectClassName

        public java.lang.String getTestObjectClassName()
        Return the test object that implements IGraphicalSubitem.
        Specified by:
        getTestObjectClassName in interface com.rational.test.ft.domain.IProxyBase
        Overrides:
        getTestObjectClassName in class SwtGraphicalSubitemProxy
        Returns:
        The stateful test object class full name.
      • getIncrement

        protected int getIncrement()
        Returns the maximum value supported by the Scale.
        Returns:
        the value of the model's maximum property
      • getValue

        protected int getValue()
        Get the Spinner's current value.
        Returns:
        the Spinner's current value.
      • getDigits

        protected int getDigits()
        Get the Spinner's number of digits after decimal point .
        Returns:
        the Spinner's number of digits after decimal point.
      • setValue

        protected void setValue(int value)
        Set the Spinner's current value.
      • 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 com.rational.test.ft.domain.ProxyTestObject
        Parameters:
        testDataType - A test data type supplied by getTestDataTypes.
        Returns:
        The verification data for the supplied type.
        See Also:
        getTestDataTypes(), ITestData
      • setText

        public void setText(java.lang.String text)
      • getDataDrivableCommand

        public com.rational.test.ft.sys.MethodSpecification getDataDrivableCommand()
        This method must be implemented by any proxy that wishes to support data driving. By default a null value is returned.
        Specified by:
        getDataDrivableCommand in interface com.rational.test.ft.domain.IDataDriven
        Overrides:
        getDataDrivableCommand in class com.rational.test.ft.domain.ProxyTestObject
        Since:
        RFT2.0
        See Also:
        ProxyTestObject.getDataDrivableCommands(int)
      • 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
      • getScreenRectangle

        public java.awt.Rectangle getScreenRectangle(com.rational.test.ft.script.Subitem subitem)
        Description copied from class: SwtGraphicalSubitemProxy
        Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen. This will commonly be two operations (getScreenRectangle for the parent object and then adjusting for the specified subitem) combined into a single operation. The rectangle is exposed so that actions may be directly scripted against a visible subitem. null is returned if the subitem is not showing.
        Specified by:
        getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
        Specified by:
        getScreenRectangle in class SwtGraphicalSubitemProxy
        Returns:
        The adjusted rectangle surrounding subitem relative to the screen. null is returned if the subitem is not showing.
      • processSingleMouseEvent

        public void processSingleMouseEvent(com.rational.test.ft.domain.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.