Class MenuBar.DefaultMenuBarRenderer

java.lang.Object
com.googlecode.lanterna.gui2.menu.MenuBar.DefaultMenuBarRenderer
All Implemented Interfaces:
ComponentRenderer<MenuBar>
Enclosing class:
MenuBar

public class MenuBar.DefaultMenuBarRenderer extends Object implements ComponentRenderer<MenuBar>
The default implementation for rendering a MenuBar
  • Constructor Details

    • DefaultMenuBarRenderer

      public DefaultMenuBarRenderer()
  • Method Details

    • getPreferredSize

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

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