org.fuin.utils4swing.appletviewer
Class SimpleAppletViewerConfig

java.lang.Object
  extended by org.fuin.utils4swing.appletviewer.SimpleAppletViewerConfig

public final class SimpleAppletViewerConfig
extends Object

Configuration for the applet viewer.


Constructor Summary
SimpleAppletViewerConfig()
          Default constructor.
 
Method Summary
 void addArgument(String arg)
          Adds an argument to the applet.
 void addArgument(String key, String value)
          Adds an argument to the applet.
 Applet getApplet()
          Returns the applet to show in the viewer.
 List<String> getArguments()
          Returns command line arguments.
 String getBaseDir()
          Returns the base directory name for the applet.
 URL getBaseUrl()
          Returns the base directory as URL.
 int getHeight()
          Returns the height of the viewer frame.
 String getLookAndFeel()
          Returns the name of the look and feel.
 String getName()
          Returns the name of the applet.
 Map<String,String> getParams()
          Parses the list of arguments for entries in format <key>=<value> and returns them in a map.
 String getTitle()
          Returns the title of the viewer frame.
 int getWidth()
          Returns the width of the viewer frame.
 void setApplet(Applet applet)
          Sets the applet to show in the viewer.
 void setApplet(String applet)
          Sets the applet by creating a new instance.
 void setArguments(List<String> arguments)
          Sets the rest of the command line arguments.
 void setBaseDir(String baseDir)
          Sets the base directory for the applet.
 void setHeight(int height)
          Sets the height of the viewer frame.
 void setLookAndFeel(String lookAndFeel)
          Sets the name of the look and feel.
 void setName(String name)
          Sets the name of the applet.
 void setTitle(String title)
          Sets the title of the viewer frame.
 void setWidth(int width)
          Sets the width of the viewer frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAppletViewerConfig

public SimpleAppletViewerConfig()
Default constructor.

Method Detail

getHeight

public final int getHeight()
Returns the height of the viewer frame.

Returns:
Height.

setHeight

public final void setHeight(int height)
Sets the height of the viewer frame.

Parameters:
height - Height.

getWidth

public final int getWidth()
Returns the width of the viewer frame.

Returns:
Width.

setWidth

public final void setWidth(int width)
Sets the width of the viewer frame.

Parameters:
width - Width.

getName

public final String getName()
Returns the name of the applet.

Returns:
Name.

setName

public final void setName(String name)
Sets the name of the applet.

Parameters:
name - Name.

getTitle

public final String getTitle()
Returns the title of the viewer frame.

Returns:
Frame title.

setTitle

public final void setTitle(String title)
Sets the title of the viewer frame.

Parameters:
title - Frame title.

getLookAndFeel

public final String getLookAndFeel()
Returns the name of the look and feel.

Returns:
Full qualified class name.

setLookAndFeel

public final void setLookAndFeel(String lookAndFeel)
Sets the name of the look and feel.

Parameters:
lookAndFeel - Full qualified class name.

getBaseDir

public final String getBaseDir()
Returns the base directory name for the applet.

Returns:
Base directory.

setBaseDir

public final void setBaseDir(String baseDir)
Sets the base directory for the applet.

Parameters:
baseDir - Base directory.

getArguments

public final List<String> getArguments()
Returns command line arguments.

Returns:
Applet arguments.

setArguments

public final void setArguments(List<String> arguments)
Sets the rest of the command line arguments.

Parameters:
arguments - Other command line parameters than options.

getBaseUrl

public final URL getBaseUrl()
Returns the base directory as URL. Convenience method to wrap the exceptions and directly return an URL.

Returns:
Base directory URL.

getApplet

public final Applet getApplet()
Returns the applet to show in the viewer.

Returns:
Applet.

setApplet

public final void setApplet(Applet applet)
Sets the applet to show in the viewer.

Parameters:
applet - Applet.

setApplet

public final void setApplet(String applet)
Sets the applet by creating a new instance.

Parameters:
applet - Full qualified applet class name.

getParams

public final Map<String,String> getParams()
Parses the list of arguments for entries in format <key>=<value> and returns them in a map.

Returns:
Map with parameters parsed from arguments.

addArgument

public final void addArgument(String arg)
Adds an argument to the applet.

Parameters:
arg - Parameter as <key>=<value> string.

addArgument

public final void addArgument(String key,
                              String value)
Adds an argument to the applet.

Parameters:
key - Key of the parameter.
value - Value of the parameter.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.