Class Form

  • All Implemented Interfaces:
    Drawable, Updatable

    public class Form
    extends Widget
    Panel that contains a number of user interface widgets that are layed out in a two-dimensional grid. The location of the widgets will be determined automatically relative to the location of the form. The form's coordinates describe the X coordinate of its center, and the Y coordinate of the first row of widgets.
    • Method Detail

      • add

        public Button add​(java.lang.String label,
                          Button button,
                          java.lang.Runnable onClick)
      • add

        public Button add​(Button button,
                          java.lang.Runnable onClick)
      • add

        public SelectBox add​(java.lang.String label,
                             SelectBox selectBox,
                             java.util.function.Consumer<java.lang.String> onChange)
      • add

        public SelectBox add​(java.lang.String label,
                             SelectBox selectBox,
                             java.lang.Runnable onChange)
      • add

        public TextField add​(java.lang.String label,
                             TextField textField,
                             java.util.function.Consumer<java.lang.String> onChange)
      • addEmptyRow

        public void addEmptyRow()
      • setVisible

        public void setVisible​(Widget widget,
                               boolean visible)
      • setMargin

        public void setMargin​(float horizontalMargin,
                              float verticalMargin)
      • setLabelOffset

        public void setLabelOffset​(float labelOffset)
      • update

        public void update​(float deltaTime)
        Description copied from interface: Updatable
        Updates this object for the current frame.
        Parameters:
        deltaTime - Elapsed time since the last frame, in seconds.
      • getWidgets

        protected java.util.List<Widget> getWidgets()