org.xith3d.ui.hud.widgets
Class Slider.Description

java.lang.Object
  extended by org.xith3d.ui.hud.base.Widget.DescriptionBase
      extended by org.xith3d.ui.hud.widgets.Slider.Description
Enclosing class:
Slider

public static class Slider.Description
extends Widget.DescriptionBase

This class is used to describe a (set of) Slider Widget(s). You can pass it to the Slider constructor. Modifications on the used instance after creating the Slider Widget won't have any effect.


Constructor Summary
Slider.Description()
          Creates a new Slider.Description.
Slider.Description(float height, java.lang.String leftTexture, float leftWidth, java.lang.String rightTexture, float rightWidth, java.lang.String bodyTexture, java.lang.String handleTexture, float handleWidth, float handleYOffset, int lower, int upper, boolean smoothSliding)
          Creates a new Slider.Description.
Slider.Description(float height, Texture leftTexture, float leftWidth, Texture rightTexture, float rightWidth, Texture bodyTexture, Texture handleTexture, float handleWidth, float handleYOffset, int lower, int upper, boolean smoothSliding)
          Creates a new Slider.Description.
Slider.Description(HUDUnitsMeasurement sizeMeasurement, float height, java.lang.String leftTexture, float leftWidth, java.lang.String rightTexture, float rightWidth, java.lang.String bodyTexture, java.lang.String handleTexture, float handleWidth, float handleYOffset, int lower, int upper, boolean smoothSliding)
          Creates a new Slider.Description.
Slider.Description(HUDUnitsMeasurement sizeMeasurement, float height, Texture leftTexture, float leftWidth, Texture rightTexture, float rightWidth, Texture bodyTexture, Texture handleTexture, float handleWidth, float handleYOffset, int lower, int upper, boolean smoothSliding)
          Creates a new Slider.Description.
Slider.Description(Slider.Description desc)
          Clone-Constructor.
 
