Class ImageBorder


public class ImageBorder extends UIBorder
This border takes a set of images and draws them around the edge of a UI component. There are eight possible border images - 4 for the sides of the component and 4 for the corners. Of these, only the sides must be provided. If the corners are null, the top and bottom will stretch to fill in the gaps.
  • Constructor Details

    • ImageBorder

      public ImageBorder(SubTex subtex)
      Construct this border as a 9-slice using the given subtex and its defined borders.
      Parameters:
      subtex - the subtex
    • ImageBorder

      public ImageBorder(SubTex leftEdge, SubTex rightEdge, SubTex topEdge, SubTex bottomEdge)
      Construct this border using the given edge images. The corners will not be drawn.
      Parameters:
      leftEdge - the left edge
      rightEdge - the right edge
      topEdge - the top edge
      bottomEdge - the bottom edge
    • ImageBorder

      public ImageBorder(SubTex leftEdge, SubTex rightEdge, SubTex topEdge, SubTex bottomEdge, SubTex topLeftCorner, SubTex topRightCorner, SubTex bottomLeftCorner, SubTex bottomRightCorner)
      Construct this border using the given edge and side images.
      Parameters:
      leftEdge - the left edge
      rightEdge - the right edge
      topEdge - the top edge
      bottomEdge - the bottom edge
      topLeftCorner - the top left corner
      topRightCorner - the top right corner
      bottomLeftCorner - the bottom left corner
      bottomRightCorner - the bottom right corner
  • Method Details

    • getBottomEdge

      public SubTex getBottomEdge()
    • setBottomEdge

      public void setBottomEdge(SubTex bottomEdge)
    • getBottomLeftCorner

      public SubTex getBottomLeftCorner()
    • setBottomLeftCorner

      public void setBottomLeftCorner(SubTex bottomLeftCorner)
    • getBottomRightCorner

      public SubTex getBottomRightCorner()
    • setBottomRightCorner

      public void setBottomRightCorner(SubTex bottomRightCorner)
    • getLeftEdge

      public SubTex getLeftEdge()
    • setLeftEdge

      public void setLeftEdge(SubTex leftEdge)
    • getRightEdge

      public SubTex getRightEdge()
    • setRightEdge

      public void setRightEdge(SubTex rightEdge)
    • getTopEdge

      public SubTex getTopEdge()
    • setTopEdge

      public void setTopEdge(SubTex topEdge)
    • getTopLeftCorner

      public SubTex getTopLeftCorner()
    • setTopLeftCorner

      public void setTopLeftCorner(SubTex topLeftCorner)
    • getTopRightCorner

      public SubTex getTopRightCorner()
    • setTopRightCorner

      public void setTopRightCorner(SubTex topRightCorner)
    • draw

      public void draw(Renderer renderer, UIComponent comp)
      Description copied from class: UIBorder
      Draw this border. Override this method to do the actual work.
      Specified by:
      draw in class UIBorder
      Parameters:
      renderer - the renderer to use in drawing.
      comp - the UIComponent we are drawing the border for.