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 TypeMethodDescriptionvoiddrawComponent(TextGUIGraphics graphics, Border component) Using the supplied graphics object, draws the component passed in.protected abstract chargetBottomLeftCorner(Theme theme) protected abstract chargetBottomRightCorner(Theme theme) protected abstract chargetHorizontalLine(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 chargetTitleLeft(Theme theme) protected abstract chargetTitleRight(Theme theme) protected abstract chargetTopLeftCorner(Theme theme) protected abstract chargetTopRightCorner(Theme theme) protected abstract chargetVerticalLine(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:ComponentRendererGiven 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:
getPreferredSizein 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.BorderRendererHow large is the offset from the top left corner of the border to the top left corner of the wrapped component?- Specified by:
getWrappedComponentTopLeftOffsetin 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.BorderRendererGiven a total size of the border composite and it's wrapped component, how large would the actual wrapped component be?- Specified by:
getWrappedComponentSizein 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:ComponentRendererUsing the supplied graphics object, draws the component passed in.- Specified by:
drawComponentin interfaceComponentRenderer<Border>- Parameters:
graphics- Graphics object to use for drawingcomponent- Component to draw
-
getHorizontalLine
-
getVerticalLine
-
getBottomLeftCorner
-
getTopLeftCorner
-
getBottomRightCorner
-
getTopRightCorner
-
getTitleLeft
-
getTitleRight
-