org.xith3d.ui.hud.borders
Class TexturedBorder

java.lang.Object
  extended by org.xith3d.ui.hud.base.Border
      extended by org.xith3d.ui.hud.borders.TexturedBorder
Direct Known Subclasses:
BevelBorder, RoundedCornersBorder

public class TexturedBorder
extends Border

A TexturedBorder is a Border implementation with no Textures but only a color.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.ui.hud.base.Border
Border.Description
 
Constructor Summary
TexturedBorder(Border.Description description)
          Creates a new TexturedBorder with the given side widths specified in the given description.
TexturedBorder(int bottomHeight, int rightWidth, int topHeight, int leftWidth, java.lang.String texture)
          Creates a new TexturedBorder with the given side widths and texture.
TexturedBorder(int bottomHeight, int rightWidth, int topHeight, int leftWidth, Texture2D texture)
          Creates a new TexturedBorder with the given sides and texture.
TexturedBorder(int width, java.lang.String texture)
          Creates a new TexturedBorder with all sides of the same width and the given texture.
TexturedBorder(int width, Texture2D texture)
          Creates a new TexturedBorder with all sides of the same width and the given texture.
 
Method Summary
 void drawBorder(Texture2DCanvas texCanvas, int offsetX, int offsetY, int width, int height, Widget hostWidget)
          
 Texture2D getTexture()
          Returns the border's texture.
 void setTexture(Texture2D texture)
          Sets the border's texture.
 
Methods inherited from class org.xith3d.ui.hud.base.Border
getBottomHeight, getLeftWidth, getRightWidth, getTopHeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexturedBorder

public TexturedBorder(int bottomHeight,
                      int rightWidth,
                      int topHeight,
                      int leftWidth,
                      Texture2D texture)
Creates a new TexturedBorder with the given sides and texture.

Parameters:
bottomHeight - the bottom height
rightWidth - the right width
topHeight - the top height
leftWidth - the left width
texture - the texture to use

TexturedBorder

public TexturedBorder(int width,
                      Texture2D texture)
Creates a new TexturedBorder with all sides of the same width and the given texture.

Parameters:
width - the width to use for all sides
texture - the texture to use

TexturedBorder

public TexturedBorder(Border.Description description)
Creates a new TexturedBorder with the given side widths specified in the given description.

Parameters:
description - the Border.Description where to take the widths from

TexturedBorder

public TexturedBorder(int bottomHeight,
                      int rightWidth,
                      int topHeight,
                      int leftWidth,
                      java.lang.String texture)
Creates a new TexturedBorder with the given side widths and texture.

Parameters:
bottomHeight - the bottom height
rightWidth - the right width
topHeight - the top height
leftWidth - the left width
texture - the resource name of the texture to use

TexturedBorder

public TexturedBorder(int width,
                      java.lang.String texture)
Creates a new TexturedBorder with all sides of the same width and the given texture.

Parameters:
width - the width to use for all sides
texture - the resource name of the texture to use
Method Detail

setTexture

public void setTexture(Texture2D texture)
Sets the border's texture.

Parameters:
texture - the texture to use

getTexture

public final Texture2D getTexture()
Returns the border's texture.

Returns:
the border's texture

drawBorder

public void drawBorder(Texture2DCanvas texCanvas,
                       int offsetX,
                       int offsetY,
                       int width,
                       int height,
                       Widget hostWidget)

Specified by:
drawBorder in class Border