|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
AppletLauncher3D
Basic JOGL installer for Applets. The key functionality this class supplies is the ability to deploy unsigned applets which use JOGL. It may also be used to deploy signed applets in which case multiple security dialogs will be displayed.
On the server side the codebase must contain jogl.jar and all of the jogl-natives-*.jar files from the standard JOGL distribution. This is the location from which the JOGL library used by the applet is downloaded. The codebase additionally contains the jar file of the user's potentially untrusted applet. The jogl.jar and all jogl-natives jars must be signed by the same entity, which is typically Sun Microsystems, Inc. Sample applet code:
<applet code="com.sun.opengl.util.JOGLAppletLauncher" width=600 height=400 codebase="/lib" archive="jogl.jar,your_applet.jar"> <param name="subapplet.classname" VALUE="untrusted.JOGLApplet"> <param name="subapplet.displayname" VALUE="My JOGL Applet"> <param name="progressbar" value="true"> <param name="cache_archive" VALUE="jogl.jar,your_applet.jar"> <param name="cache_archive_ex" VALUE="jogl.jar;preload,your_applet.jar;preload"> </applet>
There are some limitations with this approach. It is not possible to specify e.g. -Dsun.java2d.noddraw=true or -Dsun.java2d.opengl=true for better control over the Java2D pipeline as it is with Java Web Start. There appear to be issues with multiple JOGL-based applets on the same web page, though multiple instances of the same applet appear to work. The latter may simply be a bug which needs to be fixed.
The JOGL natives are cached in the user's home directory (the value of the "user.home" system property in Java) under the directory .jogl_ext. The Java Plug-In is responsible for performing all other jar caching. If the JOGL installation is updated on the server, the .jogl_ext cache will automatically be updated.
This technique requires that JOGL has not been installed in to the JRE under e.g. jre/lib/ext. If problems are seen when deploying this applet launcher, the first question to ask the end user is whether jogl.jar and any associated DLLs, .so's, etc. are installed directly in to the JRE. The applet launcher has been tested primarily under Mozilla and Firefox; there may be problems when running under, for example, Opera.
Field Summary |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AppletLauncher3D()
|
Method Summary | |
void |
destroy()
|
java.applet.Applet |
getSubApplet()
Helper method to make it easier to call methods on the sub-applet from JavaScript. |
void |
init()
Applet initialization |
void |
start()
start asynchroneous loading of libraries if needed |
void |
stop()
|
Methods inherited from class java.applet.Applet |
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AppletLauncher3D()
Method Detail |
public void init()
public void start()
public void stop()
public void destroy()
public java.applet.Applet getSubApplet()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |