edu.umd.cs.jazz.util
Class ZBasicApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
                                |
                                +--edu.umd.cs.jazz.util.ZBasicApplet

public class ZBasicApplet
extends javax.swing.JApplet

ZBasicApplet is a basic applet that creates a simple extendable applet with a single window for Jazz, and basic pan/zoom event handlers.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Field Summary
protected  ZEventHandler activeEventHandler
          The currently active event handler
protected  ZCamera camera
          The camera in the scenegraph
protected  ZBasicComponent component
          The component in the frame that Jazz renders onto.
protected  ZNode layer
          The single node that camera looks onto.
static int METAL_LAF
           
protected static java.lang.String metalClassName
           
static int MOTIF_LAF
           
protected static java.lang.String motifClassName
           
protected  ZEventHandler panEventHandler
          The event handler that supports panning
protected  ZRootNode root
          The root of the scenegraph
protected  ZSurface surface
          The surface associated with the component
static int WINDOWS_LAF
           
protected static java.lang.String windowsClassName
           
protected  ZEventHandler zoomEventHandler
          The event handler that supports zooming
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ZBasicApplet()
          Creates a new basic Jazz applet.
 
Method Summary
 ZCamera getCamera()
          Return the camera associated with the primary surface.
 ZBasicComponent getComponent()
          Return the component that the surface is attached to.
 ZNode getLayer()
          Return the "layer".
 ZEventHandler getPanEventHandler()
          Return the pan event handler.
 ZRootNode getRoot()
          Return the root of the scenegraph.
 ZSurface getSurface()
          Return the surface.
 ZEventHandler getZoomEventHandler()
          Return the zoom event handler.
 void init()
           
 void setLookAndFeel(int laf)
          Set the Swing look and feel.
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

windowsClassName

protected static java.lang.String windowsClassName

metalClassName

protected static java.lang.String metalClassName

motifClassName

protected static java.lang.String motifClassName

WINDOWS_LAF

public static final int WINDOWS_LAF

METAL_LAF

public static final int METAL_LAF

MOTIF_LAF

public static final int MOTIF_LAF

component

protected ZBasicComponent component
The component in the frame that Jazz renders onto.

root

protected ZRootNode root
The root of the scenegraph

camera

protected ZCamera camera
The camera in the scenegraph

surface

protected ZSurface surface
The surface associated with the component

layer

protected ZNode layer
The single node that camera looks onto. It is considered to be the "layer" because many applications will put content under this node which can then be hidden or revealed like a layer.

panEventHandler

protected ZEventHandler panEventHandler
The event handler that supports panning

zoomEventHandler

protected ZEventHandler zoomEventHandler
The event handler that supports zooming

activeEventHandler

protected ZEventHandler activeEventHandler
The currently active event handler
Constructor Detail

ZBasicApplet

public ZBasicApplet()
Creates a new basic Jazz applet. It consists of a simple Jazz scenegraph mapped to a simple component in an applet. The scenegraph consists of a root, a node, and a camera that looks onto that node, plus a surface that is mapped to the window. Each of the scenegraph elements can be used via the accessor functions.
See Also:
getRoot(), getSurface(), getCamera(), getLayer()
Method Detail

init

public void init()
Overrides:
init in class java.applet.Applet

getCamera

public ZCamera getCamera()
Return the camera associated with the primary surface.
Returns:
the camera

getSurface

public ZSurface getSurface()
Return the surface.
Returns:
the surface

getRoot

public ZRootNode getRoot()
Return the root of the scenegraph.
Returns:
the root

getLayer

public ZNode getLayer()
Return the "layer". That is, the single node that the camera looks onto to start.
Returns:
the node

getComponent

public ZBasicComponent getComponent()
Return the component that the surface is attached to.
Returns:
the component

getPanEventHandler

public ZEventHandler getPanEventHandler()
Return the pan event handler.
Returns:
the pan event handler.

getZoomEventHandler

public ZEventHandler getZoomEventHandler()
Return the zoom event handler. *@eturn the zoom event handler.

setLookAndFeel

public void setLookAndFeel(int laf)
Set the Swing look and feel.
Parameters:
laf - The look and feel, can be WINDOWs_LAF, METAL_LAF, or MOTIF_LAF