Package org.fest.swing.fixture
Interface ItemFixture
- All Superinterfaces:
MouseInputSimulationFixture
- All Known Subinterfaces:
JTreeNodeFixture
- All Known Implementing Classes:
JListItemFixture,JTableCellFixture,JTreePathFixture,JTreeRowFixture
Understands functional testing of GUI component items (e.g. a cell in a
JTable or a row in a
JList):
- user input simulation
- property value query
Component.-
Method Summary
Modifier and TypeMethodDescriptiondrag()Simulates a user dragging this fixture's item.drop()Simulates a user dropping into this fixture's item.select()Simulates a user selecting this fixture's item.Shows a pop-up menu using this fixture's item as the invoker of the pop-up menu.value()Returns theStringrepresentation of this fixture's item, ornullif one can not be obtained.Methods inherited from interface org.fest.swing.fixture.MouseInputSimulationFixture
click, click, click, doubleClick, rightClick
-
Method Details
-
select
ItemFixture select()Simulates a user selecting this fixture's item.- Returns:
- this fixture.
- Throws:
IllegalStateException- if the component containing this fixture's item is disabled.IllegalStateException- if the component containing this fixture's item is not showing on the screen.
-
value
String value()Returns theStringrepresentation of this fixture's item, ornullif one can not be obtained.- Returns:
- the
Stringrepresentation of this fixture's item.
-
drag
ItemFixture drag()Simulates a user dragging this fixture's item.- Returns:
- this fixture.
- Throws:
IllegalStateException- if the component containing this fixture's item is disabled.IllegalStateException- if the component containing this fixture's item is not showing on the screen.
-
drop
ItemFixture drop()Simulates a user dropping into this fixture's item.- Returns:
- this fixture.
- Throws:
IllegalStateException- if the component containing this fixture's item is disabled.IllegalStateException- if the component containing this fixture's item is not showing on the screen.ActionFailedException- if there is no drag action in effect.
-
showPopupMenu
JPopupMenuFixture showPopupMenu()Shows a pop-up menu using this fixture's item as the invoker of the pop-up menu.- Returns:
- a fixture that handles functional testing of the displayed pop-up menu.
- Throws:
IllegalStateException- if the component containing this fixture's item is disabled.IllegalStateException- if the component containing this fixture's item is not showing on the screen.ComponentLookupException- if a pop-up menu cannot be found.
-