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()
AnimatorBuilderAnimator.
This method may be called only once; subsequent calls throw an
IllegalStateException.getAnimator in interface AnimatorBuilderpublic void addLight(Light d, int i, int j)
AnimatorBuilderLight to the display at position i,j.addLight in interface AnimatorBuilderpublic void addHorizontalRoad(Road l, int i, int j, boolean eastToWest)
AnimatorBuilderRoad 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 AnimatorBuilderpublic void addVerticalRoad(Road l, int i, int j, boolean southToNorth)
AnimatorBuilderRoad 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