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(int height, java.lang.String leftTexture, java.lang.String rightTexture, java.lang.String bodyTexture, java.lang.String valueMarkTexture, java.lang.String handleTexture, int handleYOffset, boolean smoothSliding)
          Creates a new Slider.Description.
Slider.Description(int height, Texture2D leftTexture, Texture2D rightTexture, Texture2D bodyTexture, Texture2D valueMarkTexture, Texture2D handleTexture, int handleYOffset, boolean smoothSliding)
          Creates a new Slider.Description.
 
Method Summary
 Slider.Description clone()
           
 Texture2D getBodyTexture()
           
 int getHandleButtonYOffset()
           
 Texture2D getHandleTexture()
           
 int getHeight()
           
 Texture2D getLeftTexture()
           
 Texture2D getRightTexture()
           
 boolean getSmoothSliding()
           
 Texture2D getValueMarkTexture()
           
 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.
 void setBodyTexture(Texture2D texture)
          Sets the texture to use for the body.
 void setHandleButtonYOffset(int yOffset)
          Sets the handle button's y-offset.
 void setHandleTexture(java.lang.String texture)
          Sets the texture to use for the handle.
 void setHandleTexture(Texture2D texture)
          Sets the texture to use for the handle.
 void setHeight(int height)
          Sets the height.
 void setLeftTexture(java.lang.String texture)
          Sets the texture to use for the left end.
 void setLeftTexture(Texture2D texture)
          Sets the texture to use for the left end.
 void setRightTexture(java.lang.String texture)
          Sets the texture to use for the right end.
 void setRightTexture(Texture2D texture)
          Sets the texture to use for the right end.
 void setSmoothSliding(boolean b)
          If true, the handle doesn't snap to discrete positiones depending on the available scroll values.
 void setValueMarkTexture(java.lang.String texture)
          Sets the texture to use for the value mark.
 void setValueMarkTexture(Texture2D texture)
          Sets the texture to use for the value mark.
 
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(int height,
                          Texture2D leftTexture,
                          Texture2D rightTexture,
                          Texture2D bodyTexture,
                          Texture2D valueMarkTexture,
                          Texture2D handleTexture,
                          int handleYOffset,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
height - the height
leftTexture - the texture to use for the left end
rightTexture - the texture to use for the right end
bodyTexture - the texture to use for the body (tiled)
valueMarkTexture - the texture to use for the value mark (repeated)
handleTexture - the handle texture to use
handleYOffset - the y-offset for the handle button
smoothSliding - use smooth sliding?

Slider.Description

public Slider.Description(int height,
                          java.lang.String leftTexture,
                          java.lang.String rightTexture,
                          java.lang.String bodyTexture,
                          java.lang.String valueMarkTexture,
                          java.lang.String handleTexture,
                          int handleYOffset,
                          boolean smoothSliding)
Creates a new Slider.Description.

Parameters:
height - the height
leftTexture - the texture to use for the left end
rightTexture - the texture to use for the right end
bodyTexture - the texture to use for the body (tiled)
valueMarkTexture - the texture to use for the value mark (repeated)
handleTexture - the handle texture to use
handleYOffset - the y-offset for the handle button
smoothSliding - use smooth sliding?
Method Detail

setHeight

public void setHeight(int height)
Sets the height.

Parameters:
height - the new height

getHeight

public final int getHeight()
Returns:
the height

setLeftTexture

public void setLeftTexture(Texture2D 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 final Texture2D getLeftTexture()
Returns:
the texture to use for the left end.

setRightTexture

public void setRightTexture(Texture2D 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 final Texture2D getRightTexture()
Returns:
the texture to use for the left end.

setBodyTexture

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

Parameters:
texture - the texture

setBodyTexture

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

Parameters:
texture - the texture

getBodyTexture

public final Texture2D getBodyTexture()
Returns:
the texture to use for the body.

setValueMarkTexture

public void setValueMarkTexture(Texture2D texture)
Sets the texture to use for the value mark.

Parameters:
texture - the texture

setValueMarkTexture

public void setValueMarkTexture(java.lang.String texture)
Sets the texture to use for the value mark.

Parameters:
texture - the texture

getValueMarkTexture

public final Texture2D getValueMarkTexture()
Returns:
the texture to use for the value mark.

setHandleTexture

public void setHandleTexture(Texture2D 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 final Texture2D getHandleTexture()
Returns:
the texture to use for the handle.

setHandleButtonYOffset

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

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

getHandleButtonYOffset

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

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

getSmoothSliding

public final boolean getSmoothSliding()
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.