mauda
Class AutomaticZoomThread

java.lang.Object
  extended by java.lang.Thread
      extended by mauda.AutomaticZoomThread
All Implemented Interfaces:
java.lang.Runnable

public class AutomaticZoomThread
extends java.lang.Thread

Handles an automatically zoom for the jedas-panel.

Author:
Markus Krebs

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AutomaticZoomThread()
          Creates a thread that adjust the zoom of the jedas-panel automatically.
 
Method Summary
static void forceZoom(Exercise ex)
          Perform an automatic zoom immediately.
static boolean isEnabled()
          Returns the enabled-State of the automatic zoom.
 void run()
           
static void setEnabled(boolean en)
          Enables or disables the automatic zoom.
 void startZooming(Exercise ex)
          Starts the automatic zoom.
 void stopZooming()
          Stops the automatic zoom.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutomaticZoomThread

public AutomaticZoomThread()
Creates a thread that adjust the zoom of the jedas-panel automatically.

Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

startZooming

public void startZooming(Exercise ex)
Starts the automatic zoom.

Parameters:
ex - The current exercise.

stopZooming

public void stopZooming()
Stops the automatic zoom.


forceZoom

public static void forceZoom(Exercise ex)
Perform an automatic zoom immediately.

Parameters:
ex - The current exercise.

setEnabled

public static void setEnabled(boolean en)
Enables or disables the automatic zoom. The Thread is still alive.

Parameters:
en - true=enabled, false=disabled

isEnabled

public static boolean isEnabled()
Returns the enabled-State of the automatic zoom.

Returns:
true if enabled, false otherwise