@InternalApi public class JAppletDriver extends ComponentDriver implements AppletStub
Supports functional testing of JApplet
s.
Note: This class is intended for internal use only. Please use the classes in the package
org.assertj.swing.fixture
in your tests.
robot
Constructor and Description |
---|
JAppletDriver(Robot robot)
Creates a new
JAppletDriver . |
JAppletDriver(Robot robot,
JApplet newApplet)
Creates a new
JAppletDriver . |
Modifier and Type | Method and Description |
---|---|
void |
appletResize(int width,
int height)
Requests the default
JApplet to be resized. |
void |
appletResize(JApplet applet,
int width,
int height)
Requests the given
JApplet to be resized. |
Applet |
getApplet(String name)
Returns the
JApplet of the given its name in the AppletContext . |
AppletContext |
getAppletContext() |
AppletContext |
getAppletContext(JApplet applet)
Returns the
AppletContext of the given JApplet . |
Enumeration<Applet> |
getApplets() |
URL |
getCodeBase() |
URL |
getCodeBase(JApplet applet)
Returns the URL of the directory that contains the given
JApplet . |
URL |
getDocumentBase()
Returns the URL of the document the default
JApplet is embedded. |
URL |
getDocumentBase(JApplet applet)
Returns the URL of the document the given
JApplet is embedded. |
String |
getParameter(JApplet applet,
String name)
Returns the value of the named parameter in the given
JApplet in the HTML tag, or null if not set. |
String |
getParameter(String name)
Returns the value of the named parameter in the default
JApplet in the HTML tag, or null if not
set. |
boolean |
isActive()
Indicates whether the default
JApplet is active or not. |
boolean |
isActive(JApplet applet)
Indicates whether the given
JApplet is active or not. |
backgroundOf, checkInEdtEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public JAppletDriver(@Nonnull Robot robot)
JAppletDriver
.robot
- the robot used to simulate user input.public JAppletDriver(@Nonnull Robot robot, @Nonnull JApplet newApplet)
JAppletDriver
.robot
- the robot used to simulate user input.newApplet
- the applet to simulate user input against.@RunsInEDT public void appletResize(int width, int height)
JApplet
to be resized.appletResize
in interface AppletStub
width
- the new width.height
- the new height.@RunsInEDT public void appletResize(@Nonnull JApplet applet, int width, int height)
JApplet
to be resized.applet
- the given JApplet
.width
- the new width.height
- the new height.@RunsInEDT public AppletContext getAppletContext()
getAppletContext
in interface AppletStub
AppletContext
of the default JApplet
.@RunsInEDT public AppletContext getAppletContext(JApplet applet)
AppletContext
of the given JApplet
.applet
- the given JApplet
.AppletContext
of the given JApplet
.@RunsInEDT @Nullable public URL getCodeBase()
getCodeBase
in interface AppletStub
JApplet
.@RunsInEDT @Nullable public URL getCodeBase(@Nonnull JApplet applet)
JApplet
.applet
- the given JApplet
.JApplet
.@RunsInEDT @Nullable public URL getDocumentBase()
JApplet
is embedded.getDocumentBase
in interface AppletStub
JApplet
is embedded.@RunsInEDT @Nullable public URL getDocumentBase(@Nonnull JApplet applet)
JApplet
is embedded.applet
- the given JApplet
.JApplet
is embedded.@RunsInEDT @Nullable public String getParameter(@Nullable String name)
JApplet
in the HTML tag, or null
if not
set.getParameter
in interface AppletStub
name
- a parameter name.null
if not set.@RunsInEDT public String getParameter(@Nonnull JApplet applet, @Nullable String name)
JApplet
in the HTML tag, or null
if not set.applet
- the given JApplet
.name
- a parameter name.null
if not set.@RunsInEDT public boolean isActive()
JApplet
is active or not.isActive
in interface AppletStub
true
if the default JApplet
is active; false
otherwise.@RunsInEDT public boolean isActive(@Nonnull JApplet applet)
JApplet
is active or not.applet
- the given JApplet
.true
if the given JApplet
is active; false
otherwise.@RunsInEDT public Applet getApplet(@Nonnull String name)
JApplet
of the given its name in the AppletContext
.name
- the name of the JApplet
.Applet
with the given name.@RunsInEDT @Nonnull public Enumeration<Applet> getApplets()
Applet
s within the AppletContext
.Copyright © 2014-2015 AssertJ. All Rights Reserved.