public class JTreePathFixture extends Object implements JTreeNodeFixture<JTreePathFixture>
JTree
s.Modifier | Constructor and Description |
---|---|
protected |
JTreePathFixture(JTreeFixture tree,
String path)
Creates a new
JTreePathFixture . |
Modifier and Type | Method and Description |
---|---|
JTreePathFixture |
click()
Simulates a user clicking this fixture's tree node.
|
JTreePathFixture |
click(MouseButton button)
Simulates a user clicking this fixture's tree node.
|
JTreePathFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's tree node.
|
JTreePathFixture |
collapse()
Simulates a user collapsing this fixture's tree node.
|
JTreePathFixture |
doubleClick()
Simulates a user double-clicking this fixture's tree node.
|
JTreePathFixture |
drag()
Simulates a user dragging this fixture's tree node.
|
JTreePathFixture |
drop()
Simulates a user dropping relative to this fixture's tree node.
|
JTreePathFixture |
expand()
Simulates a user expanding this fixture's tree node.
|
String |
path() |
JTreePathFixture |
rightClick()
Simulates a user right-clicking this fixture's tree node.
|
JTreePathFixture |
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.
|
JTreePathFixture |
unselect()
Unselects the this fixture's tree node, expanding parent nodes if necessary.
|
String |
value() |
protected JTreePathFixture(@Nonnull JTreeFixture tree, @Nonnull String path)
JTreePathFixture
.tree
- handles the JTree
containing the node with the given path.path
- the given path.@Nonnull public JTreePathFixture expand()
expand
in interface JTreeNodeFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ActionFailedException
- if this method fails to expand the path.@Nonnull public JTreePathFixture collapse()
collapse
in interface JTreeNodeFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.ActionFailedException
- if this method fails to collapse the path.@Nonnull public JTreePathFixture select()
select
in interface ItemFixture<JTreePathFixture>
IllegalStateException
- if this fixture's JTree
is disabled.IllegalStateException
- if this fixture's JTree
is not showing on the screen.@Nonnull public JTreePathFixture unselect()
IllegalStateException
- if this fixture's JTree
is disabled.IllegalStateException
- if this fixture's JTree
is not showing on the screen.@Nonnull public JTreePathFixture click()
click
in interface MouseInputSimulationFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreePathFixture click(@Nonnull MouseButton button)
click
in interface MouseInputSimulationFixture<JTreePathFixture>
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 JTreePathFixture click(@Nonnull MouseClickInfo mouseClickInfo)
click
in interface MouseInputSimulationFixture<JTreePathFixture>
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 JTreePathFixture doubleClick()
doubleClick
in interface MouseInputSimulationFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreePathFixture rightClick()
rightClick
in interface MouseInputSimulationFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreePathFixture drag()
drag
in interface ItemFixture<JTreePathFixture>
IllegalStateException
- if the JTree
is disabled.IllegalStateException
- if the JTree
is not showing on the screen.@Nonnull public JTreePathFixture drop()
drop
in interface ItemFixture<JTreePathFixture>
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<JTreePathFixture>
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<JTreePathFixture>
String
representation of this fixture's tree node.Copyright © 2014–2019 AssertJ. All rights reserved.