de.enough.polish.ui
Class AnimationThread

java.lang.Object
  extended by java.lang.Thread
      extended by de.enough.polish.ui.AnimationThread
All Implemented Interfaces:
java.lang.Runnable

public class AnimationThread
extends java.lang.Thread

Is used to animate Screens, Backgrounds and Items.

You can specify the animation interval in milliseconds in the variables section of your build.xml script. Example:

  
                
        
        
sets the interval to 200 ms. When not specified, the default interval of 100 ms will be used.

Copyright Enough Software 2004 - 2008

 history
        15-Mar-2004 - rob creation
 

Author:
Robert Virkus, robert@enough.de

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int ANIMATION_INTERVAL
           
protected static boolean releaseResourcesOnScreenChange
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AnimationThread()
          Creates a new animation thread.
 
Method Summary
static void addAnimationItem(javax.microedition.lcdui.CustomItem item)
          Adds the given item to list of items that should be animated.
static void addAnimationItem(Item item)
          Adds the given item to list of items that should be animated.
static void removeAnimationItem(javax.microedition.lcdui.CustomItem item)
          Removes the given item to list of items that should be animated.
static void removeAnimationItem(Item item)
          Removes the given item to list of items that should be animated.
 void run()
          Animates the current screen.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANIMATION_INTERVAL

public static final int ANIMATION_INTERVAL
See Also:
Constant Field Values

releaseResourcesOnScreenChange

protected static boolean releaseResourcesOnScreenChange
Constructor Detail

AnimationThread

public AnimationThread()
Creates a new animation thread.

Method Detail

run

public void run()
Animates the current screen.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

addAnimationItem

public static void addAnimationItem(Item item)
Adds the given item to list of items that should be animated. Typically an item adds itself to the list in the showNotify() method and then de-registers itself in the hideNotify() method.

Parameters:
item - the item that needs to be animated regardless of it's focused state etc.
See Also:
removeAnimationItem(Item)

addAnimationItem

public static void addAnimationItem(javax.microedition.lcdui.CustomItem item)
Adds the given item to list of items that should be animated. Typically an item adds itself to the list in the showNotify() method and then de-registers itself in the hideNotify() method.

Parameters:
item - the item that needs to be animated regardless of it's focused state etc.
See Also:
removeAnimationItem(javax.microedition.lcdui.CustomItem)

removeAnimationItem

public static void removeAnimationItem(Item item)
Removes the given item to list of items that should be animated. Typically an item adds itself to the list in the showNotify() method and then de-registers itself in the hideNotify() method.

Parameters:
item - the item that does not need to be animated anymore
See Also:
addAnimationItem(Item)

removeAnimationItem

public static void removeAnimationItem(javax.microedition.lcdui.CustomItem item)
Removes the given item to list of items that should be animated. Typically an item adds itself to the list in the showNotify() method and then de-registers itself in the hideNotify() method.

Parameters:
item - the item that does not need to be animated anymore
See Also:
addAnimationItem(javax.microedition.lcdui.CustomItem)