Class UIBackdrop

java.lang.Object
com.ardor3d.extension.ui.backdrop.UIBackdrop
Direct Known Subclasses:
EmptyBackdrop, GradientBackdrop, SolidArcBackdrop, SolidBackdrop, SolidDiskBackdrop

public abstract class UIBackdrop extends Object
Defines a class responsible for drawing a "backdrop" or screen/background that lays behind a UI component.
  • Constructor Details

    • UIBackdrop

      public UIBackdrop()
  • Method Details

    • draw

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

      public static int getBackdropHeight(UIComponent component)
      Get the height that a backdrop should cover for a given component. The height is the component's current content area height, plus any padding on the top and bottom.
      Parameters:
      component - the component to check against
      Returns:
      the height as described above
    • getBackdropWidth

      public static int getBackdropWidth(UIComponent component)
      Get the width that a backdrop should cover for a given component. The width is the component's current content area width, plus any padding on the left and right.
      Parameters:
      component - the component to check against
      Returns:
      the width as described above