Class Animation
- java.lang.Object
-
- net.sf.freecol.client.gui.animation.Animation
-
- Direct Known Subclasses:
UnitImageAnimation
,UnitMoveAnimation
public abstract class Animation extends java.lang.Object
The base class for the animations. Note: we used to focus the map on the unit even when animation is off as long as the center-active-unit option was set. However IR#115 requested that if animation is off that we display nothing so as to speed up the other player moves as much as possible.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
executeWithLabel(javax.swing.JLabel unitLabel, Animations.Procedure paintCallback)
The code to be executed when a unit is out for animation.java.util.List<Tile>
getTiles()
Get the tiles where the animation occurs.Unit
getUnit()
Get the unit to animate.void
setPoints(java.util.List<java.awt.Point> points)
Set the points for each tile.
-
-
-
Method Detail
-
getUnit
public Unit getUnit()
Get the unit to animate.- Returns:
- The
Unit
.
-
getTiles
public java.util.List<Tile> getTiles()
Get the tiles where the animation occurs.- Returns:
- A list of
Tile
s.
-
setPoints
public void setPoints(java.util.List<java.awt.Point> points)
Set the points for each tile.- Parameters:
points
- A list ofPoint
s to position the animation label.
-
executeWithLabel
public abstract void executeWithLabel(javax.swing.JLabel unitLabel, Animations.Procedure paintCallback)
The code to be executed when a unit is out for animation.- Parameters:
unitLabel
- AJLabel
with an image of the unit to animate.paintCallback
- A callback to request that the animation area be repainted.
-
-