public class TextArea extends TextField
TextField| Modifier and Type | Class and Description |
|---|---|
class |
TextArea.TextAreaListener
Input listener for the text area
|
TextField.DefaultOnscreenKeyboard, TextField.OnscreenKeyboard, TextField.TextFieldClickListener, TextField.TextFieldFilter, TextField.TextFieldListener, TextField.TextFieldStylecursor, displayText, ENTER_ANDROID, ENTER_DESKTOP, fontOffset, glyphPositions, hasSelection, keyRepeatInitialTime, keyRepeatTime, layout, selectionStart, text, textHeight, textOffset, writeEnters| Constructor and Description |
|---|
TextArea(java.lang.String text,
Skin skin) |
TextArea(java.lang.String text,
Skin skin,
java.lang.String styleName) |
TextArea(java.lang.String text,
TextField.TextFieldStyle style) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateOffsets() |
protected boolean |
continueCursor(int index,
int offset) |
protected InputListener |
createInputListener() |
protected void |
drawCursor(Drawable cursorPatch,
Batch batch,
BitmapFont font,
float x,
float y) |
protected void |
drawSelection(Drawable selection,
Batch batch,
BitmapFont font,
float x,
float y)
Draws selection rectangle
|
protected void |
drawText(Batch batch,
BitmapFont font,
float x,
float y) |
int |
getCursorLine() |
float |
getCursorX() |
float |
getCursorY() |
int |
getFirstLineShowing() |
int |
getLines()
Returns total number of lines that the text occupies
|
int |
getLinesShowing() |
float |
getPrefHeight() |
protected float |
getTextY(BitmapFont font,
Drawable background) |
protected void |
initialize() |
protected int |
letterUnderCursor(float x) |
protected void |
moveCursor(boolean forward,
boolean jump) |
void |
moveCursorLine(int line)
Moves the cursor to the given number line
|
boolean |
newLineAtEnd()
Returns if there's a new line at then end of the text
|
void |
setPrefRows(float prefRows)
Sets the preferred number of rows (lines) for this text area.
|
void |
setSelection(int selectionStart,
int selectionEnd)
Sets the selected text.
|
protected void |
sizeChanged()
Called when the actor's size has been changed.
|
appendText, clearSelection, copy, cut, draw, getCursorPosition, getDefaultInputListener, getMaxLength, getMessageText, getOnscreenKeyboard, getPrefWidth, getProgrammaticChangeEvents, getSelection, getSelectionStart, getStyle, getText, getTextFieldFilter, isDisabled, isPasswordMode, isWordCharacter, next, selectAll, setAlignment, setBlinkTime, setClipboard, setCursorPosition, setDisabled, setFocusTraversal, setMaxLength, setMessageText, setOnlyFontChars, setOnscreenKeyboard, setPasswordCharacter, setPasswordMode, setProgrammaticChangeEvents, setStyle, setText, setTextFieldFilter, setTextFieldListener, wordUnderCursorgetMaxHeight, getMaxWidth, getMinHeight, getMinWidth, invalidate, invalidateHierarchy, layout, needsLayout, pack, setFillParent, setLayoutEnabled, validateact, addAction, addCaptureListener, addListener, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, 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, hasParent, hit, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toStringpublic TextArea(java.lang.String text,
Skin skin)
public TextArea(java.lang.String text,
Skin skin,
java.lang.String styleName)
public TextArea(java.lang.String text,
TextField.TextFieldStyle style)
protected void initialize()
initialize in class TextFieldprotected int letterUnderCursor(float x)
letterUnderCursor in class TextFieldpublic void setPrefRows(float prefRows)
public float getPrefHeight()
getPrefHeight in interface LayoutgetPrefHeight in class TextFieldpublic int getLines()
public boolean newLineAtEnd()
public void moveCursorLine(int line)
protected void sizeChanged()
ActorsizeChanged in class Widgetprotected float getTextY(BitmapFont font, Drawable background)
protected void drawSelection(Drawable selection, Batch batch, BitmapFont font, float x, float y)
TextFielddrawSelection in class TextFieldprotected void drawText(Batch batch, BitmapFont font, float x, float y)
protected void drawCursor(Drawable cursorPatch, Batch batch, BitmapFont font, float x, float y)
drawCursor in class TextFieldprotected void calculateOffsets()
calculateOffsets in class TextFieldprotected InputListener createInputListener()
createInputListener in class TextFieldpublic void setSelection(int selectionStart,
int selectionEnd)
TextFieldsetSelection in class TextFieldprotected void moveCursor(boolean forward,
boolean jump)
moveCursor in class TextFieldprotected boolean continueCursor(int index,
int offset)
continueCursor in class TextFieldpublic int getCursorLine()
public int getFirstLineShowing()
public int getLinesShowing()
public float getCursorX()
public float getCursorY()