com.threerings.getdown.launcher
Class GetdownAppletConfig

java.lang.Object
  extended by com.threerings.getdown.launcher.GetdownAppletConfig

public class GetdownAppletConfig
extends Object


Field Summary
 boolean allowConnect
          Indicates whether Getdown should allow the launched app to connect to it through a server socket bound to localhost on any available port in order to allow interaction with JavaScript code on the page containing the applet.
static String APPARG_PREFIX
          A property specifying the names of additional appargs properties.
 String[] appargs
          Additional appargs to supply to the launching app.
 String appbase
           
static String APPBASE
           
 File appdir
           
 String appname
           
static String APPNAME
           
static String BGIMAGE
           
static String CONNECT
           
static String DIRECT
           
static String ERRORBGIMAGE
           
 String errorimgpath
          The error background image
 String imgpath
          The list of background images and their display time
 String installerFileContents
           
 boolean invokeDirect
          Indicates whether the downloaded app should be launched in the parent applet (true) or as a separate java process (false).
static String JVMARG_PREFIX
          Used to specify the names of additional jvmargs properties.
 String[] jvmargs
          Additional jvmargs to supply to the launching app.
static String PARAM_DELIMITER
           
static String REDIRECT_ON_FINISH
           
static String REDIRECT_ON_FINISH_TARGET
           
 String redirectTarget
           
 URL redirectUrl
          An optional URL to which the applet should redirect when done.
 Rectangle statusBounds
          Optional default bounds for the status panel.
 Color statusColor
           
 
Constructor Summary
GetdownAppletConfig(JApplet applet)
           
GetdownAppletConfig(JApplet applet, String paramPrefix)
           
 
Method Summary
 void config(Getdown getdown)
          Sets getdown status panel size and text color from applet params.
 RotatingBackgrounds getBackgroundImages(ImageLoader loader)
          Gets the rotation background images and error image.The given image loader will be used if the images have not been loaded yet.
static RotatingBackgrounds getBackgroundImages(String imageParam, String errorImagePath, ImageLoader loader)
          Gets the rotation background images and error image.The given image loader will be used if the images have not been loaded yet.
 String getParameter(String param)
          Gets the value of the named parameter.
 String getParameter(String param, String defaultValue)
          Gets the value of an optional Applet parameter.
 void init()
          Does all the fiddly initialization of Getdown and throws an exception if something goes horribly wrong.
 void redirect()
          Uses the Applet context to redirect the browser to a URL (intended for use when the applet is done downloading).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPBASE

public static final String APPBASE
See Also:
Constant Field Values

APPNAME

public static final String APPNAME
See Also:
Constant Field Values

BGIMAGE

public static final String BGIMAGE
See Also:
Constant Field Values

ERRORBGIMAGE

public static final String ERRORBGIMAGE
See Also:
Constant Field Values

PARAM_DELIMITER

public static final String PARAM_DELIMITER
See Also:
Constant Field Values

DIRECT

public static final String DIRECT
See Also:
Constant Field Values

CONNECT

public static final String CONNECT
See Also:
Constant Field Values

REDIRECT_ON_FINISH

public static final String REDIRECT_ON_FINISH
See Also:
Constant Field Values

REDIRECT_ON_FINISH_TARGET

public static final String REDIRECT_ON_FINISH_TARGET
See Also:
Constant Field Values

JVMARG_PREFIX

public static final String JVMARG_PREFIX
Used to specify the names of additional jvmargs properties. Each jvmarg property will be suffixed by a monotonically increasing integer starting at zero, e.g.
<param name="jvmarg0" value="-Xmx256M"/>
 <param name="jvmarg1" value="-Dfoo=bar"/>
 
When a number is reached for which no value exists, we stop looking.

See Also:
Constant Field Values

APPARG_PREFIX

public static final String APPARG_PREFIX
A property specifying the names of additional appargs properties. Each apparg property will be suffixed by a monotonically increasing integer starting at zero, e.g.
<param name="apparg0" value="my awesome value"/>
 <param name="apparg1" value="monkeys"/>
 
When a number is reached for which no value exists, we stop looking.

See Also:
Constant Field Values

appbase

public String appbase

appname

public String appname

imgpath

public String imgpath
The list of background images and their display time


errorimgpath

public String errorimgpath
The error background image


appdir

public File appdir

jvmargs

public String[] jvmargs
Additional jvmargs to supply to the launching app.


appargs

public String[] appargs
Additional appargs to supply to the launching app.


redirectUrl

public URL redirectUrl
An optional URL to which the applet should redirect when done.


redirectTarget

public String redirectTarget

installerFileContents

public String installerFileContents

invokeDirect

public boolean invokeDirect
Indicates whether the downloaded app should be launched in the parent applet (true) or as a separate java process (false).


allowConnect

public boolean allowConnect
Indicates whether Getdown should allow the launched app to connect to it through a server socket bound to localhost on any available port in order to allow interaction with JavaScript code on the page containing the applet.


statusBounds

public Rectangle statusBounds
Optional default bounds for the status panel.


statusColor

public Color statusColor
Constructor Detail

GetdownAppletConfig

public GetdownAppletConfig(JApplet applet)

GetdownAppletConfig

public GetdownAppletConfig(JApplet applet,
                           String paramPrefix)
Method Detail

init

public void init()
          throws Exception
Does all the fiddly initialization of Getdown and throws an exception if something goes horribly wrong.

Throws:
Exception

config

public void config(Getdown getdown)
Sets getdown status panel size and text color from applet params.


getParameter

public String getParameter(String param)
Gets the value of the named parameter. If the param is not set, this will return null.


getParameter

public String getParameter(String param,
                           String defaultValue)
Gets the value of an optional Applet parameter. If the param is not set, the default value is returned.


redirect

public void redirect()
Uses the Applet context to redirect the browser to a URL (intended for use when the applet is done downloading). If the redirect_on_finish parameter was not set, this does nothing.


getBackgroundImages

public RotatingBackgrounds getBackgroundImages(ImageLoader loader)
Gets the rotation background images and error image.The given image loader will be used if the images have not been loaded yet. The locations of the images are pulled from the Applet parameters.


getBackgroundImages

public static RotatingBackgrounds getBackgroundImages(String imageParam,
                                                      String errorImagePath,
                                                      ImageLoader loader)
Gets the rotation background images and error image.The given image loader will be used if the images have not been loaded yet.



Copyright © 2013. All Rights Reserved.