Class TextField
- java.lang.Object
-
- de.coreengine.system.GameObject
-
- de.coreengine.system.gameObjects.gui.TextField
-
public class TextField extends GameObject
Class that represents a textfield in the 2d or 3d world- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.system.GameObject
parent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getActiveColor()
Color
getBackgroundColor()
GUIPane
getPane()
String
getText()
void
onRender()
In this method the GameObject gets rendered onto the screen (if it has an graphical representation).void
onUpdate()
This method gets called every frame before the render method.void
setCursor(String cursor)
void
setFilter(Set<String> filter)
void
setListener(TextFieldListener listener)
void
setText(String text)
-
Methods inherited from class de.coreengine.system.GameObject
addActionToPhysicWorld, addChild, addRigidBodyToWorld, getScene, onAdd, onInit, onLoad, onPauseUpdate, onRemove, onSave, onSyncronize, removeChild, setShouldRender, setShouldSyncronize, setShouldUpdate
-
-
-
-
Method Detail
-
onUpdate
public void onUpdate()
Description copied from class:GameObject
This method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...- Overrides:
onUpdate
in classGameObject
-
setText
public void setText(String text)
- Parameters:
text
- New text of the text field
-
getActiveColor
public Color getActiveColor()
- Returns:
- Read/Writeablecolor of this textfield when its active
-
getBackgroundColor
public Color getBackgroundColor()
- Returns:
- Read/Writeable color of this textfield when its not active
-
getText
public String getText()
- Returns:
- Current text of the textfield
-
setCursor
public void setCursor(String cursor)
- Parameters:
cursor
- New cursor of the textfield
-
getPane
public GUIPane getPane()
- Returns:
- GUIPane of the text field
-
onRender
public void onRender()
Description copied from class:GameObject
In this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.- Overrides:
onRender
in classGameObject
-
setListener
public void setListener(TextFieldListener listener)
- Parameters:
listener
- New listener of the textfield or null to remove listener
-
-