Module technology.sola.engine
Class SectionGuiElement
java.lang.Object
technology.sola.engine.graphics.gui.GuiElement<BaseStyles,SectionGuiElement>
technology.sola.engine.graphics.gui.elements.SectionGuiElement
SectionGuiElement is a
GuiElement
that is simply a container for its children elements. It has various
keyboard shortcuts for navigating its children.-
Field Summary
Fields inherited from class technology.sola.engine.graphics.gui.GuiElement
children, contentBounds, styleContainer
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SectionGuiElement instance and registers key pressed events for navigating its children. -
Method Summary
Modifier and TypeMethodDescription@Nullable GuiElementDimensions
Calculates content dimensions for this element.boolean
void
renderContent
(Renderer renderer) Method to render the main content of the gui element (not borders, backgrounds, etc.).void
Focuses this element if it is able to have focus.Methods inherited from class technology.sola.engine.graphics.gui.GuiElement
addStyle, addStyle, addStyles, appendChildren, events, findElementById, findElementsByType, findFocussedChildIndex, getAssetLoaderProvider, getBounds, getChildren, getContentBounds, getFocusableChildren, getId, getParent, invalidateLayout, isActive, isFocussed, isHovered, isLayoutChanged, removeChild, render, renderChildren, setId, styles
-
Constructor Details
-
SectionGuiElement
public SectionGuiElement()
-
-
Method Details
-
renderContent
Description copied from class:GuiElement
Method to render the main content of the gui element (not borders, backgrounds, etc.).- Specified by:
renderContent
in classGuiElement<BaseStyles,
SectionGuiElement> - Parameters:
renderer
- theRenderer
instance
-
calculateContentDimensions
Description copied from class:GuiElement
Calculates content dimensions for this element. If its dimensions are derived from only its children then it should return null.- Specified by:
calculateContentDimensions
in classGuiElement<BaseStyles,
SectionGuiElement> - Returns:
- the dimensions of the content of this element or null if only children dimensions matter
-
isFocusable
public boolean isFocusable()- Overrides:
isFocusable
in classGuiElement<BaseStyles,
SectionGuiElement> - Returns:
- true if the element is currently focusable
-
requestFocus
public void requestFocus()Description copied from class:GuiElement
Focuses this element if it is able to have focus.- Overrides:
requestFocus
in classGuiElement<BaseStyles,
SectionGuiElement>
-