Package com.prineside.tdi2.scene2d.ui
Class TextArea
java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.Group
com.prineside.tdi2.scene2d.ui.WidgetGroup
com.prineside.tdi2.scene2d.ui.TextField
com.prineside.tdi2.scene2d.ui.TextArea
- All Implemented Interfaces:
Cullable
,Disableable
,Layout
A text input field with multiple lines.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Input listener for the text areaNested classes/interfaces inherited from class com.prineside.tdi2.scene2d.ui.TextField
TextField.ContextMenu, TextField.DefaultOnscreenKeyboard, TextField.OnscreenKeyboard, TextField.TextFieldClickListener, TextField.TextFieldFilter, TextField.TextFieldListener, TextField.TextFieldStyle
-
Field Summary
FieldsFields inherited from class com.prineside.tdi2.scene2d.ui.TextField
keyRepeatInitialTime, keyRepeatTime, replaceTabsWithSpaces, writeEnters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
float
float
int
int
getLines()
Returns total number of lines that the text occupiesint
float
void
int
letterUnderCursor
(float x) void
moveCursorLine
(int line) Moves the cursor to the given number lineboolean
Returns if there's a new line at then end of the textvoid
setPrefRows
(float prefRows) Sets the preferred number of rows (lines) for this text area.void
setSelection
(int selectionStart, int selectionEnd) Sets the selected text.void
setStyle
(TextField.TextFieldStyle style) Methods inherited from class com.prineside.tdi2.scene2d.ui.TextField
appendText, clearSelection, copy, cut, draw, getAlignment, getCursorPosition, getDefaultInputListener, getFocusTraversal, getMaxLength, getMessageText, getOnscreenKeyboard, getPrefWidth, getProgrammaticChangeEvents, getSelection, getSelectionStart, getStyle, getText, getTextFieldFilter, isDisabled, isPasswordMode, next, selectAll, setAlignment, setBlinkTime, setClipboard, setCursorPosition, setDisabled, setFocusTraversal, setMaxLength, setMessageText, setOnlyFontChars, setOnscreenKeyboard, setPasswordCharacter, setPasswordMode, setProgrammaticChangeEvents, setText, setTextFieldFilter, setTextFieldListener, updateContextMenu
Methods inherited from class com.prineside.tdi2.scene2d.ui.WidgetGroup
getMaxHeight, getMaxHeightValue, getMaxWidth, getMaxWidthValue, getMinHeight, getMinHeightValue, getMinWidth, getMinWidthValue, getPrefHeightValue, getPrefWidthValue, hit, invalidate, invalidateHierarchy, layout, needsLayout, pack, setFillParent, setLayoutEnabled, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPrefHeight, setPrefHeight, setPrefWidth, setPrefWidth, setWidth, validate
Methods inherited from class com.prineside.tdi2.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, clearChildren, debugAll, drawDebug, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString
Methods inherited from class com.prineside.tdi2.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Field Details
-
prefSizeDependsOnContents
public boolean prefSizeDependsOnContents
-
-
Constructor Details
-
TextArea
-
-
Method Details
-
letterUnderCursor
public int letterUnderCursor(float x) - Overrides:
letterUnderCursor
in classTextField
-
setStyle
-
setPrefRows
public void setPrefRows(float prefRows) Sets the preferred number of rows (lines) for this text area. Used to calculate preferred height -
getPrefHeight
public float getPrefHeight()- Specified by:
getPrefHeight
in interfaceLayout
- Overrides:
getPrefHeight
in classTextField
-
getLines
public int getLines()Returns total number of lines that the text occupies -
newLineAtEnd
public boolean newLineAtEnd()Returns if there's a new line at then end of the text -
moveCursorLine
public void moveCursorLine(int line) Moves the cursor to the given number line -
getSelectionBoundingBox
- Overrides:
getSelectionBoundingBox
in classTextField
-
setSelection
public void setSelection(int selectionStart, int selectionEnd) Description copied from class:TextField
Sets the selected text.- Overrides:
setSelection
in classTextField
-
getCursorLine
public int getCursorLine() -
getFirstLineShowing
public int getFirstLineShowing() -
getLinesShowing
public int getLinesShowing() -
getCursorX
public float getCursorX()- Overrides:
getCursorX
in classTextField
-
getCursorY
public float getCursorY()- Overrides:
getCursorY
in classTextField
-