|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.graphics.instruments.A_Instrument
uavsim.graphics.instruments.A_RectangularInstrument
uavsim.graphics.instruments.stallenunciator.StallEnunciator
public class StallEnunciator
Defines a simple visual stall enunciator that indicates a stall with the word "STALL". It differentiates imminent and full stalls by the frequency of flashes.
| Nested Class Summary | |
|---|---|
static class |
StallEnunciator.E_StallState
Defines the stall states. |
| Field Summary | |
|---|---|
private int |
_stallBlinkCountdown
the countdown to flash the stall text |
private StallEnunciator.E_StallState |
_state
the stall state |
private static TextProperties |
DISTANCE_TEXT
the text properties of the distance |
private static CoordinateCartesianRelative |
DISTANCE_WINDOW_ANCHOR_SCALE
the anchor position of the window relative to the center of the instrument |
private static java.awt.Color |
DISTANCE_WINDOW_BODY_COLOR
the color of the window body |
private static java.awt.Color |
DISTANCE_WINDOW_OUTLINE_COLOR
the color of the window body outline |
private static Scaler |
DISTANCE_WINDOW_OUTLINE_SCALE
the size scale of the distance-window outline relative to the instrument size |
private static ScalerPair |
DISTANCE_WINDOW_SIZE_SCALE
the size scale of the window relative to the instrument size |
private static RectangularFaceplaceDescriptor |
FACEPLATE
the faceplace |
private static int |
STALL_BLINK_COUNTDOWN
the flash rate for blinking the stall text |
| Fields inherited from class uavsim.graphics.instruments.A_RectangularInstrument |
|---|
_faceplaceDescriptor, _faceSize |
| Fields inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
_canvasAnchor, _canvasSize, _graphics, _id |
| Constructor Summary | |
|---|---|
StallEnunciator(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
Creates a stall enunciator. |
|
| Method Summary | |
|---|---|
StallEnunciator.E_StallState |
getState()
Gets the stall state. |
void |
render(java.awt.Graphics graphics)
Renders the current state of the instrument. |
private void |
renderState()
Renders the stall state. |
java.lang.String |
toString()
|
void |
update(StallEnunciator.E_StallState state)
Updates the state of the instrument without rendering it. |
| Methods inherited from class uavsim.graphics.instruments.A_RectangularInstrument |
|---|
getFaceSize, renderBox |
| Methods inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
getAnchor, getCanvasSize, getGraphics, getID, getParentComponent, handleControlCallback, hasControls, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, refresh, registerControl, setCanvasAnchor, setCanvasSize, setParentComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int _stallBlinkCountdown
private StallEnunciator.E_StallState _state
private static final TextProperties DISTANCE_TEXT
private static final CoordinateCartesianRelative DISTANCE_WINDOW_ANCHOR_SCALE
private static final java.awt.Color DISTANCE_WINDOW_BODY_COLOR
private static final java.awt.Color DISTANCE_WINDOW_OUTLINE_COLOR
private static final Scaler DISTANCE_WINDOW_OUTLINE_SCALE
private static final ScalerPair DISTANCE_WINDOW_SIZE_SCALE
private static final RectangularFaceplaceDescriptor FACEPLATE
private static final int STALL_BLINK_COUNTDOWN
| Constructor Detail |
|---|
public StallEnunciator(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
id - - the unique instrument identifiercanvasSize - - the square size of the instrument footprint in pixelscanvasAnchor - - the anchor position for the center of the canvas in pixels| Method Detail |
|---|
public StallEnunciator.E_StallState getState()
public void render(java.awt.Graphics graphics)
render in class A_RectangularInstrumentgraphics - - the graphics contextprivate void renderState()
public java.lang.String toString()
toString in class java.lang.Objectpublic void update(StallEnunciator.E_StallState state)
state - - the stall state
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||