| Modifier and Type | Field and Description | 
|---|---|
| static com.badlogic.gdx.graphics.Color | COLOR_BLACKA blending-safe black  Colorvalue | 
| static com.badlogic.gdx.graphics.Color | COLOR_WHITEA blending-safe white  Colorvalue | 
| protected LabelRenderNode | renderNode | 
deferredLayout, deferredRender, deferredUpdate, effects, height, styleId, visibility, width, x, y, zIndex| Constructor and Description | 
|---|
| Label()Constructor. | 
| Label(float x,
     float y,
     float width,
     float height)Constructor | 
| Label(java.lang.String id)Constructor | 
| Label(java.lang.String id,
     float x,
     float y,
     float width,
     float height)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | attach(ParentRenderNode<?,?> parentRenderNode)Attaches a  RenderNodefor this element to a parentRenderNode | 
| void | detach(ParentRenderNode<?,?> parentRenderNode)Detaches this element's  RenderNodefrom a parentRenderNode | 
| com.badlogic.gdx.graphics.Color | getColor()Returns the  Colorof the label | 
| HorizontalAlignment | getHorizontalAlignment()Returns the  HorizontalAlignmentof the text | 
| int | getRenderHeight()Returns the height this element is currently rendering at | 
| int | getRenderWidth()Returns the width this element is currently rendering at | 
| int | getRenderX()Returns X coordinate of where this element is currently rendering | 
| int | getRenderY()Returns Y coordinate of where this element is currently rendering | 
| StyleRule | getStyleRule() | 
| java.lang.String | getText()Returns the current text of the label | 
| TextAnimation | getTextAnimation()Returns the current  TextAnimationof the label | 
| void | invokeBeginHover()Triggers the begin hover event | 
| void | invokeEndHover()Triggers the end hover event | 
| boolean | isInitialLayoutOccurred() | 
| boolean | isInitialUpdateOccurred() | 
| boolean | isRenderNodeDirty() | 
| boolean | isResponsive()Returns if this label should fill its available space | 
| void | setColor(com.badlogic.gdx.graphics.Color color)Sets the  Colorof the label | 
| void | setHorizontalAlignment(HorizontalAlignment horizontalAlignment)Sets the  HorizontalAlignmentof the text | 
| void | setRenderNodeDirty() | 
| void | setResponsive(boolean responsive)Sets if this label should fill its available space | 
| void | setStyleId(java.lang.String styleId)Sets the style if for this  UiElement | 
| void | setText(java.lang.String text)Sets the current text of the label | 
| void | setTextAnimation(TextAnimation textAnimation)Sets the current  TextAnimationof the label | 
| void | setVisibility(Visibility visibility)Sets the current  Visibilityof thisUiElement | 
| void | setZIndex(int zIndex)Sets the Z index of this  UiElement. | 
| void | shrinkToTextSize() | 
| void | shrinkToTextSize(float maxWidth) | 
| void | syncWithUpdate(UiContainerRenderTree rootNode)Syncs data between the  UiElementandRenderNodeduring update | 
addEffectListener, addHoverListener, addNodeStateListener, alignAbove, alignBelow, alignEdgeToEdge, alignLeftOf, alignRightOf, applyEffect, deferUntilLayout, deferUntilLayout, deferUntilRender, deferUntilRender, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, equals, getContentHeight, getContentWidth, getElementById, getHeight, getId, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleId, getVisibility, getWidth, getX, getY, getZIndex, hashCode, isDebugEnabled, isFlexLayout, isInitialised, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, notifyNodeStateListeners, removeEffectListener, removeHoverListener, removeNodeStateListener, set, setContentHeight, setContentWidth, setDebugEnabled, setHeight, setHeightToContentHeightOf, setHeightToHeightOf, setWidth, setWidthToContentWidthOf, setWidthToWidthOf, setX, setXY, setY, snapTo, snapTo, syncWithLayout, syncWithRenderpublic static final com.badlogic.gdx.graphics.Color COLOR_WHITE
Color valuepublic static final com.badlogic.gdx.graphics.Color COLOR_BLACK
Color valueprotected LabelRenderNode renderNode
public Label()
Labelpublic Label(java.lang.String id)
id - The unique ID of the Labelpublic Label(float x,
             float y,
             float width,
             float height)
x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic Label(java.lang.String id,
             float x,
             float y,
             float width,
             float height)
id - The unique ID for this element (if null an ID will be generated)x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic void shrinkToTextSize()
public void shrinkToTextSize(float maxWidth)
public java.lang.String getText()
Stringpublic void setText(java.lang.String text)
text - A non-null Stringpublic void attach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode for this element to a parent
 RenderNodeattach in class UiElementparentRenderNode - The parent RenderNode to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode from a parent
 RenderNodedetach in class UiElementparentRenderNode - The parent RenderNode to detach frompublic void invokeBeginHover()
Hoverablepublic void invokeEndHover()
Hoverablepublic StyleRule getStyleRule()
getStyleRule in class UiElementpublic void setVisibility(Visibility visibility)
UiElementVisibility of this UiElementsetVisibility in class UiElementvisibility - The Visibility to setpublic void syncWithUpdate(UiContainerRenderTree rootNode)
UiElementUiElement and RenderNode during updatesyncWithUpdate in class UiElementpublic void setStyleId(java.lang.String styleId)
UiElementUiElementsetStyleId in class UiElementstyleId - The style id to setpublic void setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
 different Z layers in ascending Z order (negatives values first, positive values last)public HorizontalAlignment getHorizontalAlignment()
HorizontalAlignment of the textHorizontalAlignment.LEFT by defaultpublic void setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
HorizontalAlignment of the texthorizontalAlignment - public boolean isResponsive()
public void setResponsive(boolean responsive)
responsive - False if the width should match the text widthpublic com.badlogic.gdx.graphics.Color getColor()
Color of the labelColor is set by the UiThemepublic void setColor(com.badlogic.gdx.graphics.Color color)
Color of the labelcolor - Null if the Color should be retrieved from the UiThemepublic TextAnimation getTextAnimation()
TextAnimation of the labelpublic void setTextAnimation(TextAnimation textAnimation)
TextAnimation of the labeltextAnimation - Null if no animation is to be playedpublic boolean isRenderNodeDirty()
isRenderNodeDirty in class UiElementpublic void setRenderNodeDirty()
setRenderNodeDirty in class UiElementpublic boolean isInitialLayoutOccurred()
isInitialLayoutOccurred in class UiElementpublic boolean isInitialUpdateOccurred()
isInitialUpdateOccurred in class UiElementpublic int getRenderX()
UiElementgetRenderX in class UiElementInteger.MIN_VALUE if not renderingpublic int getRenderY()
UiElementgetRenderY in class UiElementInteger.MIN_VALUE if not renderingpublic int getRenderWidth()
UiElementgetRenderWidth in class UiElementpublic int getRenderHeight()
UiElementgetRenderHeight in class UiElement