|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.graphics.controls.A_Control
uavsim.graphics.controls.knobs.A_Knob
public abstract class A_Knob
Provides the shared functionality of a basic interactive knob with clockwise and counterclockwise rotation.
| Field Summary | |
|---|---|
protected Circle |
_body
the knob body. |
protected KnobProperties |
_properties
the knob properties |
private static ArcMathematical |
ARC_DECREASE
the left segment of the knob which decreases the knob value when clicked |
private static ArcMathematical |
ARC_INCREASE
the right segment of the knob which increases the knob value when clicked |
| Fields inherited from class uavsim.graphics.controls.A_Control |
|---|
_id, CURSOR_ARROW_DOWN, CURSOR_ARROW_LEFT, CURSOR_ARROW_RIGHT, CURSOR_ARROW_UP, CURSOR_CROSSHAIR, CURSOR_DEFAULT, CURSOR_HAND |
| Constructor Summary | |
|---|---|
A_Knob(java.lang.String id,
KnobProperties properties,
A_Instrument hostInstrument)
Creates an abstract knob control. |
|
| Method Summary | |
|---|---|
KnobProperties |
getProperties()
Gets the knob properties. |
boolean |
handleMouseEvent_(java.awt.event.MouseEvent mouseEvent)
Handles a mouse event. |
protected boolean |
isCoordinateHit(CoordinateCartesianAbsolute point)
Determines whether a screen coordinate is contained within the bounds of this control. |
protected boolean |
isCoordinateHit(CoordinateCartesianAbsolute point,
ArcMathematical arc)
Determines whether a point is on a segment of the knob. |
void |
render(java.awt.Graphics2D graphics)
Renders the controls. |
java.lang.String |
toString()
|
| Methods inherited from class uavsim.graphics.controls.A_Control |
|---|
calculateAnchor, getHostInstrument, getID, resetCursor, setCursor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Circle _body
protected final KnobProperties _properties
private static final ArcMathematical ARC_DECREASE
private static final ArcMathematical ARC_INCREASE
| Constructor Detail |
|---|
public A_Knob(java.lang.String id,
KnobProperties properties,
A_Instrument hostInstrument)
id - - the unique knob identifierproperties - - the knob propertieshostInstrument - - the knob host instrument| Method Detail |
|---|
public KnobProperties getProperties()
public boolean handleMouseEvent_(java.awt.event.MouseEvent mouseEvent)
handleMouseEvent_ in class A_ControlmouseEvent - - the event
protected boolean isCoordinateHit(CoordinateCartesianAbsolute point)
isCoordinateHit in class A_Controlpoint - - the coordinate
protected boolean isCoordinateHit(CoordinateCartesianAbsolute point,
ArcMathematical arc)
point - - the pointarc - - the arc defining the segment
public void render(java.awt.Graphics2D graphics)
render in class A_Controlgraphics - - the graphics contextpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||