Package org.fest.swing.driver
Class JToolBarLocation
java.lang.Object
org.fest.swing.driver.JToolBarLocation
Understands a visible location on a
JToolBar
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondockLocation
(JToolBar toolBar, Container dock, String constraint) Returns the location where to dock the given
, at the given constraint position.JToolBar
private IllegalArgumentException
invalidConstraint
(String constraint) private boolean
isHorizontal
(JToolBar toolBar) pointToGrab
(JToolBar toolBar) Returns the point where to grab the given
.JToolBar
private void
private int
verticalDockingYCoordinate
(int dockHeight, Insets insets, int offset)
-
Field Details
-
VALID_CONSTRAINTS
-
-
Constructor Details
-
JToolBarLocation
public JToolBarLocation()
-
-
Method Details
-
pointToGrab
Returns the point where to grab the given
.JToolBar
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
toolBar
- the targetJToolBar
.- Returns:
- the point where to grab the given
JToolBar
.
-
dockLocation
Returns the location where to dock the given
, at the given constraint position. The constraint position must be one of the constantsJToolBar
,NORTH
,EAST
, orSOUTH
.WEST
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
toolBar
- the targetJToolBar
.dock
- the container where to dock theJToolBar
to.constraint
- the constraint position.- Returns:
- the location where to dock the given
JToolBar
. - Throws:
IllegalArgumentException
- if the constraint has an invalid value.
-
isHorizontal
-
validate
-
invalidConstraint
-
verticalDockingYCoordinate
-