net.ctdp.rfdynhud.render
Class BorderWrapper

java.lang.Object
  extended by net.ctdp.rfdynhud.render.BorderWrapper

public class BorderWrapper
extends java.lang.Object

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

Author:
Marvin Froehlich (CTDP) (aka Qudus)

Constructor Summary
BorderWrapper(BorderRenderer renderer, BorderMeasures measures, IntProperty paddingTop, IntProperty paddingLeft, IntProperty paddingRight, IntProperty paddingBottom)
          Creates a new BorderWrapper encapsulating the given border.
 
Method Summary
 void drawBorder(java.awt.Color backgroundColor, TextureImage2D texture, int offsetX, int offsetY, int width, int height)
           
 int getBottomHeight()
           
 int getInnerBottomHeight()
           
 int getInnerBottomHeightWOPadding()
           
 int getInnerLeftWidth()
           
 int getInnerLeftWidthWOPadding()
           
 int getInnerRightWidth()
           
 int getInnerRightWidthWOPadding()
           
 int getInnerTopHeight()
           
 int getInnerTopHeightWOPadding()
           
 int getLeftWidth()
           
 int getLLrightWidth()
           
 int getLLupperHeight()
           
 int getLRleftWidth()
           
 int getLRupperHeight()
           
 int getOpaqueBottomHeight()
           
 int getOpaqueLeftWidth()
           
 int getOpaqueRightWidth()
           
 int getOpaqueTopHeight()
           
 int getPaddingBottom()
           
 int getPaddingLeft()
           
 int getPaddingRight()
           
 int getPaddingTop()
           
 BorderRenderer getRenderer()
           
 int getRightWidth()
           
 int getTopHeight()
           
 int getULlowerHeight()
           
 int getULrightWidth()
           
 int getURleftWidth()
           
 int getURlowerHeight()
           
 int getWidgetHeight(int heightWithoutInner)
           
 int getWidgetWidth(int widthWithoutInner)
           
 boolean hasBorder()
          Returns whether this border has something to draw.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorderWrapper

public BorderWrapper(BorderRenderer renderer,
                     BorderMeasures measures,
                     IntProperty paddingTop,
                     IntProperty paddingLeft,
                     IntProperty paddingRight,
                     IntProperty paddingBottom)
Creates a new BorderWrapper encapsulating the given border.

Parameters:
renderer - the renderer
measures - the measures
paddingTop - top padding property
paddingLeft - left padding property
paddingRight - right padding property
paddingBottom - bottom padding property
Method Detail

getRenderer

public final BorderRenderer getRenderer()

hasBorder

public final boolean hasBorder()
Returns whether this border has something to draw.

Returns:
whether this border has something to draw.

getTopHeight

public final int getTopHeight()

getLeftWidth

public final int getLeftWidth()

getRightWidth

public final int getRightWidth()

getBottomHeight

public final int getBottomHeight()

getOpaqueTopHeight

public final int getOpaqueTopHeight()

getOpaqueLeftWidth

public final int getOpaqueLeftWidth()

getOpaqueRightWidth

public final int getOpaqueRightWidth()

getOpaqueBottomHeight

public final int getOpaqueBottomHeight()

getInnerTopHeight

public final int getInnerTopHeight()

getInnerLeftWidth

public final int getInnerLeftWidth()

getInnerRightWidth

public final int getInnerRightWidth()

getInnerBottomHeight

public final int getInnerBottomHeight()

getInnerTopHeightWOPadding

public final int getInnerTopHeightWOPadding()

getInnerLeftWidthWOPadding

public final int getInnerLeftWidthWOPadding()

getInnerRightWidthWOPadding

public final int getInnerRightWidthWOPadding()

getInnerBottomHeightWOPadding

public final int getInnerBottomHeightWOPadding()

getPaddingTop

public final int getPaddingTop()

getPaddingLeft

public final int getPaddingLeft()

getPaddingRight

public final int getPaddingRight()

getPaddingBottom

public final int getPaddingBottom()

getWidgetWidth

public final int getWidgetWidth(int widthWithoutInner)

getWidgetHeight

public final int getWidgetHeight(int heightWithoutInner)

getLLupperHeight

public final int getLLupperHeight()

getLLrightWidth

public final int getLLrightWidth()

getLRleftWidth

public final int getLRleftWidth()

getLRupperHeight

public final int getLRupperHeight()

getURlowerHeight

public final int getURlowerHeight()

getURleftWidth

public final int getURleftWidth()

getULrightWidth

public final int getULrightWidth()

getULlowerHeight

public final int getULlowerHeight()

drawBorder

public void drawBorder(java.awt.Color backgroundColor,
                       TextureImage2D texture,
                       int offsetX,
                       int offsetY,
                       int width,
                       int height)