public class JTreeRowFixture extends Object implements JTreeNodeFixture<JTreeRowFixture>
JTree
s.Modifier | Constructor and Description |
---|---|
protected |
JTreeRowFixture(JTreeFixture tree,
int index)
Creates a new
JTreeRowFixture . |
Modifier and Type | Method and Description |
---|---|
JTreeRowFixture |
click()
Simulates a user clicking this fixture's tree node.
|
JTreeRowFixture |
click(MouseButton button)
Simulates a user clicking this fixture's tree node.
|
JTreeRowFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's tree node.
|
JTreeRowFixture |
collapse()
Simulates a user collapsing this fixture's tree node.
|
JTreeRowFixture |
doubleClick()
Simulates a user double-clicking this fixture's tree node.
|
JTreeRowFixture |
drag()
Simulates a user dragging this fixture's tree node.
|
JTreeRowFixture |
drop()
Simulates a user dropping relative to this fixture's tree node.
|
JTreeRowFixture |
expand()
Simulates a user expanding this fixture's tree node.
|
int |
index() |
JTreeRowFixture |
rightClick()
Simulates a user right-clicking this fixture's tree node.
|
JTreeRowFixture |
select()
Selects the this fixture's tree node, expanding parent nodes if necessary.
|
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's tree node as the invoker of the pop-up menu.
|
JTreeRowFixture |
unselect()
Unselects the this fixture's tree node, expanding parent nodes if necessary.
|
String |
value() |
protected JTreeRowFixture(@Nonnull JTreeFixture tree, int index)
JTreeRowFixture
.tree
- handles the JTree
containing the node with the given row index.index
- the given row index.@Nonnull public JTreeRowFixture expand()
expand
in interface JTreeNodeFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ActionFailedException
- if this method fails to expand the row.@Nonnull public JTreeRowFixture collapse()
collapse
in interface JTreeNodeFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ActionFailedException
- if this method fails to collapse the row.@Nonnull public JTreeRowFixture select()
select
in interface ItemFixture<JTreeRowFixture>
IllegalStateException
- if this fixture's JTree
is disabled.IllegalStateException
- if this fixture's JTree
is not showing on the screen.@Nonnull public JTreeRowFixture unselect()
IllegalStateException
- if this fixture's JTree
is disabled.IllegalStateException
- if this fixture's JTree
is not showing on the screen.@Nonnull public JTreeRowFixture click()
click
in interface MouseInputSimulationFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture click(@Nonnull MouseButton button)
click
in interface MouseInputSimulationFixture<JTreeRowFixture>
button
- the button to click.NullPointerException
- if the given button is null
.IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture click(@Nonnull MouseClickInfo mouseClickInfo)
click
in interface MouseInputSimulationFixture<JTreeRowFixture>
mouseClickInfo
- specifies the button to click and the times the button should be clicked.NullPointerException
- if the given MouseClickInfo
is null
.IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture doubleClick()
doubleClick
in interface MouseInputSimulationFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture rightClick()
rightClick
in interface MouseInputSimulationFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture drag()
drag
in interface ItemFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreeRowFixture drop()
drop
in interface ItemFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ActionFailedException
- if there is no drag action in effect.@Nonnull public JPopupMenuFixture showPopupMenu()
showPopupMenu
in interface ItemFixture<JTreeRowFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ComponentLookupException
- if a pop-up menu cannot be found.@Nullable public String value()
value
in interface ItemFixture<JTreeRowFixture>
String
representation of this fixture's tree node.public int index()
Copyright © 2014–2019 AssertJ. All rights reserved.