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

Class JSplitPaneProxy

  • 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.IGraphicalSubitem, com.rational.test.ft.object.interfaces.ISubitem


    public class JSplitPaneProxy
    extends JfcGraphicalSubitemProxy
    implements com.rational.test.ft.object.interfaces.ISubitem
    Proxy class for javax.swing.JSplitPane.
    • TestObject interface:
      GuiSubitemTestObject

    • 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.
      accessibleContext.accessibleNameA programmatically defined name for the component.
      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.

    • Supported Subitems:
      SubitemUsage
      Location Defines the splitter subobject to act upon. Note that only scroll button Location items are supported (these locations refer to the optional one-hit buttons on the splitter).
      position Defines a (pixel) position for the splitter relative to the left (or top if split vertically) side of the pane.

    • Constructor Detail

      • JSplitPaneProxy

        public JSplitPaneProxy(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 JSplitPane test object.
        Specified by:
        getTestObjectClassName in interface com.rational.test.ft.domain.IProxyBase
        Overrides:
        getTestObjectClassName in class JfcGraphicalSubitemProxy
        Returns:
        The default JSplitPane test object class full name.
      • getRole

        public java.lang.String getRole()
        Returns TestObjectRole.ROLE_SPLIT_PANE.
        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
      • getLeftComponent

        protected java.awt.Component getLeftComponent()
        Return the component to the left (or above) the divider.
        Returns:
        the Component displayed in that position
      • getRightComponent

        protected java.awt.Component getRightComponent()
        Return the component to the right (or below) the divider.
        Returns:
        the Component displayed in that position
      • getDivider

        protected java.awt.Container getDivider()
        Return the divider.
        Returns:
        the divider component null<\b> if couldn't find the divider.
      • getOneTouchButtons

        protected void getOneTouchButtons()
      • getOrientation

        protected int getOrientation()
        Returns the split pane's orientation (horizontal or vertical).
        Returns:
        VERTICAL or HORIZONTAL
      • getMaximum

        protected int getMaximum()
        Returns the maximum location of the divider from the look and feel implementation.
        Returns:
        an integer a value for the maximum location or -1 if the UI is null
      • getMinimum

        protected int getMinimum()
        Returns the minimum location of the divider from the look and feel implementation.
        Returns:
        an integer a value for the minimum location or -1 if the UI is null
      • setValue

        public void setValue(int value)
        Set the split pane's current value.
      • getValue

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

        protected int getLastDividerLocation()
      • getScreenRectangle

        public java.awt.Rectangle getScreenRectangle(com.rational.test.ft.script.Subitem subitem)
        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 JfcGraphicalSubitemProxy
        Returns:
        The adjusted rectangle surrounding subitem relative to the screen. null is returned if the subitem is not showing.
      • getScreenPoint

        public java.awt.Point getScreenPoint(com.rational.test.ft.script.Subitem subitem)
        Returns the screen relative point to the center of the supplied subitem.
        Specified by:
        getScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
        Overrides:
        getScreenPoint in class JfcGraphicalSubitemProxy
        Parameters:
        subitem - The subitem the resultant screen point is relative to.
        Returns:
        A screen relative point.
      • setState

        public void setState(com.rational.test.ft.script.Action action)
        This method performs a specific action against the JSplitPane.
        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.
      • drag

        public void drag(com.rational.test.ft.script.MouseModifiers modifiers,
                         com.rational.test.ft.script.Subitem subitem)
        Perform a drag action against the associated TestObject with the supplied set of mouse modifiers. This method is used to simulate drag actions against controls that are typically not sensitive to drag actions.
        Specified by:
        drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
        Overrides:
        drag in class JfcGraphicalSubitemProxy