org.fest.swing.driver
Class ContainerDriver

java.lang.Object
  extended by org.fest.swing.driver.ComponentDriver
      extended by org.fest.swing.driver.ContainerDriver
Direct Known Subclasses:
JComponentDriver, WindowDriver

public abstract class ContainerDriver
extends ComponentDriver

Understands functional testing of Containers:

This class is intended for internal use only. Please use the classes in the package org.fest.swing.fixture in your tests.

Author:
Alex Ruiz, Yvonne Wang

Field Summary
 
Fields inherited from class org.fest.swing.driver.ComponentDriver
robot
 
Constructor Summary
ContainerDriver(Robot robot)
          Creates a new ContainerDriver.
 
Method Summary
 void move(Container c, int x, int y)
          Move the given Container to the requested location.
protected  void resize(Container c, int width, int height)
          Resizes the Container to the given size.
protected  void resizeHeight(Container c, int height)
          Resizes the Container vertically.
protected  void resizeWidth(Container c, int width)
          Resizes the Container horizontally.
 
Methods inherited from class org.fest.swing.driver.ComponentDriver
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerDriver

public ContainerDriver(Robot robot)
Creates a new ContainerDriver.

Parameters:
robot - the robot to use to simulate user input.
Method Detail

resizeWidth

@RunsInEDT
protected final void resizeWidth(Container c,
                                           int width)
Resizes the Container horizontally.

Parameters:
c - the target Container.
width - the width that the Container should have after being resized.
Throws:
IllegalStateException - if the Container is not enabled.
IllegalStateException - if the Container is not resizable by the user.
IllegalStateException - if the Container is not showing on the screen.

resizeHeight

@RunsInEDT
protected final void resizeHeight(Container c,
                                            int height)
Resizes the Container vertically.

Parameters:
c - the target Container.
height - the height that the Container should have after being resized.
Throws:
IllegalStateException - if the Container is not enabled.
IllegalStateException - if the Container is not resizable by the user.
IllegalStateException - if the Container is not showing on the screen.

resize

@RunsInEDT
protected final void resize(Container c,
                                      int width,
                                      int height)
Resizes the Container to the given size.

Parameters:
c - the target Container.
width - the width to resize the Container to.
height - the height to resize the Container to.
Throws:
IllegalStateException - if the Container is not enabled.
IllegalStateException - if the Container is not resizable by the user.
IllegalStateException - if the Container is not showing on the screen.

move

@RunsInEDT
public void move(Container c,
                           int x,
                           int y)
Move the given Container to the requested location.

Parameters:
c - the target Container.
x - the horizontal coordinate.
y - the vertical coordinate.
Throws:
IllegalStateException - if the Container is not enabled.
IllegalStateException - if the Container is not movable by the user.
IllegalStateException - if the Container is not showing on the screen.


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