|
||||||||||
| 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.Slider
public class Slider
A simple Slider implementation used to select a certain value from a range.
| Nested Class Summary | |
|---|---|
static class |
Slider.Description
This class is used to describe a (set of) Slider Widget(s). |
| 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 | |
|---|---|
Slider(float width)
Creates a new Slider. |
|
Slider(float width,
float height)
Creates a new Slider. |
|
Slider(float width,
float height,
int zIndex)
Creates a new Slider. |
|
Slider(float width,
float height,
int zIndex,
Slider.Description desc)
Creates a new Slider. |
|
Slider(float width,
float height,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(float width,
float height,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
Slider(float width,
float height,
Slider.Description desc)
Creates a new Slider. |
|
Slider(float width,
float height,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(float width,
float height,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
Slider(float width,
int zIndex)
Creates a new Slider. |
|
Slider(float width,
int zIndex,
Slider.Description desc)
Creates a new Slider. |
|
Slider(float width,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(float width,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
Slider(float width,
Slider.Description desc)
Creates a new Slider. |
|
Slider(float width,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(float width,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Slider.Description desc)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
Slider.Description desc)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
Creates a new Slider. |
|
Slider(org.openmali.types.twodee.Sized2fRO size,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
Creates a new Slider. |
|
| Method Summary | |
|---|---|
void |
addSliderListener(SliderListener l)
Adds a SliderListener to the List to be notified, when the value has changed. |
float |
getHandleYOffset()
|
int |
getLower()
|
float |
getTransparency()
|
int |
getUpper()
|
int |
getValue()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
boolean |
isSmoothSliding()
|
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 |
removeSliderListener(SliderListener l)
Removes a SliderListener from the List. |
void |
setHandleYOffset(float yOffset)
|
void |
setLower(int lower)
Sets the lower bound of scroll values. |
boolean |
setSize(float width,
float height,
boolean forced)
|
void |
setSmoothSliding(boolean b)
If true, the handle doesn't snap to discrete positiones depending on the available slide 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 Slider(float width,
float height,
int zIndex,
Slider.Description desc)
width - the width of the Sliderheight - the height of the SliderzIndex - the z-index of the Scrollbardesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(float width,
int zIndex,
Slider.Description desc)
width - the width of the SliderzIndex - the z-index of the Scrollbardesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(float width,
float height,
Slider.Description desc)
width - the width of the Sliderheight - the height of the Sliderdesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(float width,
Slider.Description desc)
width - the width of the Sliderdesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Slider.Description desc)
size - the size of the ScrollbarzIndex - the z-index of the Scrollbardesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(org.openmali.types.twodee.Sized2fRO size,
Slider.Description desc)
size - the size of the Scrollbardesc - a ScrollbarDescription instance holding information about
this new Scrollbar
public Slider(float width,
float height,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
width - the width of the Sliderheight - the height of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
float height,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
width - the width of the Sliderheight - the height of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
width - the width of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
width - the width of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
size - the size of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(org.openmali.types.twodee.Sized2fRO size,
Texture leftTex,
Texture rightTex,
Texture bodyTex,
Texture handleTex)
size - the size of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
float height,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
width - the width of the Sliderheight - the height of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
float height,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
width - the width of the Sliderheight - the height of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
width - the width of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
width - the width of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
size - the size of the SliderzIndex - the new zIndexleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(org.openmali.types.twodee.Sized2fRO size,
java.lang.String leftTex,
java.lang.String rightTex,
java.lang.String bodyTex,
java.lang.String handleTex)
size - the size of the SliderleftTex - the left end TexturerightTex - the right end TexturebodyTex - the body TexturehandleTex - the handle image
public Slider(float width,
float height,
int zIndex)
width - the width of the Sliderheight - the height of the SliderzIndex - the new zIndex
public Slider(float width,
int zIndex)
width - the width of the SliderzIndex - the new zIndex
public Slider(float width,
float height)
width - the width of the Sliderheight - the height of the Sliderpublic Slider(float width)
width - the width of the Slider
public Slider(org.openmali.types.twodee.Sized2fRO size,
int zIndex)
size - the size of the SliderzIndex - the new zIndexpublic Slider(org.openmali.types.twodee.Sized2fRO size)
size - the size of the Slider| Method Detail |
|---|
public float getTransparency()
public void setHandleYOffset(float yOffset)
public float getHandleYOffset()
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 int getLower()
public void setLower(int lower)
public int getUpper()
public void setUpper(int upper)
public int getValue()
public boolean setValue(int value)
public void addSliderListener(SliderListener l)
l - the new SliderListenerpublic boolean removeSliderListener(SliderListener l)
l - the SliderListener to be removedpublic void setSmoothSliding(boolean b)
b - enable/disablepublic boolean isSmoothSliding()
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 | |||||||||