Method Summary
 Slider.Description clone()
           
 Texture getBodyTexture()
           
 float getHandleButtonWidth()
           
 float getHandleButtonYOffset()
           
 Texture getHandleTexture()
           
 float getHeight()
           
 Texture getLeftTexture()
           
 float getLeftWidth()
           
 int getLower()
           
 HUDUnitsMeasurement getMeasurement()
           
 Texture getRightTexture()
           
 float getRightWidth()
           
 int getUpper()
           
 boolean isSmoothSliding()
           
 void set(Slider.Description desc)
          Sets all values of this Description to the values of the given Description.
 void setBodyTexture(java.lang.String texture)
          Sets the texture to use for the body end.
 void setBodyTexture(Texture texture)
          Sets the texture to use for the body end.
 void setHandleButtonWidth(float width)
          Sets the handle button width.
 void setHandleButtonYOffset(float yOffset)
          Sets the handle button's y-offset.
 void setHandleTexture(java.lang.String texture)
          Sets the texture to use for the handle.
 void setHandleTexture(Texture texture)
          Sets the texture to use for the handle.
 void setHeight(float height)
          Sets the height.
 void setLeftTexture(java.lang.String texture)
          Sets the texture to use for the left end.
 void setLeftTexture(Texture texture)
          Sets the texture to use for the left end.
 void setLeftWidth(float width)
          Sets the width of the left end.
 void setLower(int lower)
          Sets the lower bound of values.
 void setMeasurement(HUDUnitsMeasurement measure)
          Sets the measurement for increment-, decrement- and handle buttons.
 void setRightTexture(java.lang.String texture)
          Sets the texture to use for the right end.
 void setRightTexture(Texture texture)
          Sets the texture to use for the right end.
 void setRightWidth(float width)
          Sets the width of the right end.
 void setSmoothSliding(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 values.
 
Methods inherited from class org.xith3d.ui.hud.base.Widget.DescriptionBase
toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Slider.Description

public Slider.Description(Slider.Description desc)
Clone-Constructor.

Parameters:
desc - the original to be duplicated

Slider.Description

public Slider.Description(HUDUnitsMeasurement sizeMeasurement,
                          float height,
                          Texture leftTexture,
                          float leftWidth,
                          Texture rightTexture,
                          float rightWidth,
                          Texture bodyTexture,
                          Texture handleTexture,
                          float handleWidth,
                          float handleYOffset,
                          int lower,
                          int upper,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
sizeMeasurement - the measurement for increment-, decrement- and handle buttons
height - the height
leftTexture - the texture to use for the left end
leftWidth - the width of the left end
rightTexture - the texture to use for the right end
rightWidth - the width of the right end
bodyTexture - the texture to use for the body (tiled)
handleTexture - the handle texture to use
handleWidth - the size (width of height) of the handle
handleYOffset - the y-offset for the handle button
lower - the lower value limit
upper - the upper value limit
smoothSliding - use smooth sliding?

Slider.Description

public Slider.Description(HUDUnitsMeasurement sizeMeasurement,
                          float height,
                          java.lang.String leftTexture,
                          float leftWidth,
                          java.lang.String rightTexture,
                          float rightWidth,
                          java.lang.String bodyTexture,
                          java.lang.String handleTexture,
                          float handleWidth,
                          float handleYOffset,
                          int lower,
                          int upper,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
sizeMeasurement - the measurement for increment-, decrement- and handle buttons
height - the height
leftTexture - the texture to use for the left end
leftWidth - the width of the left end
rightTexture - the texture to use for the right end
rightWidth - the width of the right end
bodyTexture - the texture to use for the body (tiled)
handleTexture - the handle texture to use
handleWidth - the size (width of height) of the handle
handleYOffset - the y-offset for the handle button
lower - the lower value limit
upper - the upper value limit
smoothSliding - use smooth sliding?

Slider.Description

public Slider.Description(float height,
                          Texture leftTexture,
                          float leftWidth,
                          Texture rightTexture,
                          float rightWidth,
                          Texture bodyTexture,
                          Texture handleTexture,
                          float handleWidth,
                          float handleYOffset,
                          int lower,
                          int upper,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
height - the height
leftTexture - the texture to use for the left end
leftWidth - the width of the left end
rightTexture - the texture to use for the right end
rightWidth - the width of the right end
bodyTexture - the texture to use for the body (tiled)
handleTexture - the handle texture to use
handleWidth - the size (width of height) of the handle
handleYOffset - the y-offset for the handle button
lower - the lower value limit
upper - the upper value limit
smoothSliding - use smooth sliding?

Slider.Description

public Slider.Description(float height,
                          java.lang.String leftTexture,
                          float leftWidth,
                          java.lang.String rightTexture,
                          float rightWidth,
                          java.lang.String bodyTexture,
                          java.lang.String handleTexture,
                          float handleWidth,
                          float handleYOffset,
                          int lower,
                          int upper,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
height - the height
leftTexture - the texture to use for the left end
leftWidth - the width of the left end
rightTexture - the texture to use for the right end
rightWidth - the width of the right end
bodyTexture - the texture to use for the body (tiled)
handleTexture - the handle texture to use
handleWidth - the size (width of height) of the handle
handleYOffset - the y-offset for the handle button
lower - the lower value limit
upper - the upper value limit
smoothSliding - use smooth sliding?

Slider.Description

public Slider.Description()
Creates a new Slider.Description.

Method Detail

setMeasurement

public void setMeasurement(HUDUnitsMeasurement measure)
Sets the measurement for increment-, decrement- and handle buttons.

Parameters:
measure - the new measurement

getMeasurement

public HUDUnitsMeasurement getMeasurement()
Returns:
the measurement for increment-, decrement- and handle buttons

setHeight

public void setHeight(float height)
Sets the height.

Parameters:
height - the new height

getHeight

public float getHeight()
Returns:
the height

setLeftTexture

public void setLeftTexture(Texture texture)
Sets the texture to use for the left end.

Parameters:
texture - the texture

setLeftTexture

public void setLeftTexture(java.lang.String texture)
Sets the texture to use for the left end.

Parameters:
texture - the texture

getLeftTexture

public Texture getLeftTexture()
Returns:
the texture to use for the left end

setLeftWidth

public void setLeftWidth(float width)
Sets the width of the left end.

Parameters:
width - the new width

getLeftWidth

public float getLeftWidth()
Returns:
the width of the left end.

setRightTexture

public void setRightTexture(Texture texture)
Sets the texture to use for the right end.

Parameters:
texture - the texture

setRightTexture

public void setRightTexture(java.lang.String texture)
Sets the texture to use for the right end.

Parameters:
texture - the texture

getRightTexture

public Texture getRightTexture()
Returns:
the texture to use for the left end

setRightWidth

public void setRightWidth(float width)
Sets the width of the right end.

Parameters:
width - the new width

getRightWidth

public float getRightWidth()
Returns:
the width of the right end.

setBodyTexture

public void setBodyTexture(Texture texture)
Sets the texture to use for the body end.

Parameters:
texture - the texture

setBodyTexture

public void setBodyTexture(java.lang.String texture)
Sets the texture to use for the body end.

Parameters:
texture - the texture

getBodyTexture

public Texture getBodyTexture()
Returns:
the texture to use for the body end

setHandleTexture

public void setHandleTexture(Texture texture)
Sets the texture to use for the handle.

Parameters:
texture - the texture

setHandleTexture

public void setHandleTexture(java.lang.String texture)
Sets the texture to use for the handle.

Parameters:
texture - the texture

getHandleTexture

public Texture getHandleTexture()
Returns:
the texture to use for the handle

setHandleButtonWidth

public void setHandleButtonWidth(float width)
Sets the handle button width. The height is calculated according to the aspect ratio of the Texture.

Parameters:
width - the new width

getHandleButtonWidth

public float getHandleButtonWidth()
Returns:
the handle button width

setHandleButtonYOffset

public void setHandleButtonYOffset(float yOffset)
Sets the handle button's y-offset.

Parameters:
yOffset - the y-offset of the handle button

getHandleButtonYOffset

public float getHandleButtonYOffset()
Returns:
the handle button's y-offset

getLower

public int getLower()
Returns:
the lower bound of values

setLower

public void setLower(int lower)
Sets the lower bound of values.


getUpper

public int getUpper()
Returns:
the upper bound of values

setUpper

public void setUpper(int upper)
Sets the upper bound of values.


setSmoothSliding

public void setSmoothSliding(boolean b)
If true, the handle doesn't snap to discrete positiones depending on the available scroll values.

Parameters:
b - enable/disable

isSmoothSliding

public boolean isSmoothSliding()
Returns:
true, if the handle doesn't snap to discrete positiones depending on the available scroll values.

set

public void set(Slider.Description desc)
Sets all values of this Description to the values of the given Description.

Parameters:
desc - the original to be duplicated

clone

public Slider.Description clone()
Overrides:
clone in class java.lang.Object
Returns:
a Clone of this Scrollbar.Description.