Interface ComponentRenderer<T extends Component>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void drawComponent​(TextGUIGraphics graphics, T component)
      Using the supplied graphics object, draws the component passed in.
      TerminalSize getPreferredSize​(T component)
      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.
    • Method Detail

      • getPreferredSize

        TerminalSize getPreferredSize​(T component)
        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.
        Parameters:
        component - Component to calculate the preferred size of
        Returns:
        The size this renderer would like the component to take up
      • drawComponent

        void drawComponent​(TextGUIGraphics graphics,
                           T component)
        Using the supplied graphics object, draws the component passed in.
        Parameters:
        graphics - Graphics object to use for drawing
        component - Component to draw