java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.application.AppletDesc
All Implemented Interfaces:
EntryPoint

public class AppletDesc extends Object implements 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 Details

  • 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 AppletContext
      mainClass - the fully-qualified name of the main Applet class
      documentBase - the document base for the Applet
      width - the width of the Applet in pixels
      height - the height of the Applet in pixels
      parameters - 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 AppletContext
      mainClass - the fully-qualified name of the main Applet class
      progressClass - the fully qualified name of the class containing an implementation of the DownloadServiceListener interface
      documentBase - the document base for the Applet
      width - the width of the Applet in pixels
      height - the height of the Applet in pixels
      parameters - the parameters
  • Method Details

    • getName

      public String getName()
      Returns:
      the applet name that is available to the Applet through the AppletContext
    • getMainClass

      public String getMainClass()
      Description copied from interface: EntryPoint
      For 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:
      getMainClass in interface EntryPoint
      Returns:
      the fully-qualified name of the main Applet class
    • getProgressClass

      public String getProgressClass()
      The name of a class containing an implementation of the DownloadServiceListener interface.
      Returns:
      the fully qualified name of the class containing an implementation of the DownloadServiceListener interface
    • getDocumentBase

      public URL 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

      public Map<String,String> getParameters()
      Returns:
      the Applet parameters
    • addParameter

      public void addParameter(String name, String value)
      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 value
      value - value to be added