|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gzz.client.AbstractUpdateManager
A single global instance to manage the updating of windows. The windows are set in a priority order so that even if the user is moving fast, he will get an immediate response through the less important windows not being updated at each step.
Currently, GZigZag is single-threaded very strongly, so you can't allow anything to happen while the UpdateManager is working.
Nested Class Summary | |
static interface |
AbstractUpdateManager.FractCalculator
An animation main curve calculator. |
static class |
AbstractUpdateManager.LinearCalculator
|
static class |
AbstractUpdateManager.SimpleCalculator
|
static interface |
AbstractUpdateManager.Window
A window animation is performed in. |
Field Summary | |
static boolean |
dbg
|
static int |
defaultAnimationTime
|
static AbstractUpdateManager.FractCalculator |
fractCalc
|
protected static AbstractUpdateManager |
instance
|
static float |
jumpFract
|
protected java.util.ArrayList |
ordering
The order of windows, from the most important to the least. |
static java.lang.String |
rcsid
|
Constructor Summary | |
protected |
AbstractUpdateManager(java.lang.Runnable r)
|
Method Summary | |
static void |
addWindow(AbstractUpdateManager.Window w)
|
protected void |
callGenerateEnd(AbstractUpdateManager.Window w,
int millis,
float lod)
Call the method of Window. |
static void |
chg()
Called by a space to inform that some cells have been changed and all windows should be updated. |
static void |
chgAfter(int millis)
We want to update the screen, but not start immediately in order to do some more background processing. |
protected void |
chgImpl()
|
protected boolean |
doIdle()
Do the background tasks that need to be done in the main thread. |
static void |
doWhenIdle(java.lang.Runnable r,
float priority)
Run a given task in the main thread at some point in the future. |
static void |
freeze()
Disable all updating of windows. |
static int |
getAnimationTime()
|
protected int |
getAnimationTimeImpl()
|
protected abstract boolean |
handleEvents(boolean waitForEvent)
For subclasses to override: process incoming events. |
protected void |
interruptEventloop()
|
static void |
prioritize(AbstractUpdateManager.Window w)
Set the window that has the privilege of animating the next update. |
protected void |
prioritizeImpl(AbstractUpdateManager.Window w)
|
static void |
rmWindow(AbstractUpdateManager.Window w)
|
void |
run()
|
static void |
setAnimationTime(int millis)
|
protected void |
setAnimationTimeImpl(int millis)
|
protected static void |
setInstance(AbstractUpdateManager in)
|
static void |
setNoAnimation()
|
static void |
thaw()
Enable again the updating of windows. |
static boolean |
tickIdle()
Play the idle tasks one step; return true if something was done. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String rcsid
public static boolean dbg
protected static AbstractUpdateManager instance
protected java.util.ArrayList ordering
public static final float jumpFract
public static int defaultAnimationTime
public static AbstractUpdateManager.FractCalculator fractCalc
Constructor Detail |
protected AbstractUpdateManager(java.lang.Runnable r)
Method Detail |
protected static void setInstance(AbstractUpdateManager in)
protected void callGenerateEnd(AbstractUpdateManager.Window w, int millis, float lod)
public static void addWindow(AbstractUpdateManager.Window w)
public static void rmWindow(AbstractUpdateManager.Window w)
public static void prioritize(AbstractUpdateManager.Window w)
protected void prioritizeImpl(AbstractUpdateManager.Window w)
public static void setNoAnimation()
public static void setAnimationTime(int millis)
protected void setAnimationTimeImpl(int millis)
public static int getAnimationTime()
protected int getAnimationTimeImpl()
public static void chgAfter(int millis)
public static void chg()
protected void chgImpl()
public static void freeze()
public static void thaw()
protected abstract boolean handleEvents(boolean waitForEvent)
waitForEvent
- Hang until an event comes.
public static void doWhenIdle(java.lang.Runnable r, float priority)
Background.addTask(java.lang.Runnable, float)
protected void interruptEventloop()
protected boolean doIdle()
public static boolean tickIdle()
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |