Class Borders.AbstractBorderRenderer

java.lang.Object
com.googlecode.lanterna.gui2.Borders.AbstractBorderRenderer
All Implemented Interfaces:
Border.BorderRenderer, ComponentRenderer<Border>
Direct Known Subclasses:
Borders.DoubleLineRenderer, Borders.SingleLineRenderer
Enclosing class:
Borders

private abstract static class Borders.AbstractBorderRenderer extends Object implements Border.BorderRenderer
  • Field Details

  • Constructor Details

  • Method Details

    • getPreferredSize

      public TerminalSize getPreferredSize(Border component)
      Description copied from interface: ComponentRenderer
      Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.
      Specified by:
      getPreferredSize in interface ComponentRenderer<Border>
      Parameters:
      component - Component to calculate the preferred size of
      Returns:
      The size this renderer would like the component to take up
    • getWrappedComponentTopLeftOffset

      public TerminalPosition getWrappedComponentTopLeftOffset()
      Description copied from interface: Border.BorderRenderer
      How large is the offset from the top left corner of the border to the top left corner of the wrapped component?
      Specified by:
      getWrappedComponentTopLeftOffset in interface Border.BorderRenderer
      Returns:
      Position of the wrapped components top left position, relative to the top left corner of the border
    • getWrappedComponentSize

      public TerminalSize getWrappedComponentSize(TerminalSize borderSize)
      Description copied from interface: Border.BorderRenderer
      Given a total size of the border composite and it's wrapped component, how large would the actual wrapped component be?
      Specified by:
      getWrappedComponentSize in interface Border.BorderRenderer
      Parameters:
      borderSize - Size to calculate for, this should be the total size of the border and the inner component
      Returns:
      Size of the inner component if the total size of inner + border is borderSize
    • drawComponent

      public void drawComponent(TextGUIGraphics graphics, Border component)
      Description copied from interface: ComponentRenderer
      Using the supplied graphics object, draws the component passed in.
      Specified by:
      drawComponent in interface ComponentRenderer<Border>
      Parameters:
      graphics - Graphics object to use for drawing
      component - Component to draw
    • getHorizontalLine

      protected abstract char getHorizontalLine(Theme theme)
    • getVerticalLine

      protected abstract char getVerticalLine(Theme theme)
    • getBottomLeftCorner

      protected abstract char getBottomLeftCorner(Theme theme)
    • getTopLeftCorner

      protected abstract char getTopLeftCorner(Theme theme)
    • getBottomRightCorner

      protected abstract char getBottomRightCorner(Theme theme)
    • getTopRightCorner

      protected abstract char getTopRightCorner(Theme theme)
    • getTitleLeft

      protected abstract char getTitleLeft(Theme theme)
    • getTitleRight

      protected abstract char getTitleRight(Theme theme)