Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Class Borders.AbstractBorderRenderer
java.lang.Object
com.googlecode.lanterna.gui2.Borders.AbstractBorderRenderer
- All Implemented Interfaces:
Border.BorderRenderer
,ComponentRenderer<Border>
- Direct Known Subclasses:
Borders.DoubleLineRenderer
,Borders.SingleLineRenderer
- Enclosing class:
Borders
private abstract static class Borders.AbstractBorderRenderer
extends Object
implements Border.BorderRenderer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawComponent
(TextGUIGraphics graphics, Border component) Using the supplied graphics object, draws the component passed in.protected abstract char
getBottomLeftCorner
(Theme theme) protected abstract char
getBottomRightCorner
(Theme theme) protected abstract char
getHorizontalLine
(Theme theme) getPreferredSize
(Border 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.protected abstract char
getTitleLeft
(Theme theme) protected abstract char
getTitleRight
(Theme theme) protected abstract char
getTopLeftCorner
(Theme theme) protected abstract char
getTopRightCorner
(Theme theme) protected abstract char
getVerticalLine
(Theme theme) getWrappedComponentSize
(TerminalSize borderSize) Given a total size of the border composite and it's wrapped component, how large would the actual wrapped component be?How large is the offset from the top left corner of the border to the top left corner of the wrapped component?
-
Field Details
-
borderStyle
-
-
Constructor Details
-
AbstractBorderRenderer
-
-
Method Details
-
getPreferredSize
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.- Specified by:
getPreferredSize
in interfaceComponentRenderer<Border>
- Parameters:
component
- Component to calculate the preferred size of- Returns:
- The size this renderer would like the component to take up
-
getWrappedComponentTopLeftOffset
Description copied from interface:Border.BorderRenderer
How large is the offset from the top left corner of the border to the top left corner of the wrapped component?- Specified by:
getWrappedComponentTopLeftOffset
in interfaceBorder.BorderRenderer
- Returns:
- Position of the wrapped components top left position, relative to the top left corner of the border
-
getWrappedComponentSize
Description copied from interface:Border.BorderRenderer
Given a total size of the border composite and it's wrapped component, how large would the actual wrapped component be?- Specified by:
getWrappedComponentSize
in interfaceBorder.BorderRenderer
- Parameters:
borderSize
- Size to calculate for, this should be the total size of the border and the inner component- Returns:
- Size of the inner component if the total size of inner + border is borderSize
-
drawComponent
Description copied from interface:ComponentRenderer
Using the supplied graphics object, draws the component passed in.- Specified by:
drawComponent
in interfaceComponentRenderer<Border>
- Parameters:
graphics
- Graphics object to use for drawingcomponent
- Component to draw
-
getHorizontalLine
-
getVerticalLine
-
getBottomLeftCorner
-
getTopLeftCorner
-
getBottomRightCorner
-
getTopRightCorner
-
getTitleLeft
-
getTitleRight
-