Package com.spinyowl.legui.component
Class AbstractTextComponent
java.lang.Object
com.spinyowl.legui.component.Component
com.spinyowl.legui.component.AbstractTextComponent
- All Implemented Interfaces:
TextComponent,Serializable
- Direct Known Subclasses:
Button,CheckBox,Label,RadioButton,TextAreaField,TextInput,Tooltip
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractTextComponent(float x, float y, float width, float height) Constructor with position and size parameters.AbstractTextComponent(org.joml.Vector2f position, org.joml.Vector2f size) Constructor with position and size parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns current text state.voidsetTextState(TextState textState) Used to set text stateMethods inherited from class com.spinyowl.legui.component.Component
add, add, addAll, clearChildComponents, containerIterator, contains, containsAll, count, equals, forEach, getAbsolutePosition, getChildComponents, getFocusedStyle, getFrame, getHoveredStyle, getIntersector, getLayer, getListenerMap, getMetadata, getParent, getPosition, getPressedStyle, getSize, getStyle, getTabIndex, getTooltip, hashCode, indexOfChild, intersects, isEmpty, isEnabled, isFocusable, isFocused, isHovered, isPressed, isTabFocusable, isVisible, keepRendering, keepRendering, parallelStream, remove, remove, removeAll, removeIf, setEnabled, setFocusable, setFocused, setHovered, setIntersector, setListenerMap, setParent, setPosition, setPosition, setPressed, setSize, setSize, setStyle, setTabFocusable, setTabIndex, setTooltip, stream, toString
-
Field Details
-
textState
-
-
Constructor Details
-
AbstractTextComponent
public AbstractTextComponent()Default constructor. Used to create component instance without any parameters.Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
-
AbstractTextComponent
public AbstractTextComponent(float x, float y, float width, float height) Constructor with position and size parameters.- Parameters:
x- x position position in parent component.y- y position position in parent component.width- width of component.height- height of component.
-
AbstractTextComponent
public AbstractTextComponent(org.joml.Vector2f position, org.joml.Vector2f size) Constructor with position and size parameters.- Parameters:
position- position position in parent component.size- size of component.
-
-
Method Details
-
getTextState
Description copied from interface:TextComponentReturns current text state.- Specified by:
getTextStatein interfaceTextComponent- Returns:
- text state of component.
-
setTextState
Description copied from interface:TextComponentUsed to set text state- Specified by:
setTextStatein interfaceTextComponent- Parameters:
textState- new text state to set.
-