Class UIBorder

java.lang.Object
com.ardor3d.extension.ui.util.Insets
com.ardor3d.extension.ui.border.UIBorder
Direct Known Subclasses:
EmptyBorder, ImageBorder, SolidBorder

public abstract class UIBorder extends Insets
Defines a class responsible for drawing a "border" or "picture frame" drawn around the edges of a UI component.
  • Constructor Details

    • UIBorder

      public UIBorder(int top, int left, int bottom, int right)
      Construct a border with the given edge thicknesses.
      Parameters:
      top - the top
      left - the left
      bottom - the bottom
      right - the right
  • Method Details

    • draw

      public abstract void draw(Renderer renderer, UIComponent component)
      Draw this border. Override this method to do the actual work.
      Parameters:
      renderer - the renderer to use in drawing.
      component - the UIComponent we are drawing the border for.
    • getBorderHeight

      public static int getBorderHeight(UIComponent component)
      Calculate the total height of a border for a given component. This is the current inner height of the component plus the top and bottom paddings and border thicknesses.
      Parameters:
      component - the component to check against
      Returns:
      the height
    • getBorderWidth

      public static int getBorderWidth(UIComponent component)
      Calculate the total width of a border for a given component. This is the current inner width of the component plus the left and right paddings and border thicknesses.
      Parameters:
      component - the component to check against
      Returns:
      the width