org.fest.swing.applet
Class BasicAppletStub

java.lang.Object
  extended by org.fest.swing.applet.BasicAppletStub
All Implemented Interfaces:
AppletStub

public class BasicAppletStub
extends Object
implements AppletStub

Understands a basic (and limited) implementation of AppletStub.

Author:
Alex Ruiz, Yvonne Wang

Constructor Summary
BasicAppletStub(Window viewer, AppletContext context)
          Creates a new BasicAppletStub.
BasicAppletStub(Window viewer, AppletContext context, Map<String,String> parameters)
          Creates a new BasicAppletStub.
 
Method Summary
 void appletResize(int width, int height)
          Resizes this stub's viewer when the applet wants to be resized.
 AppletContext getAppletContext()
          Returns the applet's context.
 URL getCodeBase()
          Not implemented.
 URL getDocumentBase()
          Not implemented.
 String getParameter(String name)
          Returns the value of the named parameter in the HTML tag.
 boolean isActive()
          Not implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAppletStub

public BasicAppletStub(Window viewer,
                       AppletContext context,
                       Map<String,String> parameters)
Creates a new BasicAppletStub.

Parameters:
viewer - the window to host the applet.
context - the applet context.
parameters - the parameters included in an applet HTML tag.
Throws:
NullPointerException - if viewer is null.
NullPointerException - if context is null.
NullPointerException - if parameters is null.

BasicAppletStub

public BasicAppletStub(Window viewer,
                       AppletContext context)
Creates a new BasicAppletStub.

Parameters:
viewer - the window to host the applet.
context - the applet context.
Throws:
NullPointerException - if viewer is null.
NullPointerException - if context is null.
Method Detail

isActive

public boolean isActive()
Not implemented. Returns true.

Specified by:
isActive in interface AppletStub
See Also:
AppletStub.isActive()

appletResize

public void appletResize(int width,
                         int height)
Resizes this stub's viewer when the applet wants to be resized.

Specified by:
appletResize in interface AppletStub
Parameters:
width - the new requested width for the applet.
height - the new requested height for the applet.

getAppletContext

public AppletContext getAppletContext()
Returns the applet's context.

Specified by:
getAppletContext in interface AppletStub
Returns:
the applet's context.

getCodeBase

public URL getCodeBase()
Not implemented. Returns getClass().getResource(".").

Specified by:
getCodeBase in interface AppletStub
See Also:
AppletStub.getCodeBase()

getDocumentBase

public URL getDocumentBase()
Not implemented. Returns getClass().getResource(".").

Specified by:
getDocumentBase in interface AppletStub
See Also:
AppletStub.getDocumentBase()

getParameter

public String getParameter(String name)
Returns the value of the named parameter in the HTML tag.

Specified by:
getParameter in interface AppletStub
Parameters:
name - a parameter name.
Returns:
the value of the named parameter, or null if not set.


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