net.sf.freecol.client.control
Class InGameInputHandler.UnitMoveAnimationCanvasSwingTask

java.lang.Object
  extended by net.sf.freecol.client.control.InGameInputHandler.SwingTask
      extended by net.sf.freecol.client.control.InGameInputHandler.NoResultCanvasSwingTask
          extended by net.sf.freecol.client.control.InGameInputHandler.UnitMoveAnimationCanvasSwingTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
InGameInputHandler

 class InGameInputHandler.UnitMoveAnimationCanvasSwingTask
extends InGameInputHandler.NoResultCanvasSwingTask

This task plays an unit movement animation in the Canvas.


Field Summary
private  Tile _destinationTile
           
private  boolean _focus
           
private  Tile _sourceTile
           
private  Unit _unit
           
 
Constructor Summary
InGameInputHandler.UnitMoveAnimationCanvasSwingTask(Unit unit, Tile sourceTile, Tile destinationTile)
          Constructor - Play the unit movement animation, focusing the unit
InGameInputHandler.UnitMoveAnimationCanvasSwingTask(Unit unit, Tile sourceTile, Tile destinationTile, boolean focus)
          Constructor
 
Method Summary
protected  void doWork(Canvas canvas)
           
 
Methods inherited from class net.sf.freecol.client.control.InGameInputHandler.NoResultCanvasSwingTask
doWork
 
Methods inherited from class net.sf.freecol.client.control.InGameInputHandler.SwingTask
getResult, invokeAndWait, invokeLater, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_unit

private final Unit _unit

_destinationTile

private final Tile _destinationTile

_sourceTile

private final Tile _sourceTile

_focus

private boolean _focus
Constructor Detail

InGameInputHandler.UnitMoveAnimationCanvasSwingTask

public InGameInputHandler.UnitMoveAnimationCanvasSwingTask(Unit unit,
                                                           Tile sourceTile,
                                                           Tile destinationTile)
Constructor - Play the unit movement animation, focusing the unit

Parameters:
unit - The unit that is moving
sourceTile - The Tile from which the unit is moving.
destinationTile - The Tile where the unit will be moving to.

InGameInputHandler.UnitMoveAnimationCanvasSwingTask

public InGameInputHandler.UnitMoveAnimationCanvasSwingTask(Unit unit,
                                                           Tile sourceTile,
                                                           Tile destinationTile,
                                                           boolean focus)
Constructor

Parameters:
unit - The unit that is moving
sourceTile - The Tile from which the unit is moving.
destinationTile - The Tile where the unit will be moving to.
focus - If before the animation the screen should focus the unit
Method Detail

doWork

protected void doWork(Canvas canvas)
Specified by:
doWork in class InGameInputHandler.NoResultCanvasSwingTask