Class AnimationWidget

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
au.edu.unsw.cse.AnimationWidget
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, javax.accessibility.Accessible
Direct Known Subclasses:
AnimationWidgetVRML

public class AnimationWidget
extends java.awt.Panel
implements java.lang.Runnable
See Also:
Serialized Form
  • 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

    Fields
    Modifier and Type Field Description
    protected boolean auto  
    protected int delay  
    protected java.lang.Thread engine  
    protected java.awt.Button first  
    protected int frameNo  
    protected java.awt.Button last  
    protected int lastFrame  
    protected java.awt.Button next  
    protected java.awt.Button prev  
    protected java.awt.Scrollbar scroll  
    protected java.awt.Button start  
    protected java.awt.Button stop  
    protected java.awt.TextField text  

    Fields inherited from class java.awt.Component

    accessibleContext, 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

    Constructors
    Constructor Description
    AnimationWidget​(Viewer viewer)  
  • Method Summary

    Modifier and Type Method Description
    void first()  
    boolean handleEvent​(java.awt.Event evt)  
    boolean keyDown​(java.awt.Event evt, int key)  
    void last()  
    void next()  
    void prev()  
    void run()  
    void setAutoPlay​(boolean auto)
    Determine if animation plays automatically
    void setLastFrame​(int lastFrame)  
    void start()  
    void stop()  

    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, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, 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 Details

    • frameNo

      protected int frameNo
    • lastFrame

      protected int lastFrame
    • start

      protected java.awt.Button start
    • stop

      protected java.awt.Button stop
    • next

      protected java.awt.Button next
    • prev

      protected java.awt.Button prev
    • first

      protected java.awt.Button first
    • last

      protected java.awt.Button last
    • text

      protected java.awt.TextField text
    • engine

      protected java.lang.Thread engine
    • scroll

      protected java.awt.Scrollbar scroll
    • delay

      protected int delay
    • auto

      protected boolean auto
  • Constructor Details

    • AnimationWidget

      public AnimationWidget​(Viewer viewer)
  • Method Details

    • setLastFrame

      public void setLastFrame​(int lastFrame)
    • start

      public void start()
    • stop

      public void stop()
    • setAutoPlay

      public void setAutoPlay​(boolean auto)
      Determine if animation plays automatically
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • next

      public void next()
    • prev

      public void prev()
    • first

      public void first()
    • last

      public void last()
    • handleEvent

      public boolean handleEvent​(java.awt.Event evt)
      Overrides:
      handleEvent in class java.awt.Component
    • keyDown

      public boolean keyDown​(java.awt.Event evt, int key)
      Overrides:
      keyDown in class java.awt.Component