Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Class Separator.DefaultSeparatorRenderer
- java.lang.Object
-
- com.googlecode.lanterna.gui2.Separator.SeparatorRenderer
-
- com.googlecode.lanterna.gui2.Separator.DefaultSeparatorRenderer
-
- All Implemented Interfaces:
ComponentRenderer<Separator>
- Enclosing class:
- Separator
public static class Separator.DefaultSeparatorRenderer extends Separator.SeparatorRenderer
This is the default separator renderer that is used if you don't override anything. With this renderer, the separator has a preferred size of one but will take up the whole area it is given and fill that space with either horizontal or vertical lines, depending on the direction of theSeparator
-
-
Constructor Summary
Constructors Constructor Description DefaultSeparatorRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawComponent(TextGUIGraphics graphics, Separator component)
Using the supplied graphics object, draws the component passed in.TerminalSize
getPreferredSize(Separator 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.
-
-
-
Method Detail
-
getPreferredSize
public TerminalSize getPreferredSize(Separator component)
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:
component
- 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, Separator component)
Description copied from interface:ComponentRenderer
Using the supplied graphics object, draws the component passed in.- Parameters:
graphics
- Graphics object to use for drawingcomponent
- Component to draw
-
-