public abstract class StateFigure extends BaseFigure
BaseFigure.Orientation
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
_currentState
Current state associated with this monitor. null by default
|
protected java.util.Map<java.lang.Object,java.awt.Color[]> |
_stateColors |
_lastUpdate, _orientation, _shape, isDebugging, log
Modifier | Constructor and Description |
---|---|
protected |
StateFigure(java.awt.geom.RectangularShape shape) |
Modifier and Type | Method and Description |
---|---|
void |
addColorScheme(java.lang.Object state,
java.awt.Color[] colors)
Sets the color scheme for a state.
|
java.awt.Color[] |
getColorScheme(java.lang.Object state)
Returns the color scheme associated with a state.
|
void |
setState(java.lang.Object state)
Sets the current state of this figure.
|
_update, getOrientation, setOrientation, update
add, 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, translate
contains, getInteractor, getLayer, getParent, getToolTipText, getUserObject, hit, isVisible, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
protected java.lang.Object _currentState
protected java.util.Map<java.lang.Object,java.awt.Color[]> _stateColors
protected StateFigure(java.awt.geom.RectangularShape shape)
public void addColorScheme(java.lang.Object state, java.awt.Color[] colors)
state
- the statecolors
- the color schemepublic java.awt.Color[] getColorScheme(java.lang.Object state)
state
- the statepublic void setState(java.lang.Object state)
state
- the new state.