|
|||||||||
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
ubc.cs.JLog.Animation.aAnimationEnvironment
public class aAnimationEnvironment
This represents a graphical environment containing any number of named
aAnimationObject
s. These objects are drawn in this graphical
environment.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
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 | |
---|---|
protected iJLogApplBaseServices |
base
|
protected FloatRectangle |
cached_active_bounds_rect
|
protected float |
magnification
|
protected java.util.Hashtable |
named_objects
|
protected java.util.Vector |
objects
|
protected java.awt.Image |
offscreen_buffer
|
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 | |
---|---|
aAnimationEnvironment(iJLogApplBaseServices b)
|
Method Summary | |
---|---|
void |
addObject(aAnimationObject ao)
Add an aAnimationObject . |
java.util.Enumeration |
enumObjects()
Enumerate all aAnimationObject s belonging to the environment. |
java.awt.Image |
getImage(java.lang.String name)
|
float |
getMagnification()
|
aAnimationObject |
getObject(java.lang.String name)
Find an aAnimationObject by name. |
java.awt.Dimension |
getPreferredSize()
|
void |
init()
|
void |
paint(java.awt.Graphics g)
Draws the entire environment, including all aAnimationObject s. |
void |
removeObject(aAnimationObject ao)
Remove an aAnimationObject . |
void |
setMagnification(float m)
Sets the maginfication of the environment. |
void |
update()
|
void |
update(java.awt.Graphics g)
|
Methods inherited from class java.awt.Panel |
---|
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected iJLogApplBaseServices base
protected java.util.Vector objects
protected java.util.Hashtable named_objects
protected java.awt.Image offscreen_buffer
protected float magnification
protected FloatRectangle cached_active_bounds_rect
Constructor Detail |
---|
public aAnimationEnvironment(iJLogApplBaseServices b)
Method Detail |
---|
public void init()
public void setMagnification(float m)
aAnimationObject
s use the value of this attribute to determine
their appearance. Changing the magnification sends update notification to the
objects of the environment, which update their display coordinates accordingly.
Note: Not all Animation objects may scale as expected (e.g., font size and display).
m
- The magnification level (1.0 is 100% - no magnification,
2.0 is 200%, 0.5 is 50%).public final float getMagnification()
public void paint(java.awt.Graphics g)
aAnimationObject
s.
Drawing is done in the order of the animation object's level (smaller levels
are drawn first, larger levels are drawn later).
paint
in class java.awt.Container
g
- The Graphics
environment for
Panel
s' paint
function.public java.util.Enumeration enumObjects()
aAnimationObject
s belonging to the environment.
Enumeration
ofaAnimationObject
s.public aAnimationObject getObject(java.lang.String name)
aAnimationObject
by name.
name
- The string name for an object in the environment.
aAnimationObject
matching the given name.public void addObject(aAnimationObject ao)
aAnimationObject
. The object must already be created
with this environment being its environment.
ao
- The aAnimationObject
to add.public void removeObject(aAnimationObject ao)
aAnimationObject
.
ao
- The aAnimationObject
to remove.public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Container
public java.awt.Image getImage(java.lang.String name)
public void update()
public void update(java.awt.Graphics g)
update
in class java.awt.Container
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |