public class Label extends Widget
Modifier and Type | Field and Description |
---|---|
static int |
LONG_TEXT_MODE_CLIP
Simply clip the parts of the text outside the label.
|
static int |
LONG_TEXT_MODE_DOT
Replaces the last 3 characters from bottom right corner of the label with
dots
|
static int |
LONG_TEXT_MODE_SCROLL
If the text is wider than the label scroll it horizontally back and
forth.
|
static int |
LONG_TEXT_MODE_SCROLL_CIRCULAR
If the text is wider than the label scroll it horizontally continuously.
|
static int |
LONG_TEXT_MODE_WRAP
Wrap too long lines
|
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 |
---|
Label() |
Modifier and Type | Method and Description |
---|---|
String |
getText()
Returns the text on the label
|
void |
setLongTextMode(int mode)
Sets the long text mode of the label
|
void |
setText(String text)
Sets the text on the label.
|
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 LONG_TEXT_MODE_WRAP
public static final int LONG_TEXT_MODE_DOT
public static final int LONG_TEXT_MODE_SCROLL
Only one direction is scrolled and horizontal scrolling has higher precedence.
public static final int LONG_TEXT_MODE_SCROLL_CIRCULAR
Only one direction is scrolled and horizontal scrolling has higher precedence.
public static final int LONG_TEXT_MODE_CLIP
public void setText(String text)
'\n' can be used to make a line break.
text
- a stringpublic String getText()
public void setLongTextMode(int mode)
mode
- long text modeLONG_TEXT_MODE_WRAP
or LONG_TEXT_MODE_DOT
or
LONG_TEXT_MODE_SCROLL
or
LONG_TEXT_MODE_SCROLL_CIRCULAR
or
LONG_TEXT_MODE_CLIP