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 ColorgetActiveColor()ColorgetBackgroundColor()GUIPanegetPane()StringgetText()voidonRender()In this method the GameObject gets rendered onto the screen (if it has an graphical representation).voidonUpdate()This method gets called every frame before the render method.voidsetCursor(String cursor)voidsetFilter(Set<String> filter)voidsetListener(TextFieldListener listener)voidsetText(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:GameObjectThis method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...- Overrides:
onUpdatein 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:GameObjectIn this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.- Overrides:
onRenderin classGameObject
-
setListener
public void setListener(TextFieldListener listener)
- Parameters:
listener- New listener of the textfield or null to remove listener
-
-