PluginAppletViewer (IcedTea-Web: Plugin )
Keywords: sun.applet.PluginAppletViewer class
Date: 2018-03-18

sun.applet

## Class PluginAppletViewer

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - java.awt.Window
      - - java.awt.Frame
        - - sun.awt.EmbeddedFrame
          - - sun.awt.X11.XEmbeddedFrame
            - - sun.applet.PluginAppletViewer

- All Implemented Interfaces:
    java.applet.AppletContext, java.awt.image.ImageObserver, java.awt.KeyEventDispatcher, java.awt.MenuContainer, java.awt.print.Printable, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, net.sourceforge.jnlp.splashscreen.SplashController

      public class PluginAppletViewer
      extends sun.awt.X11.XEmbeddedFrame
      implements java.applet.AppletContext, java.awt.print.Printable, net.sourceforge.jnlp.splashscreen.SplashController

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.awt.Frame

      `java.awt.Frame.AccessibleAWTFrame`

    - ### Nested classes/interfaces inherited from class java.awt.Window

      `java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `APPLET_TIMEOUT`

    - ### Fields inherited from class sun.awt.EmbeddedFrame

      `BACKWARD, FORWARD`

    - ### Fields inherited from class java.awt.Frame

      `CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR`

    - ### Fields inherited from class java.awt.Component

      `accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface java.awt.print.Printable

      `NO_SUCH_PAGE, PAGE_EXISTS`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginAppletViewer()` Null constructor to allow instantiation via newInstance()

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.Object` | `call(long internal, java.lang.String name, java.lang.Object[] args)`
    `static int` | `countApplets()` How many applets are running?
    `static java.lang.Object` | `eval(long internal, java.lang.String s)`
    `static PluginAppletViewer` | `framePanel(int identifier, long handle, int width, int height, net.sourceforge.jnlp.NetxPanel panel)`
    `java.applet.Applet` | `getApplet(java.lang.String name)` Get an applet by name.
    `java.util.Enumeration<java.applet.Applet>` | `getApplets()` Return an enumeration of all the accessible applets on this page.
    `java.applet.AudioClip` | `getAudioClip(java.net.URL url)` Get an audio clip.
    `java.awt.Image` | `getImage(java.net.URL url)` Get an image.
    `static java.lang.Object` | `getMember(long internal, java.lang.String name)`
    `static java.lang.Object` | `getSlot(long internal, int index)`
    `int` | `getSplashHeigth()`
    `int` | `getSplashWidth()`
    `java.io.InputStream` | `getStream(java.lang.String key)`
    `java.util.Iterator<java.lang.String>` | `getStreamKeys()`
    `long` | `getWindow()`
    `static void` | `handleMessage(int identifier, int reference, java.lang.String message)` Handle an incoming message from the plugin.
    `void` | `handleMessage(int reference, java.lang.String message)`
    `static sun.applet.AppletPanel` | `initialize(net.sourceforge.jnlp.PluginParameters params, long handle, java.net.URL url, int identifier, net.sourceforge.jnlp.PluginBridge pb)`
    `static void` | `JavaScriptFinalize(long internal)`
    `static java.lang.String` | `javascriptToString(long internal)`
    `void` | `paint(java.awt.Graphics g)` This method calls paint directly, rather than via super.update() since the parent class's update() just does a couple of checks (both of which are accounted for) and then calls paint anyway.
    `int` | `print(java.awt.Graphics graphics, java.awt.print.PageFormat pf, int pageIndex)`
    `static void` | `removeMember(long internal, java.lang.String name)`
    `void` | `removeSplash()`
    `void` | `replaceSplash(net.sourceforge.jnlp.splashscreen.SplashPanel newSplash)`
    `static java.lang.Object` | `requestPluginCookieInfo(java.net.URI uri)`
    `static java.lang.Object` | `requestPluginProxyInfo(java.lang.String uri)` Obtain information about the proxy from the browser.
    `static void` | `setMember(long internal, java.lang.String name, java.lang.Object value)`
    `static void` | `setPluginCallRequestFactory(PluginCallRequestFactory rf)`
    `static void` | `setSlot(long internal, int index, java.lang.Object value)`
    `void` | `setStream(java.lang.String key, java.io.InputStream stream)`
    `static void` | `setStreamhandler(PluginStreamHandler sh)`
    `void` | `showDocument(java.net.URL url)`
    `void` | `showDocument(java.net.URL url, java.lang.String target)`
    `void` | `showStatus(java.lang.String status)` Show status.
    `void` | `update(java.awt.Graphics g)`
    `void` | `updateAtts()` Make sure the atrributes are uptodate.
    `static void` | `waitForAppletInit(net.sourceforge.jnlp.NetxPanel panel)` Function to block until applet initialization is complete.
    `static long` | `waitTillTimeout(java.util.concurrent.locks.ReentrantLock lock, java.util.concurrent.locks.Condition cond, long timeout)` Waits on a given condition queue until timeout.

    - ### Methods inherited from class sun.awt.X11.XEmbeddedFrame

      `addNotify, registerAccelerator, synthesizeWindowActivation, traverseIn, traverseOut, unregisterAccelerator`

    - ### Methods inherited from class sun.awt.EmbeddedFrame

      `dispatchKeyEvent, getAppletIfAncestorOf, getBoundsPrivate, getCursor, getLocationPrivate, getParent, hide, isCursorAllowed, isResizable, notifyModalBlocked, propertyChange, registerListeners, remove, setBoundsPrivate, setCursorAllowed, setIconImage, setIconImages, setLocationPrivate, setMenuBar, setPeer, setResizable, setTitle, show, supportsXEmbed, toBack, toFront`

    - ### Methods inherited from class java.awt.Frame

      `getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isUndecorated, paramString, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setOpacity, setShape, setState, setUndecorated`

    - ### Methods inherited from class java.awt.Window

      `addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, validate, validateTree`

    - ### Methods inherited from class java.awt.Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.awt.MenuContainer

      `getFont, postEvent`

- - ### Field Detail

    - #### APPLET_TIMEOUT

          public static final long APPLET_TIMEOUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PluginAppletViewer

          public PluginAppletViewer()

      Null constructor to allow instantiation via newInstance()

  - ### Method Detail

    - #### framePanel

          public static PluginAppletViewer framePanel(int identifier,
                                                      long handle,
                                                      int width,
                                                      int height,
                                                      net.sourceforge.jnlp.NetxPanel panel)

    - #### replaceSplash

          public void replaceSplash(net.sourceforge.jnlp.splashscreen.SplashPanel newSplash)

      Specified by:
        `replaceSplash` in interface `net.sourceforge.jnlp.splashscreen.SplashController`

    - #### removeSplash

          public void removeSplash()

      Specified by:
        `removeSplash` in interface `net.sourceforge.jnlp.splashscreen.SplashController`

    - #### getSplashWidth

          public int getSplashWidth()

      Specified by:
        `getSplashWidth` in interface `net.sourceforge.jnlp.splashscreen.SplashController`

    - #### getSplashHeigth

          public int getSplashHeigth()

      Specified by:
        `getSplashHeigth` in interface `net.sourceforge.jnlp.splashscreen.SplashController`

    - #### setStreamhandler

          public static void setStreamhandler(PluginStreamHandler sh)

    - #### setPluginCallRequestFactory

          public static void setPluginCallRequestFactory(PluginCallRequestFactory rf)

    - #### initialize

          public static sun.applet.AppletPanel initialize(net.sourceforge.jnlp.PluginParameters params,
                                                          long handle,
                                                          java.net.URL url,
                                                          int identifier,
                                                          net.sourceforge.jnlp.PluginBridge pb)

    - #### handleMessage

          public static void handleMessage(int identifier,
                                           int reference,
                                           java.lang.String message)

      Handle an incoming message from the plugin.
      Parameters:
        `identifier` - id of plugin
        `reference` - reference id of message
        `message` - text itself

    - #### waitForAppletInit

          public static void waitForAppletInit(net.sourceforge.jnlp.NetxPanel panel)

      Function to block until applet initialization is complete. This function will return if the wait is longer than `APPLET_TIMEOUT`
      Parameters:
        `panel` - the instance to wait for.

    - #### handleMessage

          public void handleMessage(int reference,
                                    java.lang.String message)

    - #### getAudioClip

          public java.applet.AudioClip getAudioClip(java.net.URL url)

      Get an audio clip.
      Specified by:
        `getAudioClip` in interface `java.applet.AppletContext`

    - #### getImage

          public java.awt.Image getImage(java.net.URL url)

      Get an image.
      Specified by:
        `getImage` in interface `java.applet.AppletContext`

    - #### getApplet

          public java.applet.Applet getApplet(java.lang.String name)

      Get an applet by name.
      Specified by:
        `getApplet` in interface `java.applet.AppletContext`

    - #### getApplets

          public java.util.Enumeration<java.applet.Applet> getApplets()

      Return an enumeration of all the accessible applets on this page.
      Specified by:
        `getApplets` in interface `java.applet.AppletContext`

    - #### showDocument

          public void showDocument(java.net.URL url)

      Specified by:
        `showDocument` in interface `java.applet.AppletContext`

    - #### showDocument

          public void showDocument(java.net.URL url,
                                   java.lang.String target)

      Specified by:
        `showDocument` in interface `java.applet.AppletContext`

    - #### showStatus

          public void showStatus(java.lang.String status)

      Show status.
      Specified by:
        `showStatus` in interface `java.applet.AppletContext`

    - #### getWindow

          public long getWindow()

    - #### getMember

          public static java.lang.Object getMember(long internal,
                                                   java.lang.String name)

    - #### setMember

          public static void setMember(long internal,
                                       java.lang.String name,
                                       java.lang.Object value)

    - #### setSlot

          public static void setSlot(long internal,
                                     int index,
                                     java.lang.Object value)

    - #### getSlot

          public static java.lang.Object getSlot(long internal,
                                                 int index)

    - #### eval

          public static java.lang.Object eval(long internal,
                                              java.lang.String s)

    - #### removeMember

          public static void removeMember(long internal,
                                          java.lang.String name)

    - #### call

          public static java.lang.Object call(long internal,
                                              java.lang.String name,
                                              java.lang.Object[] args)

    - #### requestPluginCookieInfo

          public static java.lang.Object requestPluginCookieInfo(java.net.URI uri)

    - #### requestPluginProxyInfo

          public static java.lang.Object requestPluginProxyInfo(java.lang.String uri)

      Obtain information about the proxy from the browser.
      Parameters:
        `uri` - a String in url-encoded form
      Returns:
        a `URI` that indicates a proxy.

    - #### JavaScriptFinalize

          public static void JavaScriptFinalize(long internal)

    - #### javascriptToString

          public static java.lang.String javascriptToString(long internal)

    - #### setStream

          public void setStream(java.lang.String key,
                                java.io.InputStream stream)
                         throws java.io.IOException

      Specified by:
        `setStream` in interface `java.applet.AppletContext`
      Throws:
        `java.io.IOException`

    - #### getStream

          public java.io.InputStream getStream(java.lang.String key)

      Specified by:
        `getStream` in interface `java.applet.AppletContext`

    - #### getStreamKeys

          public java.util.Iterator<java.lang.String> getStreamKeys()

      Specified by:
        `getStreamKeys` in interface `java.applet.AppletContext`

    - #### updateAtts

          public void updateAtts()

      Make sure the atrributes are uptodate.

    - #### print

          public int print(java.awt.Graphics graphics,
                           java.awt.print.PageFormat pf,
                           int pageIndex)

      Specified by:
        `print` in interface `java.awt.print.Printable`

    - #### countApplets

          public static int countApplets()

      How many applets are running?
      Returns:
        number of applets run in this JVM

    - #### paint

          public void paint(java.awt.Graphics g)

      This method calls paint directly, rather than via super.update() since the parent class's update() just does a couple of checks (both of which are accounted for) and then calls paint anyway.
      Overrides:
        `paint` in class `java.awt.Window`

    - #### update

          public void update(java.awt.Graphics g)

      Overrides:
        `update` in class `java.awt.Container`

    - #### waitTillTimeout

          public static long waitTillTimeout(java.util.concurrent.locks.ReentrantLock lock,
                                             java.util.concurrent.locks.Condition cond,
                                             long timeout)

      Waits on a given condition queue until timeout. This function assumes that the monitor lock has already been acquired by the caller. If the given lock is null, this function returns immediately.
      Parameters:
        `lock` - the lock that must be held when this method is called.
        `cond` - the condition queue on which to wait for notifications.
        `timeout` - The maximum time to wait (nanoseconds)
      Returns:
        Approximate time spent sleeping (not guaranteed to be perfect)

Submit a bug or feature