Class Form
- java.lang.Object
-
- nl.colorize.multimedialib.scene.ui.Widget
-
- nl.colorize.multimedialib.scene.ui.Form
-
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.
-
-
Constructor Summary
Constructors Constructor Description Form(Location location, WidgetStyle labelStyle, InputDevice input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buttonadd(java.lang.String label, Button button, java.lang.Runnable onClick)SelectBoxadd(java.lang.String label, SelectBox selectBox)SelectBoxadd(java.lang.String label, SelectBox selectBox, java.lang.Runnable onChange)SelectBoxadd(java.lang.String label, SelectBox selectBox, java.util.function.Consumer<java.lang.String> onChange)TextFieldadd(java.lang.String label, TextField textField)TextFieldadd(java.lang.String label, TextField textField, java.util.function.Consumer<java.lang.String> onChange)Buttonadd(Button button, java.lang.Runnable onClick)voidadd(TextLabel label)voidaddEmptyRow()WidgetStylegetStyle()protected java.util.List<Widget>getWidgets()voidrender(GraphicsContext2D graphics)voidsetLabelOffset(float labelOffset)voidsetMargin(float horizontalMargin, float verticalMargin)voidsetVisible(Widget widget, boolean visible)voidupdate(float deltaTime)Updates this object for the current frame.-
Methods inherited from class nl.colorize.multimedialib.scene.ui.Widget
getLocation, getX, getY, isVisible, setLocation, setVisible
-
-
-
-
Constructor Detail
-
Form
public Form(Location location, WidgetStyle labelStyle, InputDevice input)
-
-
Method Detail
-
add
public void add(TextLabel label)
-
add
public SelectBox add(java.lang.String label, SelectBox selectBox, java.util.function.Consumer<java.lang.String> 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:UpdatableUpdates this object for the current frame.- Parameters:
deltaTime- Elapsed time since the last frame, in seconds.
-
render
public void render(GraphicsContext2D graphics)
-
getStyle
public WidgetStyle getStyle()
-
getWidgets
protected java.util.List<Widget> getWidgets()
-
-