|
|||||||||
| 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_CircularInstrument<Airspeed>
uavsim.graphics.instruments.airspeedindicator.AirspeedIndicator
public class AirspeedIndicator
Defines a standard airspeed-indicator instrument.
| Field Summary | |
|---|---|
private Airspeed |
_airspeed
the airspeed |
private static Airspeed |
AIRSPEED_MAX
the maximum airspeed |
private static Airspeed |
AIRSPEED_MIN
the minimum airspeed |
private static CircularFaceplateDescriptor<Airspeed> |
FACEPLATE
the faceplate descriptor |
private static ArcDescriptor<Airspeed> |
GREEN_ARC
the arc descriptor for the green arc |
private static TickDescriptor<Airspeed> |
MAJOR_TICKS
the descriptor for the major ticks |
private static TickDescriptor<Airspeed> |
MINOR_TICKS
the descriptor for the minor ticks |
private static NeedleDescriptor |
NEEDLE
the needle descriptor |
private static NumberDescriptor<Airspeed> |
NUMBERS
the numbers descriptor |
private static TextProperties |
NUMBERS_TEXT
the text properties of the numbers |
private static ArcDescriptor<Airspeed> |
RED_ARC
the arc descriptor for the red arc |
private static ArcDescriptor<Airspeed> |
WHITE_ARC
the arc descriptor for the white arc |
private static ArcDescriptor<Airspeed> |
YELLOW_ARC
the arc descriptor for the yellow arc |
| Fields inherited from class uavsim.graphics.instruments.A_CircularInstrument |
|---|
_ringSize, DISK_COLOR, MOUNT_RING_COLOR, MOUNT_RING_INNER_SCALE |
| Fields inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
_canvasAnchor, _canvasSize, _graphics, _id |
| Constructor Summary | |
|---|---|
AirspeedIndicator(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
Creates an airspeed indicator. |
|
| Method Summary | |
|---|---|
Airspeed |
getAirspeed()
Gets the airspeed. |
AngleMathematical |
mapAngle_(Airspeed airspeed)
Returns the angle corresponding to the value of a unit. |
void |
render(java.awt.Graphics graphics)
Renders the current state of the instrument. |
private void |
renderArcs()
Renders the arcs. |
private void |
renderNeedle()
Renders the needle. |
private void |
renderNumbers()
Renders the numbers. |
private void |
renderTicks()
Renders the major and minor ticks. |
java.lang.String |
toString()
|
void |
update(Airspeed airspeed)
Updates the state of the instrument without rendering it. |
| Methods inherited from class uavsim.graphics.instruments.A_CircularInstrument |
|---|
mapAngle, renderDisk, renderMountRing |
| 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 Airspeed _airspeed
private static final Airspeed AIRSPEED_MAX
private static final Airspeed AIRSPEED_MIN
private static final CircularFaceplateDescriptor<Airspeed> FACEPLATE
private static final ArcDescriptor<Airspeed> GREEN_ARC
private static final TickDescriptor<Airspeed> MAJOR_TICKS
private static final TickDescriptor<Airspeed> MINOR_TICKS
private static final NeedleDescriptor NEEDLE
private static final NumberDescriptor<Airspeed> NUMBERS
private static final TextProperties NUMBERS_TEXT
private static final ArcDescriptor<Airspeed> RED_ARC
private static final ArcDescriptor<Airspeed> WHITE_ARC
private static final ArcDescriptor<Airspeed> YELLOW_ARC
| Constructor Detail |
|---|
public AirspeedIndicator(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 Airspeed getAirspeed()
public AngleMathematical mapAngle_(Airspeed airspeed)
airspeed - - the unit
public void render(java.awt.Graphics graphics)
render in class A_CircularInstrument<Airspeed>graphics - - the graphics contextprivate void renderArcs()
private void renderNeedle()
private void renderNumbers()
private void renderTicks()
public java.lang.String toString()
toString in class java.lang.Objectpublic void update(Airspeed airspeed)
airspeed - - the airspeed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||