@InternalApi public class JTableHeaderDriver extends JComponentDriver
Supports functional testing of JTableHeaders.
Note: This class is intended for internal use only. Please use the classes in the package
org.assertj.swing.fixture in your tests.
robot| Constructor and Description |
|---|
JTableHeaderDriver(Robot robot)
Creates a new
JTableHeaderDriver. |
| Modifier and Type | Method and Description |
|---|---|
void |
clickColumn(JTableHeader tableHeader,
int columnIndex)
Clicks the column under the given index.
|
void |
clickColumn(JTableHeader tableHeader,
int columnIndex,
MouseButton button,
int times)
Clicks the column under the given index using the given mouse button the given number of times.
|
void |
clickColumn(JTableHeader tableHeader,
Pattern columnNamePattern)
Clicks the column which name matches the given regular expression pattern.
|
void |
clickColumn(JTableHeader tableHeader,
Pattern columnNamePattern,
MouseButton button,
int times)
Clicks the column which name matches the given regular expression pattern using the given mouse button the given
number of times.
|
void |
clickColumn(JTableHeader tableHeader,
String columnName)
Clicks the column which name matches the given value.
|
void |
clickColumn(JTableHeader tableHeader,
String columnName,
MouseButton button,
int times)
Clicks the column which name matches the given one using the given mouse button the given number of times.
|
JPopupMenu |
showPopupMenu(JTableHeader tableHeader,
int columnIndex)
Shows a pop-up menu at the given column.
|
JPopupMenu |
showPopupMenu(JTableHeader tableHeader,
Pattern pattern)
Shows a pop-up menu at the column whose name matches the given regular expression pattern.
|
JPopupMenu |
showPopupMenu(JTableHeader tableHeader,
String columnName)
Shows a pop-up menu at the given column.
|
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisibledoResizeHeight, doResizeWidth, isResizable, move, resizebackgroundOf, checkInEdtEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowingpublic JTableHeaderDriver(@Nonnull Robot robot)
JTableHeaderDriver.robot - the robot to use to simulate user input.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, int columnIndex)
tableHeader - the target JTableHeader.columnIndex - the given index.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.IndexOutOfBoundsException - if the index is out of bounds.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, int columnIndex, @Nonnull MouseButton button, int times)
tableHeader - the target JTableHeader.columnIndex - the given index.button - the mouse button to use.times - the number of times to click.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.IndexOutOfBoundsException - if the index is out of bounds.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, @Nullable String columnName)
tableHeader - the target JTableHeader.columnName - the column name to match. It can be a regular expression.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.LocationUnavailableException - if a column with a matching name cannot be found.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, @Nonnull Pattern columnNamePattern)
tableHeader - the target JTableHeader.columnNamePattern - the the regular expression pattern to match.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.NullPointerException - if the given regular expression pattern is null.LocationUnavailableException - if a column with a matching name cannot be found.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, @Nullable String columnName, @Nonnull MouseButton button, int times)
tableHeader - the target JTableHeader.columnName - the column name to match. It can be a regular expression.button - the mouse button to use.times - the number of times to click.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.LocationUnavailableException - if a column with a matching name cannot be found.@RunsInEDT public void clickColumn(@Nonnull JTableHeader tableHeader, @Nonnull Pattern columnNamePattern, @Nonnull MouseButton button, int times)
tableHeader - the target JTableHeader.columnNamePattern - the regular expression pattern to match.button - the mouse button to use.times - the number of times to click.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.NullPointerException - if the given regular expression pattern is null.LocationUnavailableException - if a column with a matching name cannot be found.@RunsInEDT @Nonnull public JPopupMenu showPopupMenu(@Nonnull JTableHeader tableHeader, int columnIndex)
tableHeader - the target JTableHeader.columnIndex - the index of the column.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.IndexOutOfBoundsException - if the index is out of bounds.ComponentLookupException - if a pop-up menu cannot be found.@RunsInEDT @Nonnull public JPopupMenu showPopupMenu(@Nonnull JTableHeader tableHeader, @Nullable String columnName)
tableHeader - the target JTableHeader.columnName - the name of the column. It can be a regular expression.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.@RunsInEDT @Nonnull public JPopupMenu showPopupMenu(@Nonnull JTableHeader tableHeader, @Nonnull Pattern pattern)
tableHeader - the target JTableHeader.pattern - the regular expression pattern to match.IllegalStateException - if the JTableHeader is disabled.IllegalStateException - if the JTableHeader is not showing on the screen.NullPointerException - if the given regular expression pattern is null.ComponentLookupException - if a pop-up menu cannot be found.Copyright © 2014 AssertJ. All rights reserved.