Class ComboBox.DefaultComboBoxRenderer<V>

java.lang.Object
com.googlecode.lanterna.gui2.ComboBox.ComboBoxRenderer<V>
com.googlecode.lanterna.gui2.ComboBox.DefaultComboBoxRenderer<V>
Type Parameters:
V - Type of items in the combo box
All Implemented Interfaces:
ComponentRenderer<ComboBox<V>>, InteractableRenderer<ComboBox<V>>
Enclosing class:
ComboBox<V>

public static class ComboBox.DefaultComboBoxRenderer<V> extends ComboBox.ComboBoxRenderer<V>
This class is the default renderer implementation which will be used unless overridden. The combo box is rendered like a text box with an arrow point down to the right of it, which can receive focus and triggers the popup.
  • Field Details

    • textVisibleLeftPosition

      private int textVisibleLeftPosition
  • Constructor Details

    • DefaultComboBoxRenderer

      public DefaultComboBoxRenderer()
      Default constructor
  • Method Details

    • getCursorLocation

      public TerminalPosition getCursorLocation(ComboBox<V> comboBox)
    • getPreferredSize

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