|
|||||||||
| 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<Altitude>
uavsim.graphics.instruments.altimeter.Altimeter
public class Altimeter
Defines an altimeter.
| Field Summary | |
|---|---|
private Altitude |
_altitude
the altitude |
private static Altitude |
ALTITUDE_MAX
the maximum altitude |
private static Altitude |
ALTITUDE_MIN
the minimum altitude |
private static CircularFaceplateDescriptor<Altitude> |
FACEPLATE
the faceplate descriptor |
private static TickDescriptor<Altitude> |
MAJOR_TICKS
the descriptor for the major ticks |
private static TickDescriptor<Altitude> |
MINOR_TICKS
the descriptor for the minor ticks |
private static NeedleDescriptor |
NEEDLE_100
the hundreds-needle descriptor |
private static NeedleDescriptor |
NEEDLE_1000
the thousands-needle descriptor |
private static NeedleDescriptor |
NEEDLE_10000
the ten-thousands-needle descriptor |
private static java.awt.Color |
NEEDLE_PIVOT_COLOR
the color of the center pivot circle overlaying the needles |
private static Scaler |
NEEDLE_PIVOT_SCALE
the size scale of the needle pivot relative to the instrument size |
private static NumberDescriptor<Altitude> |
NUMBERS
the numbers descriptor |
private static TextProperties |
NUMBERS_TEXT
the text properties of the numbers |
| 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 | |
|---|---|
Altimeter(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
Creates an altimeter. |
|
| Method Summary | |
|---|---|
Altitude |
getAltitude()
Gets the altitude. |
AngleMathematical |
mapAngle_(Altitude altitude)
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 |
renderNeedles()
Renders the needles. |
private void |
renderNumbers()
Renders the numbers. |
private void |
renderTicks()
Renders the major and minor ticks. |
java.lang.String |
toString()
|
void |
update(Altitude altitude)
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 Altitude _altitude
private static final Altitude ALTITUDE_MAX
private static final Altitude ALTITUDE_MIN
private static final CircularFaceplateDescriptor<Altitude> FACEPLATE
private static final TickDescriptor<Altitude> MAJOR_TICKS
private static final TickDescriptor<Altitude> MINOR_TICKS
private static final NeedleDescriptor NEEDLE_100
private static final NeedleDescriptor NEEDLE_1000
private static final NeedleDescriptor NEEDLE_10000
private static final java.awt.Color NEEDLE_PIVOT_COLOR
private static final Scaler NEEDLE_PIVOT_SCALE
private static final NumberDescriptor<Altitude> NUMBERS
private static final TextProperties NUMBERS_TEXT
| Constructor Detail |
|---|
public Altimeter(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 Altitude getAltitude()
public AngleMathematical mapAngle_(Altitude altitude)
altitude - - the unit
public void render(java.awt.Graphics graphics)
render in class A_CircularInstrument<Altitude>graphics - - the graphics contextprivate void renderNeedles()
private void renderNumbers()
private void renderTicks()
public java.lang.String toString()
toString in class java.lang.Objectpublic void update(Altitude altitude)
altitude - - the altitude
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||