|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--edu.umd.cs.jazz.util.ZBasicFrame
ZBasicFrame defines a simple top-level Swing Frame (i.e., Window) for use by Jazz. It is intended to be the basis for simple applications, and so also defines basic pan/zoom event handlers.
| Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Field Summary | |
protected ZBasicComponent |
component
The component in the frame that Jazz renders onto. |
protected static int |
HEIGHT
|
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 static int |
WIDTH
|
protected java.awt.event.WindowListener |
windowListener
The window listener for the default basic frame that exits the application when the main window is closed. |
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.JFrame |
accessibleContext,
rootPane,
rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR,
DEFAULT_CURSOR,
E_RESIZE_CURSOR,
HAND_CURSOR,
ICONIFIED,
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 |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
ZBasicFrame()
Creates a new top-level window with a basic Jazz scenegraph in a component within the frame. |
|
ZBasicFrame(boolean desktopRequested)
Creates a new top-level window with a basic Jazz scenegraph in a component within the frame. |
|
ZBasicFrame(boolean desktopRequested,
ZRootNode root,
ZNode layer)
Creates a new top-level window with a basic Jazz scenegraph in a component within the frame. |
|
| 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. |
java.awt.event.WindowListener |
getWindowListener()
Returns the window listener for the default basic frame that exits the application when the main window is closed. |
ZEventHandler |
getZoomEventHandler()
Return the zoom event handler. |
static void |
main(java.lang.String[] s)
Simple test that creates a basic application and puts some text in the scenegraph. |
void |
setLookAndFeel(int laf)
Set the Swing look and feel. |
| Methods inherited from class javax.swing.JFrame |
addImpl,
createRootPane,
frameInit,
getAccessibleContext,
getContentPane,
getDefaultCloseOperation,
getGlassPane,
getJMenuBar,
getLayeredPane,
getRootPane,
isRootPaneCheckingEnabled,
paramString,
processKeyEvent,
processWindowEvent,
setContentPane,
setDefaultCloseOperation,
setGlassPane,
setJMenuBar,
setLayeredPane,
setLayout,
setRootPane,
setRootPaneCheckingEnabled,
update |
| Methods inherited from class java.awt.Frame |
addNotify,
finalize,
getCursorType,
getFrames,
getIconImage,
getMenuBar,
getState,
getTitle,
isResizable,
remove,
removeNotify,
setCursor,
setIconImage,
setMenuBar,
setResizable,
setState,
setTitle |
| Methods inherited from class java.awt.Window |
addWindowListener,
applyResourceBundle,
applyResourceBundle,
dispose,
getFocusOwner,
getInputContext,
getLocale,
getOwnedWindows,
getOwner,
getToolkit,
getWarningString,
isShowing,
pack,
postEvent,
processEvent,
removeWindowListener,
show,
toBack,
toFront |
| 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,
remove,
remove,
removeAll,
removeContainerListener,
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,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processMouseEvent,
processMouseMotionEvent,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
size,
toString,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected static int WIDTH
protected static int HEIGHT
public static final int WINDOWS_LAF
public static final int METAL_LAF
public static final int MOTIF_LAF
protected static java.lang.String windowsClassName
protected static java.lang.String metalClassName
protected static java.lang.String motifClassName
protected ZBasicComponent component
protected ZEventHandler panEventHandler
protected ZEventHandler zoomEventHandler
protected java.awt.event.WindowListener windowListener
| Constructor Detail |
public ZBasicFrame()
getRoot(),
getSurface(),
getCamera(),
getLayer()public ZBasicFrame(boolean desktopRequested)
desktopRequested - If true, then the Jazz window is created as an internal frame in a Swing desktop. Else, it is in a Swing JFramegetRoot(),
getSurface(),
getCamera(),
getLayer()
public ZBasicFrame(boolean desktopRequested,
ZRootNode root,
ZNode layer)
To attach a new frame to an existing scenegraph, then specify the root and layer parameters. The root should be an existing scenegraph, and the layer should be an existing layer that should be seen on this frame. A new camera and surface will be created, and the camera will be set to look at the layer. If root and layer are specified as null, then a new scenegraph will be created.
desktopRequested - If true, then the Jazz window is created as an internal frame in a Swing desktop. Else, it is in a Swing JFrameroot - Existing root of scenegraph, or null for nonelayer - Existing layer of scenegraph, or null for nonegetRoot(),
getSurface(),
getCamera(),
getLayer()| Method Detail |
public ZCamera getCamera()
public ZSurface getSurface()
public ZRootNode getRoot()
public ZNode getLayer()
public ZBasicComponent getComponent()
public java.awt.event.WindowListener getWindowListener()
public ZEventHandler getPanEventHandler()
public ZEventHandler getZoomEventHandler()
public void setLookAndFeel(int laf)
laf - The look and feel, can be WINDOWs_LAF, METAL_LAF, or MOTIF_LAFpublic static void main(java.lang.String[] s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||