Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.objexcel.applet
Class AppletStubImpl

    java.lang.Object
      |
      +--com.objexcel.applet.AppletStubImpl

public final class AppletStubImpl
extends java.lang.Object
implements java.applet.AppletStub

AppletStubImpl implements the AppletStub interface required to host applets in an application

Constructor Summary
`AppletStubImpl(java.applet.Applet a, java.util.Hashtable props)`
`AppletStubImpl(java.applet.Applet a, java.lang.String[] argv)` Creates a new AppletStubImpl instance and initializes the init parameters from the command line.

Method Summary
`void` | `appletResize(int width, int height)` Calls the applet's resize
`java.applet.AppletContext` | `getAppletContext()` Returns the applet's context, which is null in this case.
`java.net.URL` | `getCodeBase()` Returns the CodeBase.
`java.net.URL` | `getDocumentBase()` Returns getCodeBase
`java.lang.String` | `getParameter(java.lang.String p)` Returns the corresponding command line value
`boolean` | `isActive()` Applet is always true
`void` | `setProps(java.util.Hashtable props)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AppletStubImpl

    public AppletStubImpl(java.applet.Applet a,
                          java.lang.String[] argv)

  Creates a new AppletStubImpl instance and initializes the init parameters from the command line. Arguments are passed in as name=value pairs. Reading the command line arguments can be made more sophisciated depending on your needs, but the basic idea will likely remain the same. Also, this particular implementation doesn't deal very well with invalid name=value pairs.
  Parameters:
    `argv[]` - Command line arguments passed to Main
    `an` - Applet instance.

### AppletStubImpl

    public AppletStubImpl(java.applet.Applet a,
                          java.util.Hashtable props)

Method Detail

### setProps

    public void setProps(java.util.Hashtable props)

### appletResize

    public void appletResize(int width,
                             int height)

  Calls the applet's resize
  Specified by:
    appletResize in interface java.applet.AppletStub
  Parameters:
    `width` -
    `height` -
  Returns:
    void

### getAppletContext

    public java.applet.AppletContext getAppletContext()

  Returns the applet's context, which is null in this case. This is an area where more creative programming work can be done to try and provide a context
  Specified by:
    getAppletContext in interface java.applet.AppletStub
  Returns:
    AppletContext Always null

### getCodeBase

    public java.net.URL getCodeBase()

  Returns the CodeBase. If a host parameter isn't provided in the command line arguments, the URL is based on InetAddress.getLocalHost(). The protocol is "file:"
  Specified by:
    getCodeBase in interface java.applet.AppletStub
  Returns:
    URL

### getDocumentBase

    public java.net.URL getDocumentBase()

  Returns getCodeBase
  Specified by:
    getDocumentBase in interface java.applet.AppletStub
  Returns:
    URL

### getParameter

    public java.lang.String getParameter(java.lang.String p)

  Returns the corresponding command line value
  Specified by:
    getParameter in interface java.applet.AppletStub
  Returns:
    String

### isActive

    public boolean isActive()

  Applet is always true
  Specified by:
    isActive in interface java.applet.AppletStub
  Returns:
    boolean True

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD