org.fest.swing.driver
Class JToolBarLocation

java.lang.Object
  extended by org.fest.swing.driver.JToolBarLocation

public final class JToolBarLocation
extends Object

Understands a visible location on a JToolBar.

Author:
Yvonne Wang, Alex Ruiz

Constructor Summary
JToolBarLocation()
           
 
Method Summary
 Point dockLocation(JToolBar toolBar, Container dock, String constraint)
          Returns the location where to dock the given JToolBar, at the given constraint position.
 Point pointToGrab(JToolBar toolBar)
          Returns the point where to grab the given JToolBar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JToolBarLocation

public JToolBarLocation()
Method Detail

pointToGrab

@RunsInCurrentThread
public Point pointToGrab(JToolBar toolBar)
Returns the point where to grab the given JToolBar.

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
toolBar - the target JToolBar.
Returns:
the point where to grab the given JToolBar.

dockLocation

@RunsInCurrentThread
public Point dockLocation(JToolBar toolBar,
                                              Container dock,
                                              String constraint)
Returns the location where to dock the given JToolBar, at the given constraint position. The constraint position must be one of the constants NORTH, EAST, SOUTH, or WEST.

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
toolBar - the target JToolBar.
dock - the container where to dock the JToolBar to.
constraint - the constraint position.
Returns:
the location where to dock the given JToolBar.
Throws:
IllegalArgumentException - if the constraint has an invalid value.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.