|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.graphics.controls.A_Control
public abstract class A_Control
Provides the shared functionality for all controls that belong to an instrument.
| Field Summary | |
|---|---|
private A_Instrument |
_hostInstrument
the host instrument that this control belongs to |
protected java.lang.String |
_id
the unique control identifier |
static java.awt.Cursor |
CURSOR_ARROW_DOWN
the down-arrow cursor |
static java.awt.Cursor |
CURSOR_ARROW_LEFT
the left-arrow cursor |
static java.awt.Cursor |
CURSOR_ARROW_RIGHT
the right-arrow cursor |
static java.awt.Cursor |
CURSOR_ARROW_UP
the up-arrow cursor |
static java.awt.Cursor |
CURSOR_CROSSHAIR
the crosshair cursor |
static java.awt.Cursor |
CURSOR_DEFAULT
the default cursor |
static java.awt.Cursor |
CURSOR_HAND
the hand cursor |
| Constructor Summary | |
|---|---|
A_Control(java.lang.String id,
A_Instrument hostInstrument)
Creates an abstract control. |
|
| Method Summary | |
|---|---|
protected CoordinateCartesianAbsolute |
calculateAnchor(A_ControlProperties properties)
Calculates the absolute anchor coordinate of this control on its host instrument. |
A_Instrument |
getHostInstrument()
Gets the host instrument that this control belongs to. |
java.lang.String |
getID()
Gets the unique control identifier. |
abstract boolean |
handleMouseEvent_(java.awt.event.MouseEvent event)
Handles a mouse event. |
protected abstract boolean |
isCoordinateHit(CoordinateCartesianAbsolute coordinate)
Determines whether a screen coordinate is contained within the bounds of this control. |
void |
render(java.awt.Graphics2D graphics)
Renders the controls. |
void |
resetCursor()
Resets the cursor to the default. |
void |
setCursor(java.awt.Cursor cursor)
Sets the cursor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final A_Instrument _hostInstrument
protected final java.lang.String _id
public static final java.awt.Cursor CURSOR_ARROW_DOWN
public static final java.awt.Cursor CURSOR_ARROW_LEFT
public static final java.awt.Cursor CURSOR_ARROW_RIGHT
public static final java.awt.Cursor CURSOR_ARROW_UP
public static final java.awt.Cursor CURSOR_CROSSHAIR
public static final java.awt.Cursor CURSOR_DEFAULT
public static final java.awt.Cursor CURSOR_HAND
| Constructor Detail |
|---|
public A_Control(java.lang.String id,
A_Instrument hostInstrument)
id - - the unique control identifierhostInstrument - - the control host instrument| Method Detail |
|---|
protected CoordinateCartesianAbsolute calculateAnchor(A_ControlProperties properties)
properties - - the control properties
public A_Instrument getHostInstrument()
public java.lang.String getID()
public abstract boolean handleMouseEvent_(java.awt.event.MouseEvent event)
event - - the event
protected abstract boolean isCoordinateHit(CoordinateCartesianAbsolute coordinate)
coordinate - - the coordinate
public void render(java.awt.Graphics2D graphics)
graphics - - the graphics contextpublic void resetCursor()
public void setCursor(java.awt.Cursor cursor)
cursor - - the cursor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||