Class AbstractListBox.DefaultListBoxRenderer<V,​T extends AbstractListBox<V,​T>>

    • Field Detail

      • verticalScrollBar

        private final ScrollBar verticalScrollBar
      • scrollTopIndex

        private int scrollTopIndex
    • Constructor Detail

      • DefaultListBoxRenderer

        public DefaultListBoxRenderer()
        Default constructor
    • Method Detail

      • getPreferredSize

        public TerminalSize getPreferredSize​(T listBox)
        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<V>
        Parameters:
        listBox - 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,
                                  T listBox)
        Description copied from interface: ComponentRenderer
        Using the supplied graphics object, draws the component passed in.
        Specified by:
        drawComponent in interface ComponentRenderer<V>
        Parameters:
        graphics - Graphics object to use for drawing
        listBox - Component to draw