Package com.spinyowl.legui.component
Class Button
java.lang.Object
com.spinyowl.legui.component.Component
com.spinyowl.legui.component.AbstractTextComponent
com.spinyowl.legui.component.Button
- All Implemented Interfaces:
TextComponent,Serializable
- Direct Known Subclasses:
SelectBox.SelectBoxElement,ToggleButton
An implementation of "push" button.
- See Also:
-
Field Summary
FieldsFields inherited from class com.spinyowl.legui.component.AbstractTextComponent
textState -
Constructor Summary
ConstructorsConstructorDescriptionButton()Creates a button with default text.Button(float x, float y, float width, float height) Creates a button with default text and specified position and size.Creates a button with specified text.Creates a button with specified text and specified position and size.Creates a button with specified text and specified position and size.Button(org.joml.Vector2f position, org.joml.Vector2f size) Creates a button with default text and specified position and size. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()voidsetTextDirection(TextDirection textDirection) toString()Methods inherited from class com.spinyowl.legui.component.AbstractTextComponent
getTextState, setTextStateMethods inherited from class com.spinyowl.legui.component.Component
add, add, addAll, clearChildComponents, containerIterator, contains, containsAll, count, forEach, getAbsolutePosition, getChildComponents, getFocusedStyle, getFrame, getHoveredStyle, getIntersector, getLayer, getListenerMap, getMetadata, getParent, getPosition, getPressedStyle, getSize, getStyle, getTabIndex, getTooltip, 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
-
Field Details
-
DEFAULT_BUTTON_TEXT
Default text for button component.- See Also:
-
-
Constructor Details
-
Button
public Button()Creates a button with default text. -
Button
public Button(float x, float y, float width, float height) Creates a button with default text and specified position and size.- Parameters:
x- x position in parent.y- y position in parent.width- width of component.height- height of component.
-
Button
public Button(org.joml.Vector2f position, org.joml.Vector2f size) Creates a button with default text and specified position and size.- Parameters:
position- position in parent.size- size of component.
-
Button
Creates a button with specified text.- Parameters:
text- button text.
-
Button
Creates a button with specified text and specified position and size.- Parameters:
text- button text.x- x position in parent.y- y position in parent.width- width of component.height- height of component.
-
Button
Creates a button with specified text and specified position and size.- Parameters:
text- button text.position- position in parent.size- size of component.
-
-
Method Details