org.fest.swing.driver
Class JAppletDriver

java.lang.Object
  extended by org.fest.swing.driver.ComponentDriver
      extended by org.fest.swing.driver.JAppletDriver

public class JAppletDriver
extends ComponentDriver

Understands functional testing of JApplets:

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

Since:
1.2
Author:
Mel Llaguno, Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.swing.driver.ComponentDriver
robot
 
Constructor Summary
JAppletDriver(Robot robot)
          Creates a new JAppletDriver.
 
Method Summary
 AppletContext appletContextOf(JApplet applet)
          Returns the AppletContext of the given JApplet.
 URL codeBaseOf(JApplet applet)
          Returns the URL of the directory that contains the given JApplet.
 URL documentBaseOf(JApplet applet)
          Returns the URL of the document the given JApplet is embedded.
 boolean isActive(JApplet applet)
          Indicates whether the given JApplet is active or not.
 String parameterValue(JApplet applet, String parameterName)
          Returns the value of the named parameter in the given JApplet in the HTML tag, or null if not set.
 void resize(JApplet applet, int width, int height)
          Requests the given JApplet to be resized.
 
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

JAppletDriver

public JAppletDriver(Robot robot)
Creates a new JAppletDriver.

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

appletContextOf

@RunsInEDT
public AppletContext appletContextOf(JApplet applet)
Returns the AppletContext of the given JApplet.

Parameters:
applet - the given JApplet.
Returns:
the AppletContext of the given JApplet.

resize

@RunsInEDT
public void resize(JApplet applet,
                             int width,
                             int height)
Requests the given JApplet to be resized.

Parameters:
applet - the given JApplet.
width - the new width.
height - the new height.

codeBaseOf

@RunsInEDT
public URL codeBaseOf(JApplet applet)
Returns the URL of the directory that contains the given JApplet.

Parameters:
applet - the given JApplet.
Returns:
the URL of the directory that contains the given JApplet.

documentBaseOf

@RunsInEDT
public URL documentBaseOf(JApplet applet)
Returns the URL of the document the given JApplet is embedded.

Parameters:
applet - the given JApplet.
Returns:
the URL of the document the given JApplet is embedded.

parameterValue

@RunsInEDT
public String parameterValue(JApplet applet,
                                       String parameterName)
Returns the value of the named parameter in the given JApplet in the HTML tag, or null if not set.

Parameters:
applet - the given JApplet.
parameterName - a parameter name.
Returns:
the value of the named parameter in the given {code JApplet} in the HTML tag, or null if not set.

isActive

@RunsInEDT
public boolean isActive(JApplet applet)
Indicates whether the given JApplet is active or not.

Parameters:
applet - the given JApplet.
Returns:
true if the given JApplet is active; false otherwise.


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