public class JTableProxy extends JScrollPaneProxy
GuiSubitemTestObject
Type | Desciption | Data Class |
---|---|---|
contents | Table Contents | ITestDataTable |
selected | Selected Table Cells | ITestDataTable |
Property | Usage |
---|---|
.class | The Java full class name of the test object. |
.classIndex | The zero-based index of the class relative to the immediate parent in the object map. |
.priorLabel | The text of a preceding label. Suppressed if there is no preceding label. |
accessibleContext.accessibleName | A programmatically defined name for the component. |
name | The name property, suppressed if default formatted (default form = className+count). |
toolTipText | The text from the associated tool tip, omitted if there is no associated tool tip. |
Subitem | Usage |
---|---|
Cell |
Defines the cell to act upon via
Row and
Column
specifications. |
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator
theScrollBar
TAB_INDEX, TAB_TEXT
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, MAX_NAME, NAMEPROPERTY, NAMEPROPERTYWEIGHT, PRIORLABEL, PRIORLABELWEIGHT
LEFT, preDownState, processMouseEventHandler, ROLEINDEX, ROLEINDEXWEIGHT, TESTDATA_SPECIALFRAMESTATE, TESTDATA_SPECIALFRAMESTATE_DESCRIPTION, topLevelWindow
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, TIMEOUTTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
Constructor and Description |
---|
JTableProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects sets the SUT object
as a member variable for the proxy.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addColumnSelectionInterval(int index0,
int index1)
Adds the columns from index0 to index1, inclusive, to the current selection.
|
protected void |
addDataDrivableCommands(ProxyTestObject proxy,
java.util.Vector commands,
int includeChildren) |
protected void |
addRowSelectionInterval(int index0,
int index1)
Adds the rows from index0 to index1, inclusive, to the current selection.
|
boolean |
canBeScrolled()
Returns true if the object is associated with scrollbar(s).
|
protected void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend) |
protected void |
clearSelection()
Deselects all selected columns and rows.
|
protected int |
columnAtPoint(java.awt.Point pt)
This method returns the column index for the column at
the specified Point.
|
protected Cell |
getCell(int columnIndex,
int rowIndex) |
protected Cell |
getCell(java.awt.Point pt) |
protected java.awt.Rectangle |
getCellRectangle(int nColumn,
int nRow)
This method returns the table relative rectangle
for the specified cell.
|
java.lang.String |
getClearscriptSimpleName()
Returns the clearscriptName for required for Manual Test Automation.
|
protected Column |
getColumn(int columnIndex) |
protected Column |
getColumn(java.awt.Point pt) |
protected int |
getColumnCount()
This method returns the number of columns in the table
header component under evaluation.
|
protected java.lang.String |
getColumnHeader(int nColumn)
This method returns the name of the column at the
specified column index.
|
protected java.lang.String |
getColumnName(int nColumn)
This method returns the name of the column at the
specified column index.
|
protected boolean |
getColumnSelectionAllowed()
Returns true<\b> if columns can be selected.
|
MethodSpecification |
getDataDrivableCommand()
This method must be implemented by any proxy that wishes to support
data driving.
|
protected int |
getFirstSelectedRow() |
int[] |
getKeyColumns(int nRow)
This method returns a list of up to three "key" columns
that may be used to determine a row in the table in a
unique fashion.
|
MethodSpecification |
getMethodSpecForPoint(java.awt.Point pt)
Return a MethodSpecification for a method that returns a java.awt.Point
for the specified coordinates.
|
protected javax.swing.table.TableModel |
getModel() |
protected java.lang.String |
getObjectStringAt(int nRow,
int nColumn) |
protected java.lang.String |
getRenderedStringAt(int nRow,
int nColumn) |
protected java.lang.String |
getRenderedStringAt(int nRow,
int nColumn,
boolean checkLength)
This method returns the value in the specified table
cell.
|
java.lang.String |
getRole()
Returns
TestObjectRole.ROLE_TABLE . |
protected Row |
getRow(int rowIndex) |
protected Row |
getRow(java.awt.Point pt) |
protected int |
getRowCount()
This method returns the number of rows in the table
component under evaluation.
|
protected boolean |
getRowSelectionAllowed()
Returns true<\b> if columns can be selected.
|
java.awt.Rectangle |
getScreenRectangle(Subitem subitem)
Returns the rectangle that contains the component being
evaluated relative to the top left corner of the screen.
|
protected int[] |
getSelectedColumns()
Returns the indices of all selected columns.
|
protected int[] |
getSelectedRows()
Returns the indices of all selected rows.
|
java.lang.Object |
getSubitem(Subitem subitem)
Returns an object that represents the specified subitem in the associated
test object.
|
ITestData |
getTestData(java.lang.String testDataType)
Constructs the specified verification data object.
|
protected java.lang.Object |
getTestDataTableAt(int row,
int col,
java.lang.String type,
javax.swing.table.TableModel model) |
java.util.Hashtable |
getTestDataTypes()
Returns a hashtable of data type descriptions of the verification
point data available with the associated object.
|
protected java.lang.Object |
getValueAt(int nRow,
int nColumn)
This method returns the value in the specified table
cell.
|
protected boolean |
isCellEditable(int nColumn,
int nRow)
This method returns TRUE if the specified cell is
read/write and FALSE if the cell is read/only.
|
protected boolean |
isCellSelected(int rowIndex,
int columnIndex)
Returns true if the column at the specified index is selected.
|
protected boolean |
isColumnSelected(int columnIndex)
Returns true if the column at the specified index is selected.
|
protected boolean |
isRowSelected(int rowIndex)
Returns true if the row at the specified index is selected.
|
void |
processSingleMouseEvent(IMouseActionInfo action)
Return a MethodSpecification for the specified mouse event.
|
protected int |
rowAtPoint(java.awt.Point pt)
This method returns the row index for the row at
the specified Point.
|
protected void |
setColumnSelectionInterval(int index0,
int index1)
Selects the columns from index0 to index1, inclusive.
|
protected void |
setRowSelectionInterval(int index0,
int index1)
Selects the rows from index0 to index1, inclusive.
|
void |
setState(com.rational.test.ft.script.Action action)
This method performs a specific action.
|
void |
setState(com.rational.test.ft.script.Action action,
Subitem item)
This method performs a specific action against the subitem.
|
void |
setState(com.rational.test.ft.script.Action action,
Subitem start,
Subitem end)
This method performs a specific action against the subitem
range defined by the specified indices.
|
boolean |
shouldBeMapped()
Returns true for JTableProxy.
|
protected boolean |
testKeysForUniqueness(int row,
int roCol,
int[] roCols,
java.lang.String[] roValues) |
ITestData |
updateTestData(java.lang.String testDataType,
ITestData testData)
Updates the supplied test data object and returns it.
|
click, getAssociateProxy, getClippedRect, getHScroll, getRealTestObject, getScroll, getScrollPaneProxy, getViewport, getVScroll, isPointInObject, isScroll
click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getScreenPoint, getScreenPoint, getTestObjectClassName, hover, hover, hover, hover, mouseMove, mouseMove, mouseMove, mouseMove, nClick, nClickDrag, nClickDrag, nClickDragToScreenPoint, nClickDragToScreenPoint
getBorderTitle, getClippedScreenRectangle, getDescriptiveName, getProperties, getProperty, getStandardProperties, getText, getVisibleRectangle, getVisualClippedRectangle, hasFocus, isOpaque, isType, scrollRectToVisible
childConstructed, getChildAtPoint, getChildProxy, getChildrenEnumeration, getComponentChildren, getElementWithFocus, getEmbeddedBrowsers, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableChildren, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParent2, getParentObject, getScreenRectangle, getTopParent, getWindow, isDopeyDynamicName, isEnabled, isHScroll, isLabelled, isRecognitionProperty, isShowing, isVScroll, setParent
activateTopWindow, click, doubleClick, drag, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScriptCommandFlags, getTopMappableWindow, getTopWindow, hover, invokeMethodOnEDT, isDrag, isPointInObject, modifiersChanged, nClick, processHoverMouseEvent, processMouseEvent, setProcessMouseEventHandler, setTopLevelWindow
addMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMethods, getNonValueProperties, getRecognitionProperties, getRecognitionPropertyWeight, getTestDomain, getTopMappableParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, setIndexer, setProperty
baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction
public JTableProxy(java.lang.Object theObjectInTheSUT)
public java.lang.String getRole()
TestObjectRole.ROLE_TABLE
.getRole
in class JScrollPaneProxy
public boolean shouldBeMapped()
shouldBeMapped
in class JScrollPaneProxy
public java.lang.String getClearscriptSimpleName()
public java.lang.Object getSubitem(Subitem subitem)
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.getSubitem
in class JScrollPaneProxy
subitem
- The subitem to fetch an object for.protected int columnAtPoint(java.awt.Point pt)
pt
- The Header component relative coordinates that
should be used to determine the column index.protected int rowAtPoint(java.awt.Point pt)
pt
- The Table component relative coordinates that
should be used to determine the row index.protected int getColumnCount()
protected int getRowCount()
protected java.lang.String getColumnName(int nColumn)
nColumn
- The column index for which a name
should be created.protected java.lang.String getColumnHeader(int nColumn)
nColumn
- The column index for which a name
should be created.protected java.awt.Rectangle getCellRectangle(int nColumn, int nRow)
nColumn
- The column index to get the table
rectangle for.nRow
- The row index to get the table
rectangle for.protected boolean isCellEditable(int nColumn, int nRow)
nColumn
- The column index to get the cell
state for.nRow
- The row index to get the cell
state for.protected boolean isColumnSelected(int columnIndex)
columnIndex
- the index of the column in the column modelprotected boolean isCellSelected(int rowIndex, int columnIndex)
columnIndex
- the index of the column in the column modelprotected boolean isRowSelected(int rowIndex)
rowIndex
- the index of the rowprotected boolean getColumnSelectionAllowed()
protected boolean getRowSelectionAllowed()
protected int[] getSelectedColumns()
protected int[] getSelectedRows()
protected int getFirstSelectedRow()
protected void clearSelection()
protected void setColumnSelectionInterval(int index0, int index1)
index0
- one end of the interval
index1 the other end of the intervalprotected void addColumnSelectionInterval(int index0, int index1)
index0
- one end of the interval
index1 the other end of the intervalprotected void setRowSelectionInterval(int index0, int index1)
index0
- one end of the interval
index1 the other end of the intervalprotected void addRowSelectionInterval(int index0, int index1)
index0
- one end of the interval
index1 the other end of the intervalprotected void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
protected java.lang.String getRenderedStringAt(int nRow, int nColumn)
protected java.lang.String getRenderedStringAt(int nRow, int nColumn, boolean checkLength)
nColumn
- The column index to get the table
cell image for.nRow
- The row index to get the table
cell image for.checkLength
- The flag to check the lenghtprotected java.lang.Object getValueAt(int nRow, int nColumn)
nColumn
- The column index to get the table
cell image for.nRow
- The row index to get the table
cell image for.protected javax.swing.table.TableModel getModel()
protected java.lang.String getObjectStringAt(int nRow, int nColumn)
protected Cell getCell(java.awt.Point pt)
protected Cell getCell(int columnIndex, int rowIndex)
protected Column getColumn(java.awt.Point pt)
protected Column getColumn(int columnIndex)
protected Row getRow(java.awt.Point pt)
protected Row getRow(int rowIndex)
public int[] getKeyColumns(int nRow)
protected boolean testKeysForUniqueness(int row, int roCol, int[] roCols, java.lang.String[] roValues)
public void setState(com.rational.test.ft.script.Action action)
setState
in class JScrollPaneProxy
action
- The action that should be performed.public void setState(com.rational.test.ft.script.Action action, Subitem item)
setState
in class JScrollPaneProxy
item
- The item to act upon.action
- The action that should be performed.public void setState(com.rational.test.ft.script.Action action, Subitem start, Subitem end)
setState
in class JScrollPaneProxy
start
- The first item to act upon.end
- The last item to act upon.action
- The action that should be performed.public void processSingleMouseEvent(IMouseActionInfo action)
processSingleMouseEvent
in class JavaGuiProxy
action
- The event cache and other mouse state information
for this mouse action.public MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
IGraphical.getScreenPoint
will be returned. However, if a proxy can findgetMethodSpecForPoint
in class JavaGuiProxy
x
- The screen relative x coordinate.y
- The screen relative y coordinate.MethodSpecification
public java.util.Hashtable getTestDataTypes()
String
objects that are used as the VP
type
in the associated test data. The type
is a
simple value that is different from 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.getTestDataTypes
in class JavaProxy
type
/description
pairs
used to describe the verification data available from this
proxy.getTestData(String)
,
com.rational.test.ft.vp.ITestData
public ITestData getTestData(java.lang.String testDataType)
testDataType
parameter is a hashtable key
returned by getTestDataTypes()
.getTestData
in class ProxyTestObject
testDataType
- A test data type supplied by
getTestDataTypes()
.getTestDataTypes()
,
com.rational.test.ft.vp.ITestData
protected java.lang.Object getTestDataTableAt(int row, int col, java.lang.String type, javax.swing.table.TableModel model)
public ITestData updateTestData(java.lang.String testDataType, ITestData testData)
testDataType
parameter is a hashtable key
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.updateTestData
in class ProxyTestObject
testDataType
- A test data type supplied by
getTestDataTypes()
.testData
- The test data base object that requires
updating.testData
passed in with appropriate updates.getTestDataTypes()
,
com.rational.test.ft.vp.ITestData
public java.awt.Rectangle getScreenRectangle(Subitem subitem)
getScreenRectangle
in class JScrollPaneProxy
public boolean canBeScrolled()
canBeScrolled
in class ComponentProxy
public MethodSpecification getDataDrivableCommand()
null
value is returned.getDataDrivableCommand
in interface IDataDriven
getDataDrivableCommand
in class ProxyTestObject
ProxyTestObject.getDataDrivableCommands(int)
protected void addDataDrivableCommands(ProxyTestObject proxy, java.util.Vector commands, int includeChildren)
addDataDrivableCommands
in class ProxyTestObject