Component
, TextGUIElement
public class Separator extends AbstractComponent<Separator>
Modifier and Type | Class | Description |
---|---|---|
static class |
Separator.DefaultSeparatorRenderer |
This is the default separator renderer that is used if you don't override anything.
|
static class |
Separator.SeparatorRenderer |
Helper interface that doesn't add any new methods but makes coding new button renderers a little bit more clear
|
Constructor | Description |
---|---|
Separator(Direction direction) |
Creates a new
Separator for a specific direction, which will decide whether to draw a horizontal line or
a vertical line |
Modifier and Type | Method | Description |
---|---|---|
protected Separator.DefaultSeparatorRenderer |
createDefaultRenderer() |
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).
|
Direction |
getDirection() |
Returns the direction of the line drawn for this separator
|
addTo, calculatePreferredSize, draw, getBasePane, getLayoutData, getParent, getPosition, getPreferredSize, getRenderer, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, invalidate, isInside, isInvalid, onAdded, onAfterDrawing, onBeforeDrawing, onRemoved, runOnGUIThreadIfExistsOtherwiseRunDirect, self, setLayoutData, setPosition, setPreferredSize, setRenderer, setSize, setTheme, toBasePane, toGlobal, withBorder
public Separator(Direction direction)
Separator
for a specific direction, which will decide whether to draw a horizontal line or
a vertical linedirection
- Direction of the line to draw within the separatorpublic Direction getDirection()
protected Separator.DefaultSeparatorRenderer createDefaultRenderer()
AbstractComponent
createDefaultRenderer
in class AbstractComponent<Separator>
Copyright © 2020. All rights reserved.