Class AppletDesc
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.application.AppletDesc
- All Implemented Interfaces:
EntryPoint
The applet-desc element contains all information needed to launch an Applet, given the resources described
by the resources elements. A JNLP file is an application descriptor for an Applet if the applet-desc
element is specified.
- Author:
- Jon A. Maxwell (JAM) - initial author
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAppletDesc(String name, String mainClass, String progressClass, URL documentBase, int width, int height, Map<String, String> parameters) Create an Applet descriptor.AppletDesc(String name, String mainClass, URL documentBase, int width, int height, Map<String, String> parameters) Create an Applet descriptor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String name, String value) Adds a parameter to the Applet.intFor Java applications this method returns the name of the class containing the public static void main(String[]) method.getName()The name of a class containing an implementation of theDownloadServiceListenerinterface.intgetWidth()
-
Field Details
-
APPLET_DESC_ELEMENT
- See Also:
-
DOCUMENTBASE_ATTRIBUTE
- See Also:
-
PARAM_ELEMENT
- See Also:
-
NAME_ATTRIBUTE
- See Also:
-
WIDTH_ATTRIBUTE
- See Also:
-
HEIGHT_ATTRIBUTE
- See Also:
-
PROGRESS_CLASS_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
AppletDesc
public AppletDesc(String name, String mainClass, URL documentBase, int width, int height, Map<String, String> parameters) Create an Applet descriptor.- Parameters:
name- the applet name that is available to the Applet through the AppletContextmainClass- the fully-qualified name of the main Applet classdocumentBase- the document base for the Appletwidth- the width of the Applet in pixelsheight- the height of the Applet in pixelsparameters- the parameters
-
AppletDesc
public AppletDesc(String name, String mainClass, String progressClass, URL documentBase, int width, int height, Map<String, String> parameters) Create an Applet descriptor.- Parameters:
name- the applet name that is available to the Applet through the AppletContextmainClass- the fully-qualified name of the main Applet classprogressClass- the fully qualified name of the class containing an implementation of theDownloadServiceListenerinterfacedocumentBase- the document base for the Appletwidth- the width of the Applet in pixelsheight- the height of the Applet in pixelsparameters- the parameters
-
-
Method Details
-
getName
- Returns:
- the applet name that is available to the Applet through the AppletContext
-
getMainClass
Description copied from interface:EntryPointFor Java applications this method returns the name of the class containing the public static void main(String[]) method. The name and/or meaning may vary as is appropriate for other types of applications. For Java this attribute can be omitted if the main class can be found from the Main-Class manifest entry in the main JAR file.- Specified by:
getMainClassin interfaceEntryPoint- Returns:
- the fully-qualified name of the main Applet class
-
getProgressClass
The name of a class containing an implementation of theDownloadServiceListenerinterface.- Returns:
- the fully qualified name of the class containing an implementation of the
DownloadServiceListenerinterface
-
getDocumentBase
- Returns:
- the document base for the Applet as a URL
-
getWidth
public int getWidth()- Returns:
- the width of the Applet in pixels
-
getHeight
public int getHeight()- Returns:
- the height of the Applet in pixels
-
getParameters
- Returns:
- the Applet parameters
-
addParameter
Adds a parameter to the Applet. If the parameter already exists then it is overwritten with the new value. Adding a parameter will have no effect on already-running Applets launched from this JNLP file.- Parameters:
name- key of valuevalue- value to be added
-