V
- Type of the items the list box this renderer is forT
- Type of list boxpublic static class AbstractListBox.DefaultListBoxRenderer<V,T extends AbstractListBox<V,T>> extends Object implements InteractableRenderer<T>
AbstractListBox
and all its subclasses.Constructor and Description |
---|
DefaultListBoxRenderer()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
drawComponent(TextGUIGraphics graphics,
T listBox)
Using the supplied graphics object, draws the component passed in.
|
TerminalPosition |
getCursorLocation(T listBox) |
TerminalSize |
getPreferredSize(T listBox)
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.
|
public TerminalPosition getCursorLocation(T listBox)
getCursorLocation
in interface InteractableRenderer<T extends AbstractListBox<V,T>>
public TerminalSize getPreferredSize(T listBox)
ComponentRenderer
getPreferredSize
in interface ComponentRenderer<T extends AbstractListBox<V,T>>
listBox
- Component to calculate the preferred size ofpublic void drawComponent(TextGUIGraphics graphics, T listBox)
ComponentRenderer
drawComponent
in interface ComponentRenderer<T extends AbstractListBox<V,T>>
graphics
- Graphics object to use for drawinglistBox
- Component to drawCopyright © 2016. All rights reserved.