Class Button

All Implemented Interfaces:
TextComponent, Serializable
Direct Known Subclasses:
SelectBox.SelectBoxElement, ToggleButton

public class Button extends AbstractTextComponent
An implementation of "push" button.
See Also:
  • Field Details

    • DEFAULT_BUTTON_TEXT

      public static final String 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

      public Button(String text)
      Creates a button with specified text.
      Parameters:
      text - button text.
    • Button

      public Button(String text, float x, float y, float width, float height)
      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

      public Button(String text, org.joml.Vector2f position, org.joml.Vector2f size)
      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