|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.utils.ScrollHandler
public abstract class ScrollHandler
A ScrollHandler is capable of managing communication between a scrollable Widget and the ScrollBars as well as properly adding the ScrollBars to the Widget on demand.
| Constructor Summary | |
|---|---|
ScrollHandler(Widget widget,
WidgetAssembler widgetAssembler,
boolean scrollHorizontal,
boolean scrollVertical)
|
|
| Method Summary | |
|---|---|
protected Scrollbar |
createHorizontalScrollbar(float width)
Creates the horizontal Scrollbar. |
protected Scrollbar |
createVerticalScrollbar(float height)
Creates the vertical Scrollbar. |
int |
getLineHeight()
|
ScrollMode |
getScrollMode()
|
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. |
void |
onScrollbarValueChanged(Scrollbar scrollbar,
int newValue)
This event is fired when the value of a Scrollbar has changed. |
abstract void |
onScrolled(Scrollbar.Direction direction,
int newValue)
|
void |
onWidgetAttachedToContainer(Widget widget,
WidgetContainer container)
This event is fired, when a Widget is added to a WidgetContainer. |
void |
onWidgetAttachedToHUD(Widget widget,
HUD hud)
This event is fired, when a Widget is added to a WidgetContainer and the container itself is already added to the HUD or is the HUD itself. |
void |
onWidgetDetachedFromContainer(Widget widget,
WidgetContainer container)
This event is fired, when a Widget is removed from a WidgetContainer. |
void |
onWidgetDetachedFromHUD(Widget widget,
HUD hud)
This event is fired, when a Widget is removed from a HUD. |
void |
onWidgetDragStarted(Widget widget)
This event is fired when a Widget is started to be dragged. |
void |
onWidgetDragStopped(Widget widget)
This event is fired when a Widget is stopped to be dragged. |
void |
onWidgetLocationChanged(Widget widget,
float oldLeft,
float oldTop,
float newLeft,
float newTop)
This event is fired when a Widget's location has changed. |
void |
onWidgetSizeChanged(Widget widget,
float oldWidth,
float oldHeight,
float newWidth,
float newHeight)
This event is fired when a Widget's size has changed. |
void |
setBounds(float maxRight,
float maxBottom)
|
void |
setLineHeight(int lineHeight)
|
void |
setScrollHValue(int value)
|
void |
setScrollMode(ScrollMode mode)
|
void |
setScrollVValue(int value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScrollHandler(Widget widget,
WidgetAssembler widgetAssembler,
boolean scrollHorizontal,
boolean scrollVertical)
| Method Detail |
|---|
public abstract void onScrolled(Scrollbar.Direction direction,
int newValue)
public void onScrollbarValueChanged(Scrollbar scrollbar,
int newValue)
onScrollbarValueChanged in interface ScrollbarListenerscrollbar - the Scrollbar, which's value has changednewValue - the new (current) value of the Scrollbarpublic void setScrollMode(ScrollMode mode)
public final ScrollMode getScrollMode()
public void setLineHeight(int lineHeight)
public final int getLineHeight()
public void setScrollHValue(int value)
public void setScrollVValue(int value)
public void setBounds(float maxRight,
float maxBottom)
public void onWidgetAttachedToContainer(Widget widget,
WidgetContainer container)
onWidgetAttachedToContainer in interface WidgetContainerListenerwidget - the Widget, which is added to a WidgetContainercontainer - the WidgetContainer, the Widget is added to
public void onWidgetDetachedFromContainer(Widget widget,
WidgetContainer container)
onWidgetDetachedFromContainer in interface WidgetContainerListenerwidget - the Widget, which is removed from a WidgetContainercontainer - the WidgetContainer, the Widget is removed from
public void onWidgetAttachedToHUD(Widget widget,
HUD hud)
onWidgetAttachedToHUD in interface WidgetContainerListenerwidget - the Widget, which is added to a WidgetContainerhud - the HUD, the Widget is added to
public void onWidgetDetachedFromHUD(Widget widget,
HUD hud)
onWidgetDetachedFromHUD in interface WidgetContainerListenerwidget - the Widget, which is removed from a HUDhud - the HUD, the Widget is removed frompublic void onWidgetDragStarted(Widget widget)
onWidgetDragStarted in interface WidgetLocationListenerwidget - the Widget, which is draggedpublic void onWidgetDragStopped(Widget widget)
onWidgetDragStopped in interface WidgetLocationListenerwidget - the Widget, which was dragged
public void onWidgetLocationChanged(Widget widget,
float oldLeft,
float oldTop,
float newLeft,
float newTop)
onWidgetLocationChanged in interface WidgetLocationListenerwidget - the Widget, which's location has changedoldLeft - the old left coordinate of the WidgetoldTop - the old top coordinate of the WidgetnewLeft - the new left coordinate of the WidgetnewTop - the new top coordinate of the Widget
public void onWidgetSizeChanged(Widget widget,
float oldWidth,
float oldHeight,
float newWidth,
float newHeight)
onWidgetSizeChanged in interface WidgetSizeListenerwidget - the Widget, which's size has changedoldWidth - the new width of the WidgetoldHeight - the new height of the WidgetnewWidth - the new width of the WidgetnewHeight - the new height of the Widget
public void onMouseButtonPressed(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface WidgetMouseListenerwidget - the Widget for which this event was firedbutton - the button that was pressedx - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventlastWhen - the milli-time when the button has last been pressedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseButtonReleased(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface WidgetMouseListenerwidget - the Widget for which this event was firedbutton - the button that was releasedx - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventlastWhen - the milli-time when the button has last been releasedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseMoved(Widget widget,
float x,
float y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface WidgetMouseListenerwidget - the Widget for which this event was firedx - the new X coordinatey - the new Y coordinatebuttonsState - the buttons' state bitmaskwhen - the gameTime of the mouse eventisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseStopped(Widget widget,
float x,
float y,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseStopped in interface WidgetMouseListenerwidget - the Widget for which this event was firedx - the new X coordinatey - the new Y coordinatewhen - the gameTime of the mouse eventisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseWheelMoved(Widget widget,
int delta,
boolean isPageMove,
float x,
float y,
long when,
boolean isTopMost)
onMouseWheelMoved in interface WidgetMouseListenerwidget - the Widget for which this event was fireddelta - a positive value when the wheel was moved upisPageMove - true, if whole pages are to be scrolled with this wheel movex - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventisTopMost - is this Widget topMost
public void onMouseEntered(Widget widget,
boolean isTopMost,
boolean hasFocus)
onMouseEntered in interface WidgetMouseListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseExited(Widget widget,
boolean isTopMost,
boolean hasFocus)
onMouseExited in interface WidgetMouseListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onInputStateChanged(Widget widget,
org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
long when,
boolean isTopMost,
boolean hasFocus)
onInputStateChanged in interface WidgetMouseListenerwidget - the Widget for which this event was firedwhen - the gameTime of the eventprotected Scrollbar createHorizontalScrollbar(float width)
Scrollbar.
width - the width to cover
Scrollbar.protected Scrollbar createVerticalScrollbar(float height)
Scrollbar.
height - the height to cover
Scrollbar.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||