public class Textarea extends Widget
Modifier and Type | Field and Description |
---|---|
static int |
MODE_ONELINE
one line mode
|
static int |
MODE_PASSWORD
password mode
|
SCROLL_DIR_ALL, SCROLL_DIR_BOTTOM, SCROLL_DIR_HORIZONTAL, SCROLL_DIR_LEFT, SCROLL_DIR_NONE, SCROLL_DIR_RIGHT, SCROLL_DIR_TOP, SCROLL_DIR_VERTICAL, SCROLLBAR_MODE_ACTIVE, SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_OFF, SCROLLBAR_MODE_ON, STATE_CHECKED, STATE_DEFAULT, STATE_DISABLED, STATE_SCROLLED
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, objImpl, SIDE_BOTTOM, SIDE_FULL, SIDE_LEFT, SIDE_RIGHT, SIDE_TOP, SIZE_CONTENT, TEXT_DECOR_NONE, TEXT_DECOR_STRIKETHROUGH, TEXT_DECOR_UNDERLINE
Constructor and Description |
---|
Textarea() |
Modifier and Type | Method and Description |
---|---|
void |
addText(String text)
Inserts a text to the current cursor position of the textarea
|
void |
disableMode(int mode)
Disables the mode of the textarea
|
void |
enableMode(int mode)
Enables the mode of the textarea
|
int |
getCursorPos()
Gets the current cursor position of the textarea
|
String |
getText()
Gets the text of the textarea
|
void |
setCursorPos(int pos)
Sets the current cursor position of the textarea
|
void |
setText(String text)
Sets the text of the textarea
|
getContainer
getObjectOfState, getScrollbar, getScrollbarMode, getScrollbarOfState, getScrollBottom, getScrollDirection, getScrollLeft, getScrollRight, getScrollTop, getScrollX, getScrollY, isChecked, isClickable, isDisabled, isFloating, isHidden, isIgnoreLayout, isScrollable, isScrolled, resetAllListeners, scrollToView, scrollToView, scrollToX, scrollToX, scrollToY, scrollToY, setCancelListener, setChecked, setClickable, setClickedListener, setDisabled, setFloating, setHidden, setIgnoreLayout, setReadyListener, setScrollable, setScrollbarMode, setScrollDirection, setScrollListener, setValueChangedListener
enableClipCorner, forceNewTrack, getBackgroundColor, getBorderColor, getBorderWidth, getColumnPadding, getCoordinates, getFlexGrow, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getName, getPadding, getParent, getPropertyBooleanValue, getPropertyIntValue, getRadius, getRowPadding, getShadowColor, getShadowOffsetX, getShadowOffsetY, getShadowWidth, getTextColor, getTextLetterSpace, getTextLineSpace, getTranslateX, getTranslateY, getUserData, getWidth, getX, getY, isClipCornerEnabled, setAlign, setBackgroundColor, setBorderColor, setBorderWidth, setColumnPadding, setFlexGrow, setHeight, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setName, setPadding, setPadding, setParent, setPos, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setRadius, setRecolor, setRowPadding, setShadowColor, setShadowOffsetX, setShadowOffsetY, setShadowWidth, setSize, setTextAlign, setTextColor, setTextDecor, setTextFont, setTextLetterSpace, setTextLineSpace, setTranslateX, setTranslateY, setUserData, setWidth, setX, setY
public static final int MODE_ONELINE
In this mode the height is set automatically to show only one line, line break characters are ignored, and word wrap is disabled.
public static final int MODE_PASSWORD
In this mode the entered characters are converted to bullet character
after some time or when a new character is entered.
public void setText(String text)
text
- new text of the textareapublic String getText()
public void addText(String text)
text
- a string to insertpublic void setCursorPos(int pos)
pos
- new cursor positionpublic int getCursorPos()
public void enableMode(int mode)
mode
- MODE_ONELINE
or MODE_PASSWORD
public void disableMode(int mode)
mode
- MODE_ONELINE
or MODE_PASSWORD