us.asciiroth.client.ui
Class InputManager
java.lang.Object
us.asciiroth.client.ui.InputManager
- All Implemented Interfaces:
- com.google.gwt.event.shared.EventHandler, com.google.gwt.user.client.Event.NativePreviewHandler, FlagsListener, MouseCellListener
public class InputManager
- extends java.lang.Object
- implements com.google.gwt.user.client.Event.NativePreviewHandler, FlagsListener, MouseCellListener
The key manager is a focus widget that processes keyboard events
This works, although it would be better simply to capture events
at the document level (this widget constantly has to grab the focus
in order to work). But I don't see any way to do that from within
GWT.
Method Summary |
void |
clearActionBuffer()
|
void |
onContextMenu(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
|
void |
onFlagsChanged(Agent agent)
The flags for the player have been update. |
void |
onMouseDown(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
This is a complicated method that attempts to do what would be the most
obvious action indicated by clicking on a cell on the board, in order
to provide a simple, mouse-based interface for novice users |
void |
onMouseOut(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
|
void |
onMouseOver(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
|
void |
onMouseUp(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
|
void |
onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent preview)
|
void |
processNextAction()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_ESC
public static final int KEY_ESC
- See Also:
- Constant Field Values
KEY_NUM_5
public static final int KEY_NUM_5
- See Also:
- Constant Field Values
KEY_RETURN
public static final int KEY_RETURN
- See Also:
- Constant Field Values
InputManager
public InputManager()
clearActionBuffer
public void clearActionBuffer()
onContextMenu
public void onContextMenu(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
- Specified by:
onContextMenu
in interface MouseCellListener
onFlagsChanged
public void onFlagsChanged(Agent agent)
- Description copied from interface:
FlagsListener
- The flags for the player have been update.
- Specified by:
onFlagsChanged
in interface FlagsListener
onMouseDown
public void onMouseDown(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
- This is a complicated method that attempts to do what would be the most
obvious action indicated by clicking on a cell on the board, in order
to provide a simple, mouse-based interface for novice users
- Specified by:
onMouseDown
in interface MouseCellListener
onMouseOut
public void onMouseOut(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
- Specified by:
onMouseOut
in interface MouseCellListener
onMouseOver
public void onMouseOver(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
- Specified by:
onMouseOver
in interface MouseCellListener
onMouseUp
public void onMouseUp(com.google.gwt.user.client.Element td,
Cell cell,
boolean shifted)
- Specified by:
onMouseUp
in interface MouseCellListener
onPreviewNativeEvent
public void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent preview)
- Specified by:
onPreviewNativeEvent
in interface com.google.gwt.user.client.Event.NativePreviewHandler
processNextAction
public void processNextAction()
© 2009 Alx Dark