public static class TextBox.DefaultTextBoxRenderer extends Object implements TextBox.TextBoxRenderer
TextBox
does not fit in the available area.Constructor and Description |
---|
DefaultTextBoxRenderer()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
drawComponent(TextGUIGraphics graphics,
TextBox component)
Using the supplied graphics object, draws the component passed in.
|
TerminalPosition |
getCursorLocation(TextBox component) |
TerminalSize |
getPreferredSize(TextBox component)
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.
|
TerminalPosition |
getViewTopLeft() |
void |
setHideScrollBars(boolean hideScrollBars)
Controls whether scrollbars should be visible or not when a multi-line
TextBox has more content than
it can draw in the area it was assigned (default: false) |
void |
setViewTopLeft(TerminalPosition position) |
public TerminalPosition getViewTopLeft()
getViewTopLeft
in interface TextBox.TextBoxRenderer
public void setViewTopLeft(TerminalPosition position)
setViewTopLeft
in interface TextBox.TextBoxRenderer
public TerminalPosition getCursorLocation(TextBox component)
getCursorLocation
in interface InteractableRenderer<TextBox>
public TerminalSize getPreferredSize(TextBox component)
ComponentRenderer
getPreferredSize
in interface ComponentRenderer<TextBox>
component
- Component to calculate the preferred size ofpublic void setHideScrollBars(boolean hideScrollBars)
TextBox
has more content than
it can draw in the area it was assigned (default: false)hideScrollBars
- If true
, don't show scrollbars if the multi-line content is bigger than the
areapublic void drawComponent(TextGUIGraphics graphics, TextBox component)
ComponentRenderer
drawComponent
in interface ComponentRenderer<TextBox>
graphics
- Graphics object to use for drawingcomponent
- Component to drawCopyright © 2016. All rights reserved.