Package pl.AWTGameEngine.components
Class TextRenderer
java.lang.Object
pl.AWTGameEngine.components.base.ObjectComponent
pl.AWTGameEngine.components.base.NetComponent
pl.AWTGameEngine.components.TextRenderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidalign(TextRenderer.HorizontalAlign horizontal) voidalign(TextRenderer.HorizontalAlign horizontal, TextRenderer.VerticalAlign vertical) voidalign(TextRenderer.VerticalAlign vertical) booleanBefore component synchronization, canSynchronize() will be fired.voidMethod is called when net cache should be cleared (e.g. new client connected).getColor()floatgetSize()getText()voidMethod is called while frame is drawing.Object synchronization is handled over a TCP connection to ensure that component will be updated.voidonSynchronizeReceived(String data) Event is fired when synchronization is received in the component.voidvoidvoidsetColor(ColorObject color) voidsetHorizontal(String horizontal) voidsetSize(float size) voidvoidsetVertical(String vertical) Methods inherited from class pl.AWTGameEngine.components.base.NetComponent
onClientConnect, onClientDisconnect, onClientTryToConnect, onNetUpdateMethods inherited from class pl.AWTGameEngine.components.base.ObjectComponent
conflictsWith, getCamera, getComponentAuthor, getComponentDescription, getComponentName, getKeyListener, getMouseListener, getObject, getObjectByName, getRenderEngine, getRequiredClass, getScene, getSceneLoader, getWindow, hasRequiredClass, isDefaultComponent, isGLComponent, isUnique, isWebComponent, on3DRenderRequest, onAddComponent, onAddComponent, onAfterRender, onAfterUpdate, onButtonClick, onCollide, onCollide, onContextMenuClick, onContextMenuOpen, onEverySecond, onGUIUpdate, onKeyType, onKeyType, onMenuBarClick, onMouseClick, onMouseClick, onPhysicsAfterUpdate, onPhysicsPreUpdate, onPhysicsUpdate, onPreRender, onPreUpdate, onRemoveComponent, onSerializationFinish, onTreeValueChange, onTriggerEnter, onTriggerLeave, onUpdate, onUpdateCameraPosition, onUpdateCameraPosition, onUpdateCameraRotation, onUpdatePosition, onUpdatePosition, onUpdateRotation, onUpdateRotation, onUpdateSize, onUpdateSize, onWindowClosing, onWindowMove, onWindowResize
-
Constructor Details
-
TextRenderer
-
-
Method Details
-
onRender
Description copied from class:ObjectComponentMethod is called while frame is drawing.- Overrides:
onRenderin classObjectComponent
-
getText
-
getColorObject
-
getColor
-
getSize
public float getSize() -
getHorizontalAlign
-
getVerticalAlign
-
setText
-
setColor
-
setColor
-
setSize
public void setSize(float size) -
align
-
align
-
align
-
setHorizontal
-
setVertical
-
onWebRenderRequest
- Overrides:
onWebRenderRequestin classObjectComponent
-
onSynchronize
Description copied from class:NetComponentObject synchronization is handled over a TCP connection to ensure that component will be updated.- Overrides:
onSynchronizein classNetComponent- Returns:
- NetBlock
-
onSynchronizeReceived
Description copied from class:NetComponentEvent is fired when synchronization is received in the component.- Overrides:
onSynchronizeReceivedin classNetComponent- Parameters:
data- Data from the NetBlock
-
canSynchronize
public boolean canSynchronize()Description copied from class:NetComponentBefore component synchronization, canSynchronize() will be fired. Here you can check cache, if the component was updated.- Overrides:
canSynchronizein classNetComponent- Returns:
- State if component can be synchronized
-
clearNetCache
public void clearNetCache()Description copied from class:NetComponentMethod is called when net cache should be cleared (e.g. new client connected). You can change here, for example, a boolean which points if the component was updated.- Overrides:
clearNetCachein classNetComponent
-