public static class Button.DefaultButtonRenderer extends Object implements Button.ButtonRenderer
Constructor and Description |
---|
DefaultButtonRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
drawComponent(TextGUIGraphics graphics,
Button button)
Using the supplied graphics object, draws the component passed in.
|
TerminalPosition |
getCursorLocation(Button button) |
TerminalSize |
getPreferredSize(Button button)
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(Button button)
getCursorLocation
in interface InteractableRenderer<Button>
public TerminalSize getPreferredSize(Button button)
ComponentRenderer
getPreferredSize
in interface ComponentRenderer<Button>
button
- Component to calculate the preferred size ofpublic void drawComponent(TextGUIGraphics graphics, Button button)
ComponentRenderer
drawComponent
in interface ComponentRenderer<Button>
graphics
- Graphics object to use for drawingbutton
- Component to drawCopyright © 2016. All rights reserved.