|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CDasherComponent
dasher.CStartHandler
dasher.CCircleStartHandler
public class CCircleStartHandler
Displays a circle centred around the crosshair which the user can click to start dasher.
Status flags:
-1 undefined
0 = out of circle, stopped
1 = out of circle, started
2 = in circle, stopped
3 = in circle, started
4 = in circle, stopping
5 = in circle, starting
| Field Summary | |
|---|---|
protected long |
m_iChangeTime
Time (recorded as a UNIX timestamp) when the status last changed. |
protected int |
m_iCircleRadius
Radius of the displayed circle in Dasher co-ordinates. |
protected int |
m_iScreenRadius
Radius of the circle in screen co-ordinates. |
protected int |
m_iStatus
Current status of the handler. |
| Fields inherited from class dasher.CStartHandler |
|---|
m_Interface |
| Fields inherited from class dasher.CDasherComponent |
|---|
m_EventHandler, m_SettingsStore |
| Constructor Summary | |
|---|---|
CCircleStartHandler(CEventHandler EventHandler,
CSettingsStore SettingsStore,
CDasherInterfaceBase Interface)
Sole constructor. |
|
| Method Summary | |
|---|---|
boolean |
DecorateView(CDasherView View)
Draws the start handler to the passed view. |
void |
HandleEvent(CEvent Event)
Responds to events: |
void |
Timer(long iTime,
CDasherView m_DasherView,
CDasherModel m_DasherModel)
Updates the start handler's current state dependent on the current mouse position. |
| Methods inherited from class dasher.CDasherComponent |
|---|
GetBoolParameter, GetLongParameter, GetParameterName, GetParameterType, GetStringParameter, InsertEvent, SetBoolParameter, SetLongParameter, SetStringParameter, UnregisterComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int m_iStatus
protected long m_iChangeTime
protected int m_iCircleRadius
protected int m_iScreenRadius
| Constructor Detail |
|---|
public CCircleStartHandler(CEventHandler EventHandler,
CSettingsStore SettingsStore,
CDasherInterfaceBase Interface)
EventHandler - SettingsStore - Interface - | Method Detail |
|---|
public boolean DecorateView(CDasherView View)
DecorateView in class CStartHandlerView - DasherView upon which to run drawing commands.
public void Timer(long iTime,
CDasherView m_DasherView,
CDasherModel m_DasherModel)
In a nutshell, it determines whether the mouse is within the circle, and if so, instructs Dasher to start or stop dependent on its current state and how long the user has hovered over the circle.
Specifically, we start and stop if the user has hovered for over 1 second.
Timer in class CStartHandleriTime - Current system time, as a UNIX time stamp.m_DasherView - View against which co-ordinate transforms should be performed.m_DasherModel - Model to which commands should be passed.public void HandleEvent(CEvent Event)
BP_DASHER_PAUSED changes: Updates start handler state so that we don't try to stop when already stopped, etc.
HandleEvent in class CStartHandlerEvent - Event received.CEventHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||