GuiEventManager, WindowInputListenerpublic class EventBubblingDispatcher extends Object implements GuiEventManager
| Constructor | Description |
|---|---|
EventBubblingDispatcher() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addView(View view) |
Add a view to the dispatcher and set all listeners list for that view.
|
BaseWidget |
getWidgetUnderMouse() |
|
void |
keyboardArrowPressed(ArrowKey key) |
Keyboard arrow key has been pressed.
|
void |
keyboardDeleteKeyPressed() |
Keyboard delete key has been pressed.
|
void |
keyboardEnterKeyPressed() |
Keyboard enter key has been pressed.
|
void |
keyboardKeyPressed(char character) |
Dispatch key from the keyboard to all listeners in the current Widget.
|
void |
keyboardNumberPressed(int number) |
Keyboard numeric pad number has been pressed.
|
void |
keyReleased(int keyCode) |
A keyboard key has been released.
|
void |
mouseDoubleClick(MousePosition position) |
Dispatch a left double click from the mouse to all listeners in the current Widget.
|
void |
mouseDragLeft(MousePosition position,
MousePosition delta) |
Dispatch a drag from the mouse with the left button to all listeners in the current Widget.
|
void |
mouseDragRight(MousePosition position,
MousePosition delta) |
Dispatch a drag from the mouse with the right button to all listeners in the current Widget.
|
void |
mouseDragWheel(MousePosition position,
MousePosition delta) |
Dispatch a drag from the mouse with the middle button to all listeners in the current Widget.
|
void |
mouseLeftClick(MousePosition position) |
Dispatch a left click from the mouse to all listeners in the current Widget.
|
void |
mouseLeftReleased(MousePosition position) |
Dispatch a left button release from the mouse to all listeners in the current Widget.
|
void |
mouseMove(MousePosition position) |
Dispatch a move from the mouse to all listeners in the current Widget.
|
void |
mouseRightClick(MousePosition position) |
Dispatch a right click from the mouse to all listeners in the current Widget.
|
void |
mouseRightReleased(MousePosition position) |
Dispatch a right button release from the mouse to all listeners in the current Widget.
|
void |
mouseWheel(MousePosition cursorPosition,
int count) |
Dispatch a roll from the mouse wheel to all listeners in the current Widget.
|
void |
removeView(View view) |
Remove a View from the event dispatch.
|
void |
setDebugListener(be.yildizgames.common.client.debug.DebugListener l) |
|
void |
setDefaultView(View view) |
|
void |
setFocus(View view) |
Set the focus on a particular View.
|
void |
specialKeyPressed(SpecialKey key) |
Dispatch special key from the keyboard to all listeners in the current Widget.
|
public void setDebugListener(be.yildizgames.common.client.debug.DebugListener l)
setDebugListener in interface GuiEventManagerpublic void keyboardKeyPressed(char character)
WindowInputListenerkeyboardKeyPressed in interface WindowInputListenercharacter - Key pressed.public void keyboardEnterKeyPressed()
WindowInputListenerkeyboardEnterKeyPressed in interface WindowInputListenerpublic void specialKeyPressed(SpecialKey key)
WindowInputListenerspecialKeyPressed in interface WindowInputListenerkey - Key pressed.public void keyboardNumberPressed(int number)
WindowInputListenerkeyboardNumberPressed in interface WindowInputListenernumber - Number pressed.public void keyboardDeleteKeyPressed()
WindowInputListenerkeyboardDeleteKeyPressed in interface WindowInputListenerpublic void keyboardArrowPressed(ArrowKey key)
WindowInputListenerkeyboardArrowPressed in interface WindowInputListenerkey - Enum value to get witch arrow has been pressed.public void keyReleased(int keyCode)
WindowInputListenerkeyReleased in interface WindowInputListenerkeyCode - Code of the key released.public void mouseLeftReleased(MousePosition position)
WindowInputListenermouseLeftReleased in interface WindowInputListenerposition - Current mouse position.public void mouseRightReleased(MousePosition position)
WindowInputListenermouseRightReleased in interface WindowInputListenerposition - Current mouse position.public void mouseLeftClick(MousePosition position)
WindowInputListenermouseLeftClick in interface WindowInputListenerposition - Current mouse position.public void mouseRightClick(MousePosition position)
WindowInputListenermouseRightClick in interface WindowInputListenerposition - Current mouse position.public void mouseDoubleClick(MousePosition position)
WindowInputListenermouseDoubleClick in interface WindowInputListenerposition - Current mouse positionpublic void mouseDragRight(MousePosition position, MousePosition delta)
WindowInputListenermouseDragRight in interface WindowInputListenerposition - Current mouse position.delta - Delta with the former mouse position.public void mouseDragLeft(MousePosition position, MousePosition delta)
WindowInputListenermouseDragLeft in interface WindowInputListenerposition - Current mouse position.delta - Delta with the former mouse position.public void mouseDragWheel(MousePosition position, MousePosition delta)
WindowInputListenermouseDragWheel in interface WindowInputListenerposition - Current mouse position.delta - Delta with the former mouse position.public void mouseMove(MousePosition position)
WindowInputListenermouseMove in interface WindowInputListenerposition - Current mouse position.public void mouseWheel(MousePosition cursorPosition, int count)
WindowInputListenermouseWheel in interface WindowInputListenercursorPosition - Current mouse position.count - Number of wheel roll.public void addView(View view)
GuiEventManageraddView in interface GuiEventManagerview - View to add.public void setDefaultView(View view)
setDefaultView in interface GuiEventManagerpublic void removeView(View view)
GuiEventManagerremoveView in interface GuiEventManagerview - View to remove, it will no longer be affected by mouse and keyboard events.public void setFocus(View view)
GuiEventManagersetFocus in interface GuiEventManagerview - View to set the focus on.public BaseWidget getWidgetUnderMouse()
getWidgetUnderMouse in interface GuiEventManagerCopyright © 2014–2018. All rights reserved.