- All Implemented Interfaces:
Component
,TextGUIElement
Static non-interactive component that is typically rendered as a single line. Normally this component is used to
separate component from each other in situations where a bordered panel isn't ideal. By default the separator will
ask for a size of 1x1 so you'll need to make it bigger, either through the layout manager or by overriding the
preferred size.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This is the default separator renderer that is used if you don't override anything.static class
Helper interface that doesn't add any new methods but makes coding new button renderers a little bit more clear -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Separator.DefaultSeparatorRenderer
When you create a custom component, you need to implement this method and return a Renderer which is responsible for taking care of sizing the component, rendering it and choosing where to place the cursor (if Interactable).Returns the direction of the line drawn for this separatorMethods inherited from class com.googlecode.lanterna.gui2.AbstractComponent
addTo, calculatePreferredSize, draw, getBasePane, getGlobalPosition, getLayoutData, getParent, getPosition, getPreferredSize, getRenderer, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, invalidate, isInside, isInvalid, isVisible, onAdded, onAfterDrawing, onBeforeDrawing, onRemoved, runOnGUIThreadIfExistsOtherwiseRunDirect, self, setLayoutData, setPosition, setPreferredSize, setRenderer, setSize, setTheme, setVisible, toBasePane, toGlobal, withBorder
-
Field Details
-
direction
-
-
Constructor Details
-
Separator
Creates a newSeparator
for a specific direction, which will decide whether to draw a horizontal line or a vertical line- Parameters:
direction
- Direction of the line to draw within the separator
-
-
Method Details
-
getDirection
Returns the direction of the line drawn for this separator- Returns:
- Direction of the line drawn for this separator
-
createDefaultRenderer
Description copied from class:AbstractComponent
When you create a custom component, you need to implement this method and return a Renderer which is responsible for taking care of sizing the component, rendering it and choosing where to place the cursor (if Interactable). This value is intended to be overridden by custom themes.- Specified by:
createDefaultRenderer
in classAbstractComponent<Separator>
- Returns:
- Renderer to use when sizing and drawing this component
-