Package org.fest.swing.fixture
Class JTableFixture
- All Implemented Interfaces:
ClientPropertyStorageFixture,CommonComponentFixture,FocusableComponentFixture,JComponentFixture,JPopupMenuInvokerFixture,KeyboardInputSimulationFixture,MouseInputSimulationFixture,StateVerificationFixture,ToolTipDisplayFixture
public class JTableFixture
extends ComponentFixture<JTable>
implements CommonComponentFixture, JComponentFixture, JPopupMenuInvokerFixture
Understands functional testing of
JTables:
- user input simulation
- state verification
- property value query
The conversion between the values given in tests and the values being displayed by a
renderer is performed by a JTable. This fixture uses a
JTableCellReader by default.
BasicJTableCellReader
-
Field Summary
FieldsFields inherited from class org.fest.swing.fixture.ComponentFixture
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target -
Constructor Summary
ConstructorsConstructorDescriptionJTableFixture(Robot robot, String tableName) Creates a new.JTableFixtureJTableFixture(Robot robot, JTable target) Creates a new.JTableFixture -
Method Summary
Modifier and TypeMethodDescriptionbackgroundAt(TableCell cell) Returns a fixture that verifies the background color of the given table cell.Returns a fixture that manages the table cell whose value matches the given one.Returns a fixture that manages the table cell whose value matches the given regular expression pattern.Returns a fixture that manages the table cell specified by the given row and column.cell(TableCellFinder cellFinder) Returns a fixture that manages the table cell found by the given.TableCellFinderprivate org.fest.assertions.DescriptioncellProperty(TableCell cell, String propertyName) cellReader(JTableCellReader cellReader) Updates the implementation ofto use when comparing internal values of this fixture'sJTableCellReaderand the values expected in a test.JTablecellWriter(JTableCellWriter cellWriter) Updates the implementation ofto use when comparing internal values of this fixture'sJTableCellWriterand the values expected in a test.JTableclick()Simulates a user clicking this fixture's.JTableclick(MouseButton button) Simulates a user clicking this fixture's.JTableclick(MouseClickInfo mouseClickInfo) Simulates a user clicking this fixture's.JTableclick(TableCell cell, MouseButton button) Simulates a user clicking a cell in this fixture'sonce, using the specified mouse button.JTable(package private) voidclick(TableCell cell, MouseButton button, int times) click(TableCell cell, MouseClickInfo mouseClickInfo) Simulates a user clicking a cell in this fixture's, using the specified mouse button the given number of times.JTableclientProperty(Object key) Returns the client property stored in this fixture's, under the given key.JTableintcolumnIndexFor(Object columnName) Returns the index of the column in this fixture'swhose name matches the given one.JTableString[][]contents()Returns theStringrepresentation of the cells in the in this fixture's, using this fixture'sJTable.JTableCellReaderprivate voidSimulates a user double-clicking this fixture's.JTableSimulates a user dragging an item from this fixture's.JTableprotected final JTableDriverdriver()Returns theused by this fixture.JTableDriverprotected final voiddriver(JTableDriver newDriver) Sets theto be used by this fixture.JTableDriverSimulates a user dropping an item to this fixture's.JTableenterValue(TableCell cell, String value) Enters the given value in the given cell of this fixture's, using this fixture'sJTable.JTableCellWriterfocus()Gives input focus to this fixture's.JTableReturns a fixture that verifies the font of the given table cell.foregroundAt(TableCell cell) Returns a fixture that verifies the foreground color of the given table cell.Converts the given cell into a coordinate pair.pressAndReleaseKey(KeyPressInfo keyPressInfo) Simulates a user pressing given key with the given modifiers on this fixture's.JTablepressAndReleaseKeys(int... keyCodes) Simulates a user pressing and releasing the given keys on this fixture's.JTablepressKey(int keyCode) Simulates a user pressing the given key on this fixture's.JTablereleaseKey(int keyCode) Simulates a user releasing the given key on this fixture's.JTablerequireCellValue(TableCell cell, String value) Asserts that the value of the given cell matches the given value.requireCellValue(TableCell cell, Pattern pattern) Asserts that the value of the given cell matches the given regular expression pattern.requireColumnCount(int expected) Asserts that this fixture'shas the given number of columns.JTablerequireContents(String[][] contents) Asserts that theStringrepresentation of the cell values in this fixture'sis equal to the givenJTableStringarray.Asserts that this fixture'sis disabled.JTablerequireEditable(TableCell cell) Asserts that the given cell in this fixture'sis editable.JTableAsserts that this fixture'sis enabled.JTablerequireEnabled(Timeout timeout) Asserts that this fixture'sis enabled.JTableAsserts that this fixture'shas input focus.JTableVerifies that this fixture'sdoes not have any selection.JTablerequireNotEditable(TableCell cell) Asserts that the given cell in this fixture'sis not editable.JTableAsserts that this fixture'sis not visible.JTablerequireRowCount(int expected) Asserts that this fixture'shas the given number of rows.JTablerequireSelectedRows(int... rows) Asserts that the set of selected rows in this fixture'scontains to the given row indices.JTablerequireToolTip(String expected) Asserts that the toolTip in this fixture'smatches the given value.JTablerequireToolTip(Pattern pattern) Asserts that the toolTip in this fixture'smatches the given regular expression pattern.JTableAsserts that this fixture'sis visible.JTableSimulates a user right-clicking this fixture's.JTableintrowCount()Returns the number of rows that can be shown in this fixture's, given unlimited space.JTableselectCell(TableCell cell) Simulates a user selecting the given cell (row and column) of this fixture's.JTableselectCells(TableCell... cells) Simulates a user selecting the given cells of this fixture's.JTableReturns theStringrepresentation of the selected cell in this fixture's, using this fixture'sJTable.JTableCellReaderselectRows(int... rows) Simulates a user selecting the given rows in this fixture's.JTableShows a pop-up menu using this fixture'sas the invoker of the pop-up menu.JTableShows a pop-up menu at the given point using this fixture'sas the invoker of the pop-up menu.JTableshowPopupMenuAt(TableCell cell) Shows a pop-up menu at the given cell.Returns theStringrepresentation of the value of a cell in this fixture's, using this fixture'sJTable.JTableCellReaderMethods inherited from class org.fest.swing.fixture.ComponentFixture
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNull
-
Field Details
-
driver
-
-
Constructor Details
-
JTableFixture
Creates a new.JTableFixture- Parameters:
robot- performs simulation of user events on the givenJTable.target- theJTableto be managed by this fixture.- Throws:
NullPointerException- ifrobotisnull.NullPointerException- iftargetisnull.
-
JTableFixture
Creates a new.JTableFixture- Parameters:
robot- performs simulation of user events on aJTable.tableName- the name of theJTableto find using the givenRobot.- Throws:
NullPointerException- ifrobotisnull.ComponentLookupException- if a matchingJTablecould not be found.ComponentLookupException- if more than one matchingJTableis found.
-
-
Method Details
-
createDriver
private void createDriver() -
driver
Sets theto be used by this fixture.JTableDriver- Parameters:
newDriver- the newJTableDriver.- Throws:
NullPointerException- if the given driver isnull.
-
driver
Returns theused by this fixture.JTableDriver- Returns:
- the
JTableDriverused by this fixture.
-
fontAt
Returns a fixture that verifies the font of the given table cell.- Parameters:
cell- the given table cell.- Returns:
- a fixture that verifies the font of the given table cell.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
backgroundAt
Returns a fixture that verifies the background color of the given table cell.- Parameters:
cell- the given table cell.- Returns:
- a fixture that verifies the background color of the given table cell.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
foregroundAt
Returns a fixture that verifies the foreground color of the given table cell.- Parameters:
cell- the given table cell.- Returns:
- a fixture that verifies the foreground color of the given table cell.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
cellProperty
-
cell
Returns a fixture that manages the table cell whose value matches the given one.- Parameters:
value- the value of the cell to look for. It can be a regular expression.- Returns:
- a fixture that manages the table cell whose value matches the given one.
- Throws:
ActionFailedException- if a cell with a matching value cannot be found.
-
cell
Returns a fixture that manages the table cell whose value matches the given regular expression pattern.- Parameters:
valuePattern- the regular expression pattern to match.- Returns:
- a fixture that manages the table cell whose value matches the given one.
- Throws:
NullPointerException- if the given regular expression pattern isnull.ActionFailedException- if a cell with a matching value cannot be found.- Since:
- 1.2
-
cell
Returns a fixture that manages the table cell found by the given.TableCellFinder- Parameters:
cellFinder- knows how to find a cell.- Returns:
- a fixture that manages the found table cell.
- Throws:
NullPointerException- if theTableCellFinderisnull.ActionFailedException- if a matching cell could not be found.IndexOutOfBoundsException- if the row or column indices in the found cell are out of bounds.
-
cell
Returns a fixture that manages the table cell specified by the given row and column.- Parameters:
cell- the cell of interest.- Returns:
- a fixture that manages the table cell specified by the given row and column.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
tableHeader
- Returns:
- a
JTableHeaderFixturewrapping theJTableHeaderin this fixture'sJTable. - Throws:
AssertionError- if theJTableHeaderin this fixture'sJTableisnull.
-
selectionValue
Returns theStringrepresentation of the selected cell in this fixture's, using this fixture'sJTable. ReturnsJTableCellReadernullif one can not be obtained or if thedoes not have any selected cell.JTable- Returns:
- the
Stringrepresentation of the selected cell. - See Also:
-
pointAt
Converts the given cell into a coordinate pair.- Parameters:
cell- the given cell.- Returns:
- the coordinates of the given cell.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
contents
Returns theStringrepresentation of the cells in the in this fixture's, using this fixture'sJTable.JTableCellReader- Returns:
- the
Stringrepresentation of the cells in thi fixture'sJTable. - See Also:
-
rowCount
public int rowCount()Returns the number of rows that can be shown in this fixture's, given unlimited space.JTable- Returns:
- the number of rows shown in this fixture's
JTable. - See Also:
-
valueAt
Returns theStringrepresentation of the value of a cell in this fixture's, using this fixture'sJTable.JTableCellReader- Parameters:
cell- the given cell.- Returns:
- the
Stringrepresentation of the value of a cell in this fixture'sJTable. - Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.- See Also:
-
selectCell
Simulates a user selecting the given cell (row and column) of this fixture's.JTable- Parameters:
cell- the cell to select.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
selectCells
Simulates a user selecting the given cells of this fixture's.JTable- Parameters:
cells- the cells to select.- Returns:
- this fixture.
- Throws:
NullPointerException- ifcellsisnullor empty.IllegalArgumentException- ifcellsisnullor empty.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.NullPointerException- if any element incellsisnull.IndexOutOfBoundsException- if any of the indices of any of thecellsare out of bounds.
-
selectRows
Simulates a user selecting the given rows in this fixture's.JTable- Parameters:
rows- the indices of the row to select.- Returns:
- this fixture.
- Throws:
NullPointerException- if the given array of indices isnull.IllegalArgumentException- if the given array of indices is empty.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the given indices is out of bounds.- Since:
- 1.2
-
drag
Simulates a user dragging an item from this fixture's.JTable- Parameters:
cell- the cell to drag.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
drop
Simulates a user dropping an item to this fixture's.JTable- Parameters:
cell- the cell to drop the dragging item into.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
click
Simulates a user clicking this fixture's.JTable- Specified by:
clickin interfaceMouseInputSimulationFixture- Returns:
- this fixture.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
click
Simulates a user clicking this fixture's.JTable- Specified by:
clickin interfaceMouseInputSimulationFixture- Parameters:
button- the button to click.- Returns:
- this fixture.
- Throws:
NullPointerException- if the givenMouseButtonisnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
click
Simulates a user clicking this fixture's.JTable- Specified by:
clickin interfaceMouseInputSimulationFixture- Parameters:
mouseClickInfo- specifies the button to click and the times the button should be clicked.- Returns:
- this fixture.
- Throws:
NullPointerException- if the givenMouseClickInfoisnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
click
Simulates a user clicking a cell in this fixture'sonce, using the specified mouse button.JTable- Parameters:
cell- the cell to click.button- the mouse button to use.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
click
Simulates a user clicking a cell in this fixture's, using the specified mouse button the given number of times.JTable- Parameters:
cell- the cell to click.mouseClickInfo- specifies the mouse button to use and how many times to click.- Returns:
- this fixture.
- Throws:
NullPointerException- if the givenMouseClickInfoisnull.NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.
-
click
-
doubleClick
Simulates a user double-clicking this fixture's.JTableNote: This method will not be successful if the double-clicking occurs on an editable table cell. For this particular case, this method will start edition of the table cell located under the mouse pointer.
- Specified by:
doubleClickin interfaceMouseInputSimulationFixture- Returns:
- this fixture.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
rightClick
Simulates a user right-clicking this fixture's.JTable- Specified by:
rightClickin interfaceMouseInputSimulationFixture- Returns:
- this fixture.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
pressAndReleaseKey
Simulates a user pressing given key with the given modifiers on this fixture's. Modifiers is a mask from the availableJTablemasks.InputEvent- Specified by:
pressAndReleaseKeyin interfaceKeyboardInputSimulationFixture- Parameters:
keyPressInfo- specifies the key and modifiers to press.- Returns:
- this fixture.
- Throws:
NullPointerException- if the givenKeyPressInfoisnull.IllegalArgumentException- if the given code is not a valid key code.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.- See Also:
-
pressAndReleaseKeys
Simulates a user pressing and releasing the given keys on this fixture's. This method does not affect the current focus.JTable- Specified by:
pressAndReleaseKeysin interfaceKeyboardInputSimulationFixture- Parameters:
keyCodes- one or more codes of the keys to press.- Returns:
- this fixture.
- Throws:
NullPointerException- if the given array of codes isnull.IllegalArgumentException- if any of the given code is not a valid key code.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.- See Also:
-
pressKey
Simulates a user pressing the given key on this fixture's.JTable- Specified by:
pressKeyin interfaceKeyboardInputSimulationFixture- Parameters:
keyCode- the code of the key to press.- Returns:
- this fixture.
- Throws:
IllegalArgumentException- if any of the given code is not a valid key code.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.- See Also:
-
releaseKey
Simulates a user releasing the given key on this fixture's.JTable- Specified by:
releaseKeyin interfaceKeyboardInputSimulationFixture- Parameters:
keyCode- the code of the key to release.- Returns:
- this fixture.
- Throws:
IllegalArgumentException- if any of the given code is not a valid key code.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.- See Also:
-
focus
Gives input focus to this fixture's.JTable- Specified by:
focusin interfaceFocusableComponentFixture- Returns:
- this fixture.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.
-
enterValue
Enters the given value in the given cell of this fixture's, using this fixture'sJTable. If you need more flexibility for editing cell, please seeJTableCellWriter.JTableCellFixture.editor()- Parameters:
cell- the given cell.value- the given value.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.IllegalStateException- if this fixture'sJTableis not editable.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.ActionFailedException- if this fixture'sJTableCellValueReaderis unable to enter the given value.- See Also:
-
cellReader
Updates the implementation ofto use when comparing internal values of this fixture'sJTableCellReaderand the values expected in a test. The default implementation to use isJTable.BasicJTableCellReader- Parameters:
cellReader- the newJTableCellValueReaderto use.- Returns:
- this fixture.
- Throws:
NullPointerException- ifcellReaderisnull.
-
requireRowCount
Asserts that this fixture'shas the given number of rows.JTable- Parameters:
expected- the expected number of rows.- Returns:
- this fixture.
- Throws:
AssertionError- if this fixture'sJTabledoes not have the given number of rows.
-
requireSelectedRows
Asserts that the set of selected rows in this fixture'scontains to the given row indices. The given row indices can be a subset of all the selected rows in aJTableJTable.- Parameters:
rows- the indices of the rows expected to be selected.- Returns:
- this fixture.
- Throws:
AssertionError- if the set of selected rows in this fixture'sJTable(if any) do not contain the given indices.- Since:
- 1.2
-
requireColumnCount
Asserts that this fixture'shas the given number of columns.JTable- Parameters:
expected- the expected number of columns.- Returns:
- this fixture.
- Throws:
AssertionError- if this fixture'sJTabledoes not have the given number of columns.
-
requireFocused
Asserts that this fixture'shas input focus.JTable- Specified by:
requireFocusedin interfaceFocusableComponentFixture- Returns:
- this fixture.
- Throws:
AssertionError- if this fixture'sJTabledoes not have input focus.
-
requireEnabled
Asserts that this fixture'sis enabled.JTable- Specified by:
requireEnabledin interfaceStateVerificationFixture- Returns:
- this fixture.
- Throws:
AssertionError- is the managedJTableis disabled.
-
requireEnabled
Asserts that this fixture'sis enabled.JTable- Specified by:
requireEnabledin interfaceStateVerificationFixture- Parameters:
timeout- the time this fixture will wait for the component to be enabled.- Returns:
- this fixture.
- Throws:
WaitTimedOutError- if the managedJTableis never enabled.
-
requireDisabled
Asserts that this fixture'sis disabled.JTable- Specified by:
requireDisabledin interfaceStateVerificationFixture- Returns:
- this fixture.
- Throws:
AssertionError- is the managedJTableis enabled.
-
requireVisible
Asserts that this fixture'sis visible.JTable- Specified by:
requireVisiblein interfaceStateVerificationFixture- Returns:
- this fixture.
- Throws:
AssertionError- if the managedJTableis not visible.
-
requireNotVisible
Asserts that this fixture'sis not visible.JTable- Specified by:
requireNotVisiblein interfaceStateVerificationFixture- Returns:
- this fixture.
- Throws:
AssertionError- if the managedJTableis visible.
-
requireToolTip
Asserts that the toolTip in this fixture'smatches the given value.JTable- Specified by:
requireToolTipin interfaceToolTipDisplayFixture- Parameters:
expected- the given value. It can be a regular expression.- Returns:
- this fixture.
- Throws:
AssertionError- if the toolTip in this fixture'sJTabledoes not match the given value.- Since:
- 1.2
-
requireToolTip
Asserts that the toolTip in this fixture'smatches the given regular expression pattern.JTable- Specified by:
requireToolTipin interfaceToolTipDisplayFixture- Parameters:
pattern- the regular expression pattern to match.- Returns:
- this fixture.
- Throws:
NullPointerException- if the given regular expression pattern isnull.AssertionError- if the toolTip in this fixture'sJTabledoes not match the given regular expression pattern.- Since:
- 1.2
-
requireEditable
Asserts that the given cell in this fixture'sis editable.JTable- Parameters:
cell- the given cell.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.AssertionError- if the given cell is not editable.
-
requireNotEditable
Asserts that the given cell in this fixture'sis not editable.JTable- Parameters:
cell- the given cell.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.AssertionError- if the given cell is editable.
-
requireNoSelection
Verifies that this fixture'sdoes not have any selection.JTable- Returns:
- this fixture.
- Throws:
AssertionError- if this fixture'sJTablehas a selection.
-
requireCellValue
Asserts that the value of the given cell matches the given value.- Parameters:
cell- the given table cell.value- the expected value. It can be a regular expression.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.AssertionError- if the value of the given cell does not match the given value.
-
requireCellValue
Asserts that the value of the given cell matches the given regular expression pattern.- Parameters:
cell- the given table cell.pattern- the regular expression pattern to match.- Returns:
- this fixture.
- Throws:
NullPointerException- if the cell isnull.NullPointerException- if the given regular expression pattern isnull.IndexOutOfBoundsException- if any of the indices (row and column) is out of bounds.AssertionError- if the value of the given cell does not match the given regular expression pattern.- Since:
- 1.2
-
requireContents
Asserts that theStringrepresentation of the cell values in this fixture'sis equal to the givenJTableStringarray. This method uses this fixture'sto read the values of the table cells asJTableCellReaderStrings.- Parameters:
contents- the expectedStringrepresentation of the cell values in this fixture'sJTable.- Returns:
- this fixture.
- See Also:
-
cellWriter
Updates the implementation ofto use when comparing internal values of this fixture'sJTableCellWriterand the values expected in a test. The default implementation to use isJTable.BasicJTableCellWriter- Parameters:
cellWriter- the newJTableCellValueWriterto use.- Returns:
- this fixture.
- Throws:
NullPointerException- ifcellWriterisnull.
-
columnIndexFor
Returns the index of the column in this fixture'swhose name matches the given one.JTable- Parameters:
columnName- the name of the column to look for.- Returns:
- the index of the column whose name matches the given one.
- Throws:
ActionFailedException- if a column with a matching name could not be found.
-
clientProperty
Returns the client property stored in this fixture's, under the given key.JTable- Specified by:
clientPropertyin interfaceClientPropertyStorageFixture- Parameters:
key- the key to use to retrieve the client property.- Returns:
- the value of the client property stored under the given key, or
nullif the property was not found. - Throws:
NullPointerException- if the given key isnull.- Since:
- 1.2
-
showPopupMenu
Shows a pop-up menu using this fixture'sas the invoker of the pop-up menu.JTable- Specified by:
showPopupMenuin interfaceJPopupMenuInvokerFixture- Returns:
- a fixture that manages the displayed pop-up menu.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.ComponentLookupException- if a pop-up menu cannot be found.
-
showPopupMenuAt
Shows a pop-up menu at the given point using this fixture'sas the invoker of the pop-up menu.JTable- Specified by:
showPopupMenuAtin interfaceJPopupMenuInvokerFixture- Parameters:
p- the given point where to show the pop-up menu.- Returns:
- a fixture that manages the displayed pop-up menu.
- Throws:
IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.ComponentLookupException- if a pop-up menu cannot be found.
-
showPopupMenuAt
Shows a pop-up menu at the given cell.- Parameters:
cell- the table cell where to show the pop-up menu.- Returns:
- a fixture that manages the displayed pop-up menu.
- Throws:
NullPointerException- if the cell isnull.IllegalStateException- if this fixture'sJTableis disabled.IllegalStateException- if this fixture'sJTableis not showing on the screen.ComponentLookupException- if a pop-up menu cannot be found.
-