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

Class JTableHeaderProxy

  • All Implemented Interfaces:
    com.ibm.rational.test.ft.clearscript.IClearscript, 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


    public class JTableHeaderProxy
    extends JfcGraphicalSubitemProxy
    implements com.ibm.rational.test.ft.clearscript.IClearscript
    Proxy class for javax.swing.table.JTableHeader.
    • TestObject interface:
      GuiSubitemTestObject
    • Supported Test Data Types:
      TypeDesciptionData Class
      TableHeader TableHeader Names ITestDataList


    • 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.
      accessibleContext.accessibleNameA programmatically defined name for the component.
      nameThe name property, suppressed if default formatted (default form = className+count).
      toolTipTextThe text from the associated tool tip, omitted if there is no associated tool tip.

    • Supported Subitems:
      SubitemUsage
      Column Defines the column to act upon via text or zero-based index.

    • Constructor Detail

      • JTableHeaderProxy

        public JTableHeaderProxy(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_TABLE_HEADER.
        Overrides:
        getRole in class JComponentProxy
        Returns:
        A brief type name that describes the role this object plays in the UI.
        Since:
        RFT1.0
      • getClearscriptSimpleName

        public java.lang.String getClearscriptSimpleName()
        Returns the clearscriptName for required for Manual Test Automation. Since table won't be having meaningful name, we name the label with coulmn names.
        Specified by:
        getClearscriptSimpleName in interface com.ibm.rational.test.ft.clearscript.IClearscript
        Returns:
        Table column header values.
      • getSubitem

        public java.lang.Object getSubitem(com.rational.test.ft.script.Subitem subitem)
        Returns an object that represents the specified subitem in the associated test object. SubitemNotFoundException will be thrown if the specified subitem is invalid relative to the associated test object. null may be returned if the subitem does not have an object association that can be returned.
        Specified by:
        getSubitem in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
        Overrides:
        getSubitem in class JfcGraphicalSubitemProxy
        Parameters:
        subitem - The subitem to fetch an object for.
        Returns:
        An object representation of the subitem.
      • getColumnModel

        protected javax.swing.table.TableColumnModel getColumnModel()
        Returns the data model that holds the list of items displayed by the JTableHeader component.
        Returns:
        the ColumnModel that provides the displayed list of items
      • getTable

        protected javax.swing.JTable getTable()
        Returns the header's partner table
        Returns:
        the header's partner table
      • columnAtPoint

        public int columnAtPoint(java.awt.Point pt)
        This method returns the column index for the column at the specified Point. The supplied point is the Header relative location and NOT the screen relative location. If the appropriate column can not be determined then a negative one (-1) should be returned to indicate that the column could not be determined.
        Parameters:
        pt - The Header component relative coordinates that should be used to determine the column index.
        Returns:
        The column index at the specified point or -1 if the column can not be determined.
      • getColumnCount

        public int getColumnCount()
        This method returns the number of columns in the table header component under evaluation.
        Returns:
        The column count, zero if the count can not be determined.
      • getColumnName

        public java.lang.String getColumnName(int nColumn)
        This method returns the name of the column at the specified column index. This is typically the title of the column, but may be an icon description or other value that uniquely identifies the column. If the column does not have name then null or "" should be returned. Note, that without a name to identify a column the column index will be used in it's place.
        Parameters:
        nColumn - The column index for which a name should be created.
        Returns:
        The title (or other name) for the column at nColumn index into the table header.
      • getColumnSelectionAllowed

        public boolean getColumnSelectionAllowed()
        Returns true<\b> if columns can be selected.
        Returns:
        true<\b> if columns can be selected, otherwise false<\b>
      • getColumn

        public com.rational.test.ft.script.Column getColumn(java.awt.Point pt)
        This method returns the Subitem at the specified point.
        Parameters:
        pt - the point on the screen
        Returns:
        the Column subitem
      • getHeaderRect

        public java.awt.Rectangle getHeaderRect(int column)
        Returns the rectangle containing the header tile at column. When the column parameter is out of bounds this method uses the same conventions as the JTable method getCellRect.
        Returns:
        the rectangle containing the header tile at column
      • 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.
      • 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)
        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.
      • 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
      • drag

        public void drag(com.rational.test.ft.script.MouseModifiers modifiers,
                         com.rational.test.ft.script.Subitem subitem1,
                         java.awt.Point pt1,
                         com.rational.test.ft.script.Subitem subitem2,
                         java.awt.Point pt2)
        Perform a drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates relative to this TestObject.
        Specified by:
        drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
        Overrides:
        drag in class JfcGraphicalSubitemProxy