com.rational.test.ft.domain.java.jfc

Class JSliderProxy

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


    public class JSliderProxy
    extends JComponentProxy
    implements com.rational.test.ft.object.interfaces.ISubitem
    Proxy class for javax.swing.JSlider.
    • TestObject interface:
      SubitemTestObject
    • Supported Test Data Types:
      TypeDesciptionData Class
      JSliderValues Slider value properties ITestData


    • 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.
      .labelTextThe ordered set of labels associated with the slider.
      .priorLabelThe text of a preceding label. Suppressed if there is no preceding label.
      accessibleContext.accessibleNameA programmatically defined name for the component.
      labelCountThe number of labels associated with the slider.
      nameThe name property, suppressed if default formatted (default form = className+count).
      orientationInteger value Adjustable.VERTICAL or Adjustable.HORIZONTAL depending on the layout of the component.
      toolTipTextThe text from the associated tool tip, omitted if there is no associated tool tip.

    • Constructor Detail

      • JSliderProxy

        public JSliderProxy(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 TestObject classname, the default JSlider test object.
        Specified by:
        getTestObjectClassName in interface com.rational.test.ft.domain.IProxyBase
        Overrides:
        getTestObjectClassName in class JavaGuiProxy
        Returns:
        The default JSlider test object class full name.
      • getRole

        public java.lang.String getRole()
        Returns TestObjectRole.ROLE_SLIDER.
        Overrides:
        getRole in class JComponentProxy
        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 JComponentProxy
      • getChildrenEnumeration

        public java.util.Enumeration getChildrenEnumeration()
        Return an enumeration of proxies for the children of this object. Return null for JSliderProxy.
        Overrides:
        getChildrenEnumeration in class ComponentProxy
        Returns:
        null
      • getChildren

        public com.rational.test.ft.domain.ProxyTestObject[] getChildren()
        Return null for JSliderProxy.
        Overrides:
        getChildren in class JavaProxy
        Returns:
        null
      • getOrientation

        public int getOrientation()
        Returns the slider's orientation (horizontal or vertical).
        Returns:
        VERTICAL or HORIZONTAL
      • getLabelTable

        protected java.util.Dictionary getLabelTable()
        Return the dictionary of what labels to draw at which values.
        Returns:
        the Dictionary containing labels and where to draw them
      • getLabelAt

        protected java.lang.String getLabelAt(int index)
        Return the text of the label at specified index.
        Parameters:
        index - the index of the label
        Returns:
        the text of the label
      • getMaximum

        protected int getMaximum()
        Returns the maximum value supported by the slider.
        Returns:
        the value of the model's maximum property
      • getMinimum

        protected int getMinimum()
        Returns the minimum value supported by the slider.
        Returns:
        the value of the model's minimum property
      • getMajorTickSpacing

        protected int getMajorTickSpacing()
      • getMinorTickSpacing

        protected int getMinorTickSpacing()
      • setValue

        protected void setValue(int value)
        Set the slider's current value.
      • getValue

        protected int getValue()
        Get the slider's current value.
        Returns:
        the slider's current value.
      • setState

        public void setState(com.rational.test.ft.script.Action action)
        This method performs a specific action against the JSlider.
        Specified by:
        setState in interface com.rational.test.ft.object.interfaces.ISubitem
        Parameters:
        action - The action that should be performed.
      • setState

        public void setState(com.rational.test.ft.script.Action action,
                             com.rational.test.ft.script.Subitem item)
        This method performs a specific action against the subitem at a specified index.
        Specified by:
        setState in interface com.rational.test.ft.object.interfaces.ISubitem
        Parameters:
        item - The item to act upon.
        action - The action that should be performed.
      • setState

        public void setState(com.rational.test.ft.script.Action action,
                             com.rational.test.ft.script.Subitem start,
                             com.rational.test.ft.script.Subitem end)
        This method performs a specific action against the subitem range defined by the specified indices.
        Specified by:
        setState in interface com.rational.test.ft.object.interfaces.ISubitem
        Parameters:
        start - The first item to act upon.
        end - The last item to act upon.
        action - The action that should be performed.
      • 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.
      • 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
      • 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 com.rational.test.ft.domain.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