org.fest.swing.driver
Class JInternalFrameDriver

java.lang.Object
  extended by org.fest.swing.driver.ComponentDriver
      extended by org.fest.swing.driver.ContainerDriver
          extended by org.fest.swing.driver.JComponentDriver
              extended by org.fest.swing.driver.JInternalFrameDriver

public class JInternalFrameDriver
extends JComponentDriver

Understands functional testing of JInternalFrames:

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
JInternalFrameDriver(Robot robot)
          Creates a new JInternalFrameDriver.
 
Method Summary
 void close(JInternalFrame internalFrame)
          Closes the given JInternalFrame.
 void deiconify(JInternalFrame internalFrame)
          De-iconifies the given JInternalFrame.
 void iconify(JInternalFrame internalFrame)
          Iconifies the given JInternalFrame.
 void maximize(JInternalFrame internalFrame)
          Maximizes the given JInternalFrame, deconifying it first if it is iconified.
 void moveTo(JInternalFrame internalFrame, Point where)
          Moves the JInternalFrame to the given location.
 void moveToBack(JInternalFrame internalFrame)
          Brings the given JInternalFrame to the back.
 void moveToFront(JInternalFrame internalFrame)
          Brings the given JInternalFrame to the front.
 void normalize(JInternalFrame internalFrame)
          Normalizes the given JInternalFrame, deconifying it first if it is iconified.
 void resizeHeightTo(JInternalFrame w, int height)
          Resizes the JInternalFrame vertically.
 void resizeTo(JInternalFrame internalFrame, Dimension size)
          Resizes the JInternalFrame to the given size.
 void resizeWidthTo(JInternalFrame internalFrame, int width)
          Resizes the JInternalFrame horizontally.
 
Methods inherited from class org.fest.swing.driver.JComponentDriver
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
 
Methods inherited from class org.fest.swing.driver.ContainerDriver
move, resize, resizeHeight, resizeWidth
 
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

JInternalFrameDriver

public JInternalFrameDriver(Robot robot)
Creates a new JInternalFrameDriver.

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

moveToFront

@RunsInEDT
public void moveToFront(JInternalFrame internalFrame)
Brings the given JInternalFrame to the front.

Parameters:
internalFrame - the target JInternalFrame.

moveToBack

@RunsInEDT
public void moveToBack(JInternalFrame internalFrame)
Brings the given JInternalFrame to the back.

Parameters:
internalFrame - the target JInternalFrame.

maximize

@RunsInEDT
public void maximize(JInternalFrame internalFrame)
Maximizes the given JInternalFrame, deconifying it first if it is iconified.

Parameters:
internalFrame - the target JInternalFrame.
Throws:
IllegalStateException - if the JInternalFrame is not maximizable.
IllegalStateException - if the JInternalFrame is not showing on the screen.
ActionFailedException - if the JInternalFrame vetoes the action.

normalize

@RunsInEDT
public void normalize(JInternalFrame internalFrame)
Normalizes the given JInternalFrame, deconifying it first if it is iconified.

Parameters:
internalFrame - the target JInternalFrame.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.
ActionFailedException - if the JInternalFrame vetoes the action.

iconify

@RunsInEDT
public void iconify(JInternalFrame internalFrame)
Iconifies the given JInternalFrame.

Parameters:
internalFrame - the target JInternalFrame.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.
IllegalStateException - if the JInternalFrame is not iconifiable.
ActionFailedException - if the JInternalFrame vetoes the action.

deiconify

@RunsInEDT
public void deiconify(JInternalFrame internalFrame)
De-iconifies the given JInternalFrame.

Parameters:
internalFrame - the target JInternalFrame.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.
ActionFailedException - if the JInternalFrame vetoes the action.

resizeWidthTo

@RunsInEDT
public void resizeWidthTo(JInternalFrame internalFrame,
                                    int width)
Resizes the JInternalFrame horizontally.

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

resizeHeightTo

@RunsInEDT
public void resizeHeightTo(JInternalFrame w,
                                     int height)
Resizes the JInternalFrame vertically.

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

resizeTo

@RunsInEDT
public void resizeTo(JInternalFrame internalFrame,
                               Dimension size)
Resizes the JInternalFrame to the given size.

Parameters:
internalFrame - the target JInternalFrame.
size - the size to resize the JInternalFrame to.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.
IllegalStateException - if the JInternalFrame is not resizable by the user.

moveTo

@RunsInEDT
public void moveTo(JInternalFrame internalFrame,
                             Point where)
Moves the JInternalFrame to the given location.

Parameters:
internalFrame - the target JInternalFrame.
where - the location to move the JInternalFrame to.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.

close

@RunsInEDT
public void close(JInternalFrame internalFrame)
Closes the given JInternalFrame.

Parameters:
internalFrame - the target JInternalFrame.
Throws:
IllegalStateException - if the JInternalFrame is not showing on the screen.
IllegalStateException - if the JInternalFrame is not closable.


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