|
|||||||||
| 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<_UNIT_>
_UNIT_ - - the unit that the instrumentation is based on. Multi-needle instruments are possible with
I_AngleMapper inner classespublic abstract class A_CircularInstrument<_UNIT_ extends I_Unitable<_UNIT_>>
Defines the shared elements of all resizeable circular instruments ("steam gauges").
| Field Summary | |
|---|---|
protected Ring |
_ringSize
the ring size in pixels |
protected static java.awt.Color |
DISK_COLOR
the disk color |
protected static java.awt.Color |
MOUNT_RING_COLOR
the mount-ring color |
protected static Scaler |
MOUNT_RING_INNER_SCALE
the scale of the mount ring relative to the instrument size |
| Fields inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
_canvasAnchor, _canvasSize, _graphics, _id |
| Constructor Summary | |
|---|---|
A_CircularInstrument(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
Creates an abstract circular instrument. |
|
| Method Summary | |
|---|---|
protected AngleMathematical |
mapAngle(CircularFaceplateDescriptor<_UNIT_> faceplate,
_UNIT_ value)
Maps a unit value to an angle on the faceplate arc. |
void |
render(java.awt.Graphics graphics)
Renders the current state of the instrument. |
protected void |
renderDisk()
Renders the mount ring. |
protected void |
renderMountRing()
Renders the mount ring. |
| 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, toString, wait, wait, wait |
| Methods inherited from interface uavsim.graphics.instruments.I_AngleMapper |
|---|
mapAngle_ |
| Field Detail |
|---|
protected Ring _ringSize
protected static final java.awt.Color DISK_COLOR
protected static final java.awt.Color MOUNT_RING_COLOR
protected static final Scaler MOUNT_RING_INNER_SCALE
| Constructor Detail |
|---|
public A_CircularInstrument(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 |
|---|
protected AngleMathematical mapAngle(CircularFaceplateDescriptor<_UNIT_> faceplate,
_UNIT_ value)
faceplate - - the faceplate that defines the unit that the instrumentation is based onvalue - - the value to map to an angle
public void render(java.awt.Graphics graphics)
render in class A_Instrumentgraphics - - the graphics contextprotected void renderDisk()
protected void renderMountRing()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||