|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CDasherComponent
dasher.CDasherModule
dasher.CInputFilter
dasher.CDefaultFilter
public class CDefaultFilter
Dasher's current default input filter, otherwise known as Normal Control. This causes Dasher, when unpaused, to zoom towards the mouse position with the goal that the spot the mouse hovers over at time X should be under the crosshair at some later time.
The filter also includes support for a number of Start Handlers, and is responsible for instantiating and managing them if the parameters relating to them are set appropriately.
It does not respond to key presses except to start and stop on key 100.
Automatic Speed Control is also featured with the Default Filter, using an instance of AutoSpeedControl for this purpose.
CAutoSpeedControl| Field Summary | |
|---|---|
protected CAutoSpeedControl |
m_AutoSpeedControl
Our Automatic Speed Control helper class |
protected CStartHandler |
m_StartHandler
The currently enabled start handler, if any |
| Fields inherited from class dasher.CInputFilter |
|---|
m_Interface |
| Fields inherited from class dasher.CDasherComponent |
|---|
m_EventHandler, m_SettingsStore |
| Constructor Summary | |
|---|---|
CDefaultFilter(CEventHandler EventHandler,
CSettingsStore SettingsStore,
CDasherInterfaceBase Interface,
CDasherModel m_DasherModel,
long iID,
java.lang.String szName)
Sole constructor. |
|
| Method Summary | |
|---|---|
void |
CreateStartHandler()
Creates a start handler. |
boolean |
DecorateView(CDasherView View)
Draws the mouse square and mouse line to the specified View in the case that BP_DRAW_MOUSE and BP_DRAW_MOUSE_LINE are enabled respectively, and calls m_StartHandler's DecorateView method to draw the start handler, if applicable. |
void |
DrawMouse(CDasherView View)
Draws a small box at the current mouse position. |
void |
DrawMouseLine(CDasherView View)
Draws a line from the origin (LP_OX, LP_OY) to the current mouse position. |
void |
HandleEvent(CEvent Event)
Called by the event handler when dispatching events. |
void |
KeyDown(long iTime,
int iId,
CDasherModel Model)
Called by the InterfaceBase when a key is pressed. |
boolean |
Timer(long Time,
CDasherView m_DasherView,
CDasherModel m_DasherModel)
See CInputFilter for an description of the method's purpose. |
| Methods inherited from class dasher.CInputFilter |
|---|
Activate, Deactivate, KeyUp |
| Methods inherited from class dasher.CDasherModule |
|---|
GetID, GetName, GetType, Ref, Unref |
| 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 CAutoSpeedControl m_AutoSpeedControl
protected CStartHandler m_StartHandler
| Constructor Detail |
|---|
public CDefaultFilter(CEventHandler EventHandler,
CSettingsStore SettingsStore,
CDasherInterfaceBase Interface,
CDasherModel m_DasherModel,
long iID,
java.lang.String szName)
EventHandler - Event handler with which to register ourselvesSettingsStore - Setting repository to useInterface - Interface with which this Module should register itselfm_DasherModel - Model which will yield a FrameRate for creation of CAutoSpeedControliID - Unique ID for this moduleszName - Friendly name for this module| Method Detail |
|---|
public boolean DecorateView(CDasherView View)
DecorateView in class CInputFilterView - View to which we should draw decorations
public boolean Timer(long Time,
CDasherView m_DasherView,
CDasherModel m_DasherModel)
This filter simply asks the View for our mouse co-ordinates in Dasher space, and feeds them to the Model's Tap_on_display method which causes the model to move in this direction.
The coordinates are then fed to our AutoSpeedControl helper to fine tune the dashing speed, and our start handler is passed the View and Model pointers in case it too has action to take.
Timer in class CInputFilterTime - System time at which this event was called, as a UNIX timestampm_DasherView - View to query for input co-ordinatesm_DasherModel - Model to alter using these co-ordinates
public void KeyDown(long iTime,
int iId,
CDasherModel Model)
For a complete listing of key IDs, see the documentation for DasherInterfaceBase.KeyDown.
KeyDown in class CInputFilteriTime - System time when this key was pressed, as a UNIX timestampiId - Key identifierModel - Ignored by this filterpublic void HandleEvent(CEvent Event)
This class responds to the following parameter changes:
BP_CIRCLE_START and BP_MOUSEPOS_MODE: Recalls CreateStartHandler() in case we need to change our set start handler.
HandleEvent in class CInputFilterEvent - Event to handlepublic void CreateStartHandler()
public void DrawMouse(CDasherView View)
View - View to which we should drawpublic void DrawMouseLine(CDasherView View)
View - View to which this line should be drawn.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||