public class TrafficLightFigure extends StateFigure
BaseFigure.Orientation_currentState, _stateColors_lastUpdate, _orientation, _shape, isDebugging, log| Constructor and Description |
|---|
TrafficLightFigure(int numberOfLights,
java.awt.geom.RectangularShape shape) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_update()
Sets the color for each light according to current state.
|
void |
setOrientation(BaseFigure.Orientation orientation)
Sets the orientation and calls
BaseFigure.update() if the orientation
changes. |
addColorScheme, getColorScheme, setStategetOrientation, updateadd, add, contains, figures, figuresFromBack, figuresFromFront, get, getBackgroundFigure, getBounds, getChildren, getFigureCount, getOrigin, getShape, getTransformContext, indexOf, intersects, invalidateCachedBounds, paint, paint, pick, pick, remove, remove, repaint, replaceChild, setBackgroundFigure, setIndex, toString, transform, translatecontains, getInteractor, getLayer, getParent, getToolTipText, getUserObject, hit, isVisible, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisiblepublic TrafficLightFigure(int numberOfLights, java.awt.geom.RectangularShape shape)
public void setOrientation(BaseFigure.Orientation orientation)
BaseFigure.update() if the orientation
changes.setOrientation in class BaseFigureorientation - the orientation.protected void _update()
_update in class BaseFigure