public class SwingAnimatorBuilder extends java.lang.Object implements AnimatorBuilder
Constructor and Description |
---|
SwingAnimatorBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addHorizontalRoad(Road l,
int i,
int j,
boolean eastToWest)
Add the horizontal
Road to the display, west of position i,j . |
void |
addLight(Light d,
int i,
int j)
Add the
Light to the display at position i,j . |
void |
addVerticalRoad(Road l,
int i,
int j,
boolean southToNorth)
Add the vertical
Road to the display, north of position i,j . |
Animator |
getAnimator()
Returns the
Animator . |
public SwingAnimatorBuilder()
public Animator getAnimator()
AnimatorBuilder
Animator
.
This method may be called only once; subsequent calls throw an
IllegalStateException
.getAnimator
in interface AnimatorBuilder
public void addLight(Light d, int i, int j)
AnimatorBuilder
Light
to the display at position i,j
.addLight
in interface AnimatorBuilder
public void addHorizontalRoad(Road l, int i, int j, boolean eastToWest)
AnimatorBuilder
Road
to the display, west of position i,j
.
If eastToWest
is true, then road position 0 is the eastmost position.
If eastToWest
is false, then road position 0 is the westmost position.addHorizontalRoad
in interface AnimatorBuilder
public void addVerticalRoad(Road l, int i, int j, boolean southToNorth)
AnimatorBuilder
Road
to the display, north of position i,j
.
If southToNorth
is true, then road position 0 is the southmost position.
If southToNorth
is false, then road position 0 is the northmost position.addVerticalRoad
in interface AnimatorBuilder