net.sf.freecol.client.gui
Class CanvasMapEditorMouseListener.ScrollThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.freecol.client.gui.CanvasMapEditorMouseListener.ScrollThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
CanvasMapEditorMouseListener

private class CanvasMapEditorMouseListener.ScrollThread
extends java.lang.Thread

Scrolls the view of the Map by moving its focus.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean cont
           
private  Map.Direction direction
           
private  GUI gui
           
private  Map map
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CanvasMapEditorMouseListener.ScrollThread(Map m, GUI g)
          The constructor to use.
 
Method Summary
 void run()
          Performs the actual scrolling.
 void setDirection(Map.Direction d)
          Sets the direction in which this ScrollThread will scroll.
 void stopScrolling()
          Makes this ScrollThread stop doing what it is supposed to do.
 
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

map

private final Map map

gui

private final GUI gui

direction

private Map.Direction direction

cont

private boolean cont
Constructor Detail

CanvasMapEditorMouseListener.ScrollThread

public CanvasMapEditorMouseListener.ScrollThread(Map m,
                                                 GUI g)
The constructor to use.

Parameters:
m - The Map that needs to be scrolled.
g - The GUI that holds information such as screen resolution.
Method Detail

setDirection

public void setDirection(Map.Direction d)
Sets the direction in which this ScrollThread will scroll.

Parameters:
d - The direction in which this ScrollThread will scroll.

stopScrolling

public void stopScrolling()
Makes this ScrollThread stop doing what it is supposed to do.


run

public void run()
Performs the actual scrolling.

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