public class JTable extends JComponent
Modifier | Constructor and Description |
---|---|
protected |
JTable(JtfObjectHandle handle,
Desktop desktop)
Creates a new JTable with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSelection()
Deselects all selected columns and rows.
|
void |
clickCell(int row,
int columnIndex)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
int columnIndex,
int button)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
int columnIndex,
int button,
Point position)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
int columnIndex,
int button,
Point position,
ModifierKey modifiers)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
ItemIdentifier column)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
ItemIdentifier column,
int button)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
ItemIdentifier column,
int button,
Point position)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
ItemIdentifier column,
int button,
Point position,
ModifierKey modifiers)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
String columnText)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
String columnText,
int button)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
String columnText,
int button,
Point position)
Clicks the specified cell in the table.
|
void |
clickCell(int row,
String columnText,
int button,
Point position,
ModifierKey modifiers)
Clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
int columnIndex)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
int columnIndex,
int button)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
int columnIndex,
int button,
Point position)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
int columnIndex,
int button,
Point position,
ModifierKey modifiers)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
ItemIdentifier column)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
ItemIdentifier column,
int button)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
ItemIdentifier column,
int button,
Point position)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
ItemIdentifier column,
int button,
Point position,
ModifierKey modifiers)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
String columnText)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
String columnText,
int button)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
String columnText,
int button,
Point position)
Double-clicks the specified cell in the table.
|
void |
doubleClickCell(int row,
String columnText,
int button,
Point position,
ModifierKey modifiers)
Double-clicks the specified cell in the table.
|
List<Integer> |
findCell(String text)
Returns the cell containing the specified text.
|
List<List<String>> |
getAllCellTexts()
Gets the text values of all cells in the table.
|
List<List<Object>> |
getAllCellValues()
Gets the values of all cells in the table.
|
String |
getCellText(int row,
int columnIndex)
Returns the cell text.
|
String |
getCellText(int row,
ItemIdentifier column)
Returns the cell text.
|
String |
getCellText(int row,
String columnText)
Returns the cell text.
|
Object |
getCellValue(int row,
int columnIndex)
Returns the cell value.
|
Object |
getCellValue(int row,
ItemIdentifier column)
Returns the cell value.
|
Object |
getCellValue(int row,
String columnText)
Returns the cell value.
|
int |
getColumnCount()
Gets the number of columns in the table.
|
String |
getColumnName(int column)
Returns the name of the column at the specified index.
|
ItemIdentifier |
getEditingColumn()
Gets the name or index of the column that contains the cell currently being edited.
|
int |
getEditingRow()
Gets the index of the row that contains the cell currently being edited.
|
int |
getRowCount()
Gets the number of rows that can be shown in the table.
|
ItemIdentifier |
getSelectedColumn()
Gets the index or name of the selected column.
|
List<ItemIdentifier> |
getSelectedColumns()
Gets the list of indices of all selected columns.
|
int |
getSelectedRow()
Gets the index of the selected row, -1 (4Test: 0) is returned if no row is selected.
|
List<Integer> |
getSelectedRows()
Gets the list of indices of all selected rows.
|
boolean |
isCellEditable(int row,
int columnIndex)
Returns true if the specified cell is editable.
|
boolean |
isCellEditable(int row,
ItemIdentifier column)
Returns true if the specified cell is editable.
|
boolean |
isCellEditable(int row,
String columnText)
Returns true if the specified cell is editable.
|
boolean |
isCellSelected(int row,
int columnIndex)
Returns true if the specified cell is selected; otherwise false.
|
boolean |
isCellSelected(int row,
ItemIdentifier column)
Returns true if the specified cell is selected; otherwise false.
|
boolean |
isCellSelected(int row,
String columnText)
Returns true if the specified cell is selected; otherwise false.
|
boolean |
isColumnSelected(int columnIndex)
Returns true if the specified column is selected.
|
boolean |
isColumnSelected(ItemIdentifier column)
Returns true if the specified column is selected.
|
boolean |
isColumnSelected(String columnText)
Returns true if the specified column is selected.
|
boolean |
isRowSelected(int row)
Returns true if the specified row is selected.
|
void |
moveColumn(int columnIndex,
int targetColumnIndex)
Moves the column to the position of the target column.
|
void |
moveColumn(int columnIndex,
ItemIdentifier targetColumn)
Moves the column to the position of the target column.
|
void |
moveColumn(int columnIndex,
String targetColumnText)
Moves the column to the position of the target column.
|
void |
moveColumn(ItemIdentifier column,
int targetColumnIndex)
Moves the column to the position of the target column.
|
void |
moveColumn(ItemIdentifier column,
ItemIdentifier targetColumn)
Moves the column to the position of the target column.
|
void |
moveColumn(ItemIdentifier column,
String targetColumnText)
Moves the column to the position of the target column.
|
void |
moveColumn(String columnText,
int targetColumnIndex)
Moves the column to the position of the target column.
|
void |
moveColumn(String columnText,
ItemIdentifier targetColumn)
Moves the column to the position of the target column.
|
void |
moveColumn(String columnText,
String targetColumnText)
Moves the column to the position of the target column.
|
void |
resizeColumn(int columnIndex,
int width)
Resizes the specified column.
|
void |
resizeColumn(ItemIdentifier column,
int width)
Resizes the specified column.
|
void |
resizeColumn(String columnText,
int width)
Resizes the specified column.
|
void |
scrollCellIntoView(int row,
int columnIndex)
Scrolls the specified cell into view.
|
void |
scrollCellIntoView(int row,
ItemIdentifier column)
Scrolls the specified cell into view.
|
void |
scrollCellIntoView(int row,
String columnText)
Scrolls the specified cell into view.
|
void |
selectAll()
Selects all rows, columns, and cells in the table.
|
void |
selectColumn(int columnIndex)
Selects the specified column.
|
void |
selectColumn(int columnIndex,
boolean clearSelection)
Selects the specified column.
|
void |
selectColumn(ItemIdentifier column)
Selects the specified column.
|
void |
selectColumn(ItemIdentifier column,
boolean clearSelection)
Selects the specified column.
|
void |
selectColumn(String columnText)
Selects the specified column.
|
void |
selectColumn(String columnText,
boolean clearSelection)
Selects the specified column.
|
void |
selectRow(int row)
Selects the specified row.
|
void |
selectRow(int row,
boolean clearSelection)
Selects the specified row.
|
void |
setCellValue(int row,
int columnIndex,
Object value)
Sets the specified value for the specified cell in the table.
|
void |
setCellValue(int row,
ItemIdentifier column,
Object value)
Sets the specified value for the specified cell in the table.
|
void |
setCellValue(int row,
String columnText,
Object value)
Sets the specified value for the specified cell in the table.
|
getToolTipText
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAccessibleName, getAccessibleRole, getBackground, getCursor, getFont, getForeground, getHeight, getName, getNativeHandle, getWidth, isEnabled, isFocusable, isFocused, mouseMove, mouseMove, openContextMenu, openContextMenu, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, scrollIntoView, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected JTable(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the JTabledesktop
- the desktop on which this object livespublic void clearSelection()
public void clickCell(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic void clickCell(int row, ItemIdentifier column, int button)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void clickCell(int row, ItemIdentifier column, int button, Point position)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.public void clickCell(int row, ItemIdentifier column, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while clicking the table cell. Use a modifier to click multiple table cells. Default: Don't use modifier keys.public void clickCell(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic void clickCell(int row, String columnText, int button)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void clickCell(int row, String columnText, int button, Point position)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.public void clickCell(int row, String columnText, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while clicking the table cell. Use a modifier to click multiple table cells. Default: Don't use modifier keys.public void clickCell(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic void clickCell(int row, int columnIndex, int button)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void clickCell(int row, int columnIndex, int button, Point position)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.public void clickCell(int row, int columnIndex, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the clicked position within the table cell. If the position is omitted, the click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while clicking the table cell. Use a modifier to click multiple table cells. Default: Don't use modifier keys.public void doubleClickCell(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic void doubleClickCell(int row, ItemIdentifier column, int button)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void doubleClickCell(int row, ItemIdentifier column, int button, Point position)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.public void doubleClickCell(int row, ItemIdentifier column, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while double-clicking the table cell. Default: Don't use modifier keys.public void doubleClickCell(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic void doubleClickCell(int row, String columnText, int button)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void doubleClickCell(int row, String columnText, int button, Point position)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.public void doubleClickCell(int row, String columnText, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while double-clicking the table cell. Default: Don't use modifier keys.public void doubleClickCell(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic void doubleClickCell(int row, int columnIndex, int button)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void doubleClickCell(int row, int columnIndex, int button, Point position)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.public void doubleClickCell(int row, int columnIndex, int button, Point position, ModifierKey modifiers)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnbutton
- the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position
- the double-clicked position within the table cell. If the position is omitted, the double-click is done in the center of the table cell.modifiers
- the modifier keys (Alt, Shift and Ctrl) to press while double-clicking the table cell. Default: Don't use modifier keys.public List<Integer> findCell(String text)
FindCell searches cells for text
starting in the 1st row, 1st column. It searches each cell in the first row, then searches the second row, and so on, until it finds a match or it reaches the end of the table. You can use wildcards in your search text.
text
- the text in a cell in the tablepublic String getCellText(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic String getCellText(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic String getCellText(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic Object getCellValue(int row, ItemIdentifier column)
Use "GetCellText" to retrieve the displayed cell text.
row
- the index of the row. The value is zero-based.column
- the name or index of the columnString
value is returned. If the cell is empty a null
object is returned.public Object getCellValue(int row, String columnText)
Use "GetCellText" to retrieve the displayed cell text.
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnString
value is returned. If the cell is empty a null
object is returned.public Object getCellValue(int row, int columnIndex)
Use "GetCellText" to retrieve the displayed cell text.
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnString
value is returned. If the cell is empty a null
object is returned.public String getColumnName(int column)
column
- the index of the column. The value is zero-based.public boolean isCellEditable(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic boolean isCellEditable(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic boolean isCellEditable(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic boolean isCellSelected(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic boolean isCellSelected(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic boolean isCellSelected(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic boolean isColumnSelected(ItemIdentifier column)
column
- the name or index of the columnpublic boolean isColumnSelected(String columnText)
columnText
- the name or index of the columnpublic boolean isColumnSelected(int columnIndex)
columnIndex
- the name or index of the columnpublic boolean isRowSelected(int row)
row
- the index of the row. The value is zero-based.public void moveColumn(ItemIdentifier column, ItemIdentifier targetColumn)
column
- the name or index of the column to movetargetColumn
- the name or index of the target columnpublic void moveColumn(ItemIdentifier column, String targetColumnText)
column
- the name or index of the column to movetargetColumnText
- the name or index of the target columnpublic void moveColumn(ItemIdentifier column, int targetColumnIndex)
column
- the name or index of the column to movetargetColumnIndex
- the name or index of the target columnpublic void moveColumn(String columnText, ItemIdentifier targetColumn)
columnText
- the name or index of the column to movetargetColumn
- the name or index of the target columnpublic void moveColumn(String columnText, String targetColumnText)
columnText
- the name or index of the column to movetargetColumnText
- the name or index of the target columnpublic void moveColumn(String columnText, int targetColumnIndex)
columnText
- the name or index of the column to movetargetColumnIndex
- the name or index of the target columnpublic void moveColumn(int columnIndex, ItemIdentifier targetColumn)
columnIndex
- the name or index of the column to movetargetColumn
- the name or index of the target columnpublic void moveColumn(int columnIndex, String targetColumnText)
columnIndex
- the name or index of the column to movetargetColumnText
- the name or index of the target columnpublic void moveColumn(int columnIndex, int targetColumnIndex)
columnIndex
- the name or index of the column to movetargetColumnIndex
- the name or index of the target columnpublic void resizeColumn(ItemIdentifier column, int width)
column
- the name or index of the column to resizewidth
- the new width for the columnpublic void resizeColumn(String columnText, int width)
columnText
- the name or index of the column to resizewidth
- the new width for the columnpublic void resizeColumn(int columnIndex, int width)
columnIndex
- the name or index of the column to resizewidth
- the new width for the columnpublic void scrollCellIntoView(int row, ItemIdentifier column)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnpublic void scrollCellIntoView(int row, String columnText)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnpublic void scrollCellIntoView(int row, int columnIndex)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnpublic void selectAll()
public void selectColumn(ItemIdentifier column)
column
- the name or index of the column to selectpublic void selectColumn(ItemIdentifier column, boolean clearSelection)
column
- the name or index of the column to selectclearSelection
- whether to clear the previous selection. The default is true.public void selectColumn(String columnText)
columnText
- the name or index of the column to selectpublic void selectColumn(String columnText, boolean clearSelection)
columnText
- the name or index of the column to selectclearSelection
- whether to clear the previous selection. The default is true.public void selectColumn(int columnIndex)
columnIndex
- the name or index of the column to selectpublic void selectColumn(int columnIndex, boolean clearSelection)
columnIndex
- the name or index of the column to selectclearSelection
- whether to clear the previous selection. The default is true.public void selectRow(int row)
row
- the row to select. The value is zero-based.public void selectRow(int row, boolean clearSelection)
row
- the row to select. The value is zero-based.clearSelection
- whether to clear the previous selection. The default is true.public void setCellValue(int row, ItemIdentifier column, Object value)
row
- the index of the row. The value is zero-based.column
- the name or index of the columnvalue
- the cell value objectpublic void setCellValue(int row, String columnText, Object value)
row
- the index of the row. The value is zero-based.columnText
- the name or index of the columnvalue
- the cell value objectpublic void setCellValue(int row, int columnIndex, Object value)
row
- the index of the row. The value is zero-based.columnIndex
- the name or index of the columnvalue
- the cell value objectpublic List<List<String>> getAllCellTexts()
public List<List<Object>> getAllCellValues()
public int getColumnCount()
public ItemIdentifier getEditingColumn()
public int getEditingRow()
public int getRowCount()
public ItemIdentifier getSelectedColumn()
If multiple column selection is allowed, returns the index or name of the first selected column.
public List<ItemIdentifier> getSelectedColumns()
public int getSelectedRow()
If multiple row selection is allowed, returns the index of the first selected row.
Copyright 2009-2012 Micro Focus. All Rights Reserved.