|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.base.WidgetBase
org.xith3d.ui.hud.base.RectangularWidget
org.xith3d.ui.hud.widgets.Scrollbar
public class Scrollbar
A simple Scrollbar implementation used to scroll content on the HUD.
| Nested Class Summary | |
|---|---|
static class |
Scrollbar.Description
This class is used to describe a (set of) Scrollbar Widget(s). |
static class |
Scrollbar.Direction
Scrolldirection of the Scrollbar |
| Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget |
|---|
Widget.DescriptionBase |
| Field Summary |
|---|
| Fields inherited from class org.xith3d.ui.hud.base.WidgetBase |
|---|
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER |
| Constructor Summary | |
|---|---|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Description sbDesc,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
Creates a new Scrollbar. |
|
Scrollbar(float width,
float height,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(float length,
int zIndex,
Scrollbar.Description sbDesc)
Creates a new Scrollbar. |
|
Scrollbar(float length,
int zIndex,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(float length,
Scrollbar.Description sbDesc)
Creates a new Scrollbar. |
|
Scrollbar(float length,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Description sbDesc,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
Creates a new Scrollbar. |
|
Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
Creates a new Scrollbar. |
|
| Method Summary | |
|---|---|
void |
addScrollbarListener(ScrollbarListener l)
Adds a ScrollbarListener to the List to be notified, when the value has changed. |
Scrollbar.Direction |
getDirection()
|
int |
getLower()
|
int |
getSmallIncrement()
|
float |
getTransparency()
|
int |
getUpper()
|
int |
getValue()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
boolean |
isSmoothScrolling()
|
void |
link(WidgetContainer container)
Links this ScrollBar with the given WidgetContainer. |
void |
link(WidgetContainer container,
float scale)
Links this ScrollBar with the given WidgetContainer. |
void |
onMouseButtonPressed(org.jagatoo.input.devices.components.MouseButton button,
int x,
int 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(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget. |
void |
onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse is moved on a Widget. |
void |
onMouseUnbound()
This event is fired, when the mouse is released. |
boolean |
removeScrollbarListener(ScrollbarListener l)
Removes a ScrollbarListener from the List. |
void |
setLower(int lower)
Sets the lower bound of scroll values. |
boolean |
setSize(float width,
float height,
boolean forced)
|
void |
setSmallIncrement(int value)
Sets the step to increment the Scrollbar's value by when the increment button is clicked. |
void |
setSmoothScrolling(boolean b)
If true, the handle doesn't snap to discrete positiones depending on the available scroll values. |
void |
setUpper(int upper)
Sets the upper bound of scroll values. |
boolean |
setValue(int value)
Sets the current scroll value |
| Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget |
|---|
getPickHeight, getPickSGZPosition, getPickWidth, pick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Description sbDesc,
float handleSize)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the ScrollbarsbDesc - a ScrollbarDescription instance holding information about
this new ScrollbarhandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Description sbDesc,
float handleSize)
size - the size of the ScrollbarzIndex - the z-index of the ScrollbarsbDesc - a ScrollbarDescription instance holding information about
this new ScrollbarhandleSize - the handle size
public Scrollbar(float length,
int zIndex,
Scrollbar.Description sbDesc)
length - the length of the ScrollbarzIndex - the z-index of the ScrollbarsbDesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Scrollbar(float length,
Scrollbar.Direction direction)
length - if (direction == HORIZONTAL), this is the width of
the Scrollbar.direction - the scroll-direction
public Scrollbar(float length,
int zIndex,
Scrollbar.Direction direction)
length - if (direction == HORIZONTAL), this is the width of the
Scrollbar. if (direction == VERTICAL), this is the height of
the Scrollbar.zIndex - the z-index of the Scrollbardirection - the scroll-direction
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
float handleSize)
size - the size of the Scrollbardirection - the scroll-directionhandleSize - the handle size
public Scrollbar(float width,
float height,
Scrollbar.Direction direction,
float handleSize)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-directionhandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
float handleSize)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionhandleSize - the handle size
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
float handleSize)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionhandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction)
size - the size of the Scrollbardirection - the scroll-direction
public Scrollbar(float width,
float height,
Scrollbar.Direction direction)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-direction
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-direction
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-direction
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
size - the size of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(float width,
float height,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
size - the size of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(float width,
float height,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
size - the size of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(float width,
float height,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
size - the size of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(float width,
float height,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
width - the width of the Scrollbarheight - the height of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle image
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
java.lang.String backgroundTex,
java.lang.String handleTex,
float handleSize)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(float width,
float height,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
width - the width of the Scrollbarheight - the height of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Scrollbar.Direction direction,
Texture backgroundTex,
Texture handleTex,
float handleSize)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardirection - the scroll-directionbackgroundTex - the background imagehandleTex - the handle imagehandleSize - the handle size
public Scrollbar(float length,
Scrollbar.Description sbDesc)
length - the length of the ScrollbarsbDesc - a ScrollbarDescription instance holding information about
this new Scrollbar| Method Detail |
|---|
public float getTransparency()
public final Scrollbar.Direction getDirection()
public void onMouseButtonPressed(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface WidgetonMouseButtonPressed in class WidgetBasebutton - the button that was pressedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCode
public void onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface WidgetonMouseButtonReleased in class WidgetBasebutton - the button that was releasedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCodepublic void onMouseUnbound()
onMouseUnbound in interface WidgetonMouseUnbound in class WidgetBase
public void onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface WidgetonMouseMoved in class WidgetBasex - the new X coordinatey - the new Y coordinateisTopMost - is this Widget topMosthasFocus - is this Widget focusedpublic void setLower(int lower)
public final int getLower()
public void setUpper(int upper)
public final int getUpper()
public void setSmallIncrement(int value)
public final int getSmallIncrement()
public final boolean setValue(int value)
public final int getValue()
public void addScrollbarListener(ScrollbarListener l)
l - the new ScrollbarListenerpublic boolean removeScrollbarListener(ScrollbarListener l)
l - the ScrollbarListener to be removedpublic void setSmoothScrolling(boolean b)
b - enable/disablepublic final boolean isSmoothScrolling()
public void link(WidgetContainer container)
container - the WidgetContainer to link with the Scrollbar
public void link(WidgetContainer container,
float scale)
container - the WidgetContainer to link with the Scrollbarscale - the factor to multiply the Scrollbar-value by before
applying it to the offset value of the container
public boolean setSize(float width,
float height,
boolean forced)
setSize in class WidgetBaseprotected void init()
init in class WidgetBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||