Class TextField
- java.lang.Object
-
- nl.colorize.multimedialib.scene.ui.Widget
-
- nl.colorize.multimedialib.scene.ui.TextField
-
public class TextField extends Widget
Simple text field widget with graphics and interaction entirely managed by the renderer, not using the native widget. Actually entering text is not handled by this class. Instead, it will show a dialog window so that the user can enter text using the platform's native text field.
-
-
Constructor Summary
Constructors Constructor Description TextField(WidgetStyle style, java.lang.String label)TextField(WidgetStyle style, java.lang.String label, java.lang.String initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetValue()voidrender(GraphicsContext2D graphics)voidsetChangeHandler(InputDevice input, java.util.function.Consumer<java.lang.String> onChange)voidupdate(float deltaTime)Updates this object for the current frame.-
Methods inherited from class nl.colorize.multimedialib.scene.ui.Widget
getLocation, getStyle, getX, getY, isVisible, setLocation, setVisible
-
-
-
-
Constructor Detail
-
TextField
public TextField(WidgetStyle style, java.lang.String label, java.lang.String initialValue)
-
TextField
public TextField(WidgetStyle style, java.lang.String label)
-
-
Method Detail
-
setChangeHandler
public void setChangeHandler(InputDevice input, java.util.function.Consumer<java.lang.String> onChange)
-
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)
-
getValue
public java.lang.String getValue()
-
-