|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CDasherComponent
dasher.CDasherModule
dasher.CDasherInput
dasher.applet.JMouseInput
public class JMouseInput
Simple mouse input device which uses a mouse motion listener to track the mouse position and reports the latest reading when GetCoordinates is called.
Only methods which differ significantly from their abstract meanings documented in CDasherInput are documented here; for further details see CDasherInput.
| Field Summary | |
|---|---|
private int |
mouseX
Last seen mouse X co-ordinate |
private int |
mouseY
Last seen mouse Y co-ordinate |
| Fields inherited from class dasher.CDasherComponent |
|---|
m_EventHandler, m_SettingsStore |
| Constructor Summary | |
|---|---|
JMouseInput(CEventHandler EventHandler,
CSettingsStore SettingsStore)
|
|
| Method Summary | |
|---|---|
int |
GetCoordinateCount()
Gets the number of co-ordinates this device returns. |
int |
GetCoordinates(int iN,
long[] Coordinates)
Called to request that the device report the current co-ordinates. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Ignored |
void |
mouseMoved(java.awt.event.MouseEvent e)
Nasty hack alert! At present, this stores the read mouse co-ordinates less 10 in the X direction and 30 in the Y direction, since this is the border in the current setup of JDasher. |
| Methods inherited from class dasher.CDasherInput |
|---|
Activate, Deactivate, SetMaxCoordinates |
| Methods inherited from class dasher.CDasherModule |
|---|
GetID, GetName, GetType, Ref, Unref |
| Methods inherited from class dasher.CDasherComponent |
|---|
GetBoolParameter, GetLongParameter, GetParameterName, GetParameterType, GetStringParameter, HandleEvent, 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 |
|---|
private int mouseX
private int mouseY
| Constructor Detail |
|---|
public JMouseInput(CEventHandler EventHandler,
CSettingsStore SettingsStore)
| Method Detail |
|---|
public int GetCoordinateCount()
CDasherInputAt present, only 1- and 2-axis devices are accepted, but this may be easily upgraded in the future.
GetCoordinateCount in class CDasherInputpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
This needs to be generalised so that we offset the co-ordinates appropriately and respond to changes in the Screen's position.
mouseMoved in interface java.awt.event.MouseMotionListener
public int GetCoordinates(int iN,
long[] Coordinates)
CDasherInput
GetCoordinates in class CDasherInputiN - Number of co-ordinates expected.Coordinates - Fill with the current co-ordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||