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.JToolBarprivate IllegalArgumentExceptioninvalidConstraint(String constraint) private booleanisHorizontal(JToolBar toolBar) pointToGrab(JToolBar toolBar) Returns the point where to grab the given.JToolBarprivate voidprivate intverticalDockingYCoordinate(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.JToolBarNote: 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.WESTNote: 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 theJToolBarto.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
-