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 GuiElementDimensionsCalculates content dimensions for this element.booleanvoidrenderContent(Renderer renderer) Method to render the main content of the gui element (not borders, backgrounds, etc.).voidFocuses this element if it is able to have focus.self()Methods inherited from class technology.sola.engine.graphics.gui.GuiElement
addStyle, addStyle, addStyles, appendChildren, events, findElementById, findElementsByType, findFocussedChildIndex, getAssetLoaderProvider, getBounds, getContentBounds, getFocusableChildren, getId, getParent, invalidateLayout, isActive, isAttached, isFocussed, isHovered, isLayoutChanged, removeChild, render, renderChildren, setId, setVirtualKeyboardVisible, styles
-
Constructor Details
-
SectionGuiElement
public SectionGuiElement()
-
-
Method Details
-
renderContent
Description copied from class:GuiElementMethod to render the main content of the gui element (not borders, backgrounds, etc.).- Specified by:
renderContentin classGuiElement<BaseStyles,SectionGuiElement> - Parameters:
renderer- theRendererinstance
-
calculateContentDimensions
Description copied from class:GuiElementCalculates content dimensions for this element. If its dimensions are derived from only its children then it should return null.- Specified by:
calculateContentDimensionsin classGuiElement<BaseStyles,SectionGuiElement> - Returns:
- the dimensions of the content of this element or null if only children dimensions matter
-
self
- Specified by:
selfin classGuiElement<BaseStyles,SectionGuiElement> - Returns:
- A correctly typed reference to this
GuiElement
-
isFocusable
public boolean isFocusable()- Overrides:
isFocusablein classGuiElement<BaseStyles,SectionGuiElement> - Returns:
- true if the element is currently focusable
-
requestFocus
public void requestFocus()Description copied from class:GuiElementFocuses this element if it is able to have focus.- Overrides:
requestFocusin classGuiElement<BaseStyles,SectionGuiElement>
-