public class JListItemFixture extends Object implements ItemFixture
JLists:
| Constructor and Description |
|---|
JListItemFixture(JListFixture list,
int index)
Creates a new
JListItemFixture. |
| Modifier and Type | Method and Description |
|---|---|
JListItemFixture |
click()
Simulates a user clicking this fixture's list item.
|
JListItemFixture |
click(MouseButton button)
Simulates a user clicking this fixture's list item.
|
JListItemFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's list item.
|
JListItemFixture |
doubleClick()
Simulates a user double-clicking this fixture's list item.
|
JListItemFixture |
drag()
Simulates a user dragging this fixture's list item.
|
JListItemFixture |
drop()
Simulates a user dropping into this fixture's list item.
|
int |
index()
Returns the index of this fixture's list item.
|
JListItemFixture |
rightClick()
Simulates a user right-clicking this fixture's list item.
|
JListItemFixture |
select()
Simulates a user selecting this fixture's list item.
|
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's list item as the invoker of the pop-up menu.
|
String |
value()
Returns the
String representation of the value of this fixture's list item, using the
from the that created this
. |
public JListItemFixture(JListFixture list, int index)
JListItemFixture.list - manages the JList containing the list item to be managed by this fixture.index - index of the list item to be managed by this fixture.NullPointerException - if list is null.public final JListItemFixture select()
select in interface ItemFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture click()
click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture click(MouseButton button)
click in interface MouseInputSimulationFixturebutton - the button to click.NullPointerException - if the given MouseButton is null.IllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture click(MouseClickInfo mouseClickInfo)
click in interface MouseInputSimulationFixturemouseClickInfo - specifies the button to click and the times the button should be clicked.NullPointerException - if the given MouseClickInfo is null.IllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture doubleClick()
doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture rightClick()
rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JPopupMenuFixture showPopupMenu()
showPopupMenu in interface ItemFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.ComponentLookupException - if a pop-up menu cannot be found.public final String value()
String representation of the value of this fixture's list item, using the
JListCellReader from the JListFixture that created this
JListItemFixture.value in interface ItemFixtureString representation of the value of this fixture's list item.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.JListFixture.cellReader(JListCellReader)public final JListItemFixture drag()
drag in interface ItemFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.public final JListItemFixture drop()
drop in interface ItemFixtureIllegalStateException - if this fixture's JList is disabled.IllegalStateException - if this fixture's JList is not showing on the screen.IndexOutOfBoundsException - if this item's index is negative or greater than the index of the last item in
the JList.ActionFailedException - if there is no drag action in effect.public final int index()
Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.