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

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.UnitAttackAnimationCanvasSwingTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
InGameInputHandler

 class InGameInputHandler.UnitAttackAnimationCanvasSwingTask
extends InGameInputHandler.NoResultCanvasSwingTask

This task plays an unit attack animation in the Canvas.


Field Summary
private  Unit defender
           
private  boolean focus
           
private  boolean success
           
private  Unit unit
           
 
Constructor Summary
InGameInputHandler.UnitAttackAnimationCanvasSwingTask(Unit unit, Unit defender, boolean success)
          Constructor - Play the unit attack animation, always focusing on the source tile.
InGameInputHandler.UnitAttackAnimationCanvasSwingTask(Unit unit, Unit defender, boolean success, boolean focus)
          Constructor - Play the unit attack animation, optionally focusing on the source tile.
 
Method Summary
protected  void doNoResultWork()
           
 
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, invokeSpecial, 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

defender

private final Unit defender

success

private final boolean success

focus

private boolean focus
Constructor Detail

InGameInputHandler.UnitAttackAnimationCanvasSwingTask

public InGameInputHandler.UnitAttackAnimationCanvasSwingTask(Unit unit,
                                                             Unit defender,
                                                             boolean success)
Constructor - Play the unit attack animation, always focusing on the source tile.

Parameters:
unit - The Unit that is attacking.
defender - The Unit that is defending.
success - Did the attack succeed?

InGameInputHandler.UnitAttackAnimationCanvasSwingTask

public InGameInputHandler.UnitAttackAnimationCanvasSwingTask(Unit unit,
                                                             Unit defender,
                                                             boolean success,
                                                             boolean focus)
Constructor - Play the unit attack animation, optionally focusing on the source tile.

Parameters:
unit - The Unit that is attacking.
defender - The Unit that is defending.
success - Did the attack succeed?
focus - Focus on the source tile before the animation.
Method Detail

doNoResultWork

protected void doNoResultWork()
Specified by:
doNoResultWork in class InGameInputHandler.NoResultCanvasSwingTask