org.xith3d.ui.hud.listeners
Interface WidgetMouseListener

All Known Subinterfaces:
WidgetInputListener
All Known Implementing Classes:
ScrollHandler, WidgetEventsReceiverAdapter, WidgetInputAdapter, WidgetMouseAdapter, WidgetZIndexGroup

public interface WidgetMouseListener

A WidgetMouseListener is notified of Widget-Mouse interaction events.


Method Summary
 void onInputStateChanged(Widget widget, org.jagatoo.input.devices.components.DeviceComponent comp, int delta, int state, long when, boolean isTopMost, boolean hasFocus)
          This event is fired when the state of any DeviceComponent has changed.
 void onMouseButtonPressed(Widget widget, org.jagatoo.input.devices.components.MouseButton button, float x, float y, long when, long lastWhen, boolean isTopMost, boolean hasFocus)
          This event is fired, when a mouse button is pressed on a focused Widget.
 void onMouseButtonReleased(Widget widget, org.jagatoo.input.devices.components.MouseButton button, float x, float y, long when, long lastWhen, boolean isTopMost, boolean hasFocus)
          This event is fired, when a mouse button is released on a focused Widget.
 void onMouseEntered(Widget widget, boolean isTopMost, boolean hasFocus)
          This method is called when the mouse entered the Widget area.
 void onMouseExited(Widget widget, boolean isTopMost, boolean hasFocus)
          This method is called when the mouse exited the Widget area.
 void onMouseMoved(Widget widget, float x, float y, int buttonsState, long when, boolean isTopMost, boolean hasFocus)
          This event is fired, when the mouse is moved on a Widget.
 void onMouseStopped(Widget widget, float x, float y, long when, boolean isTopMost, boolean hasFocus)
          This event is fired, when the mouse position has not been changed on this Widget for a certain amount of time.
 void onMouseWheelMoved(Widget widget, int delta, boolean isPageMove, float x, float y, long when, boolean isTopMost)
          This event is fired, when the mouse wheel is moved on a Widget.
 

Method Detail

onMouseButtonPressed

void onMouseButtonPressed(Widget widget,
                          org.jagatoo.input.devices.components.MouseButton button,
                          float x,
                          float y,
                          long when,
                          long lastWhen,
                          boolean isTopMost,
                          boolean hasFocus)
This event is fired, when a mouse button is pressed on a focused Widget.

Parameters:
widget - the Widget for which this event was fired
button - the button that was pressed
x - the current mouse x position
y - the current mouse y position
when - the gameTime of the mouse event
lastWhen - the milli-time when the button has last been pressed
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onMouseButtonReleased

void onMouseButtonReleased(Widget widget,
                           org.jagatoo.input.devices.components.MouseButton button,
                           float x,
                           float y,
                           long when,
                           long lastWhen,
                           boolean isTopMost,
                           boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget.

Parameters:
widget - the Widget for which this event was fired
button - the button that was released
x - the current mouse x position
y - the current mouse y position
when - the gameTime of the mouse event
lastWhen - the milli-time when the button has last been released
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onMouseMoved

void onMouseMoved(Widget widget,
                  float x,
                  float y,
                  int buttonsState,
                  long when,
                  boolean isTopMost,
                  boolean hasFocus)
This event is fired, when the mouse is moved on a Widget.

Parameters:
widget - the Widget for which this event was fired
x - the new X coordinate
y - the new Y coordinate
buttonsState - the buttons' state bitmask
when - the gameTime of the mouse event
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onMouseStopped

void onMouseStopped(Widget widget,
                    float x,
                    float y,
                    long when,
                    boolean isTopMost,
                    boolean hasFocus)
This event is fired, when the mouse position has not been changed on this Widget for a certain amount of time.

Parameters:
widget - the Widget for which this event was fired
x - the new X coordinate
y - the new Y coordinate
when - the gameTime of the mouse event
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onMouseWheelMoved

void onMouseWheelMoved(Widget widget,
                       int delta,
                       boolean isPageMove,
                       float x,
                       float y,
                       long when,
                       boolean isTopMost)
This event is fired, when the mouse wheel is moved on a Widget.

Parameters:
widget - the Widget for which this event was fired
delta - a positive value when the wheel was moved up
isPageMove - true, if whole pages are to be scrolled with this wheel move
x - the current mouse x position
y - the current mouse y position
when - the gameTime of the mouse event
isTopMost - is this Widget topMost

onMouseEntered

void onMouseEntered(Widget widget,
                    boolean isTopMost,
                    boolean hasFocus)
This method is called when the mouse entered the Widget area.

Parameters:
widget - the Widget for which this event was fired
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onMouseExited

void onMouseExited(Widget widget,
                   boolean isTopMost,
                   boolean hasFocus)
This method is called when the mouse exited the Widget area.

Parameters:
widget - the Widget for which this event was fired
isTopMost - is this Widget topMost
hasFocus - is this Widget focused

onInputStateChanged

void onInputStateChanged(Widget widget,
                         org.jagatoo.input.devices.components.DeviceComponent comp,
                         int delta,
                         int state,
                         long when,
                         boolean isTopMost,
                         boolean hasFocus)
This event is fired when the state of any DeviceComponent has changed.

Parameters:
widget - the Widget for which this event was fired
comp -
delta -
state -
when - the gameTime of the event
isTopMost -
hasFocus -