public abstract class ParentUiElement extends UiElement implements FlexUiElement
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.concurrent.atomic.AtomicBoolean | asyncRemoveAll | 
| protected com.badlogic.gdx.utils.Array<UiElement> | children | 
| protected ParentRenderNode<?,?> | renderNode | 
deferredLayout, deferredRender, deferredUpdate, effects, height, styleId, visibility, width, x, y, zIndex| Constructor and Description | 
|---|
| ParentUiElement()Constructor. | 
| ParentUiElement(float x,
               float y,
               float width,
               float height)Constructor | 
| ParentUiElement(java.lang.String id)Constructor | 
| ParentUiElement(java.lang.String id,
               float x,
               float y,
               float width,
               float height)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(int index,
   UiElement element)Inserts a  UiElementat a specific index into thisParentUiElement's child elements | 
| void | add(UiElement element)Adds a  UiElementto thisParentUiElement | 
| void | attach(ParentRenderNode<?,?> parentRenderNode)Attaches a  RenderNodefor this element to a parentRenderNode | 
| protected abstract ParentRenderNode<?,?> | createRenderNode(ParentRenderNode<?,?> parent)Creates the  ParentRenderNodefor thisUiElement | 
| void | detach(ParentRenderNode<?,?> parentRenderNode)Detaches this element's  RenderNodefrom a parentRenderNode | 
| UiElement | get(int index)Returns the child  UiElementat the specified index | 
| UiElement | getChild(int i)Returns the child  UiElement | 
| UiElement | getElementById(java.lang.String id)Searches the UI for a  UiElementwith a given id. | 
| java.lang.String | getFlexLayout()Returns the currently used flex layout | 
| 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 | 
| int | getTotalChildren()Returns the total number of child elements for this element | 
| void | invokeBeginHover()Triggers the begin hover event | 
| void | invokeEndHover()Triggers the end hover event | 
| boolean | isFlexLayout()Returns if this  UiElementis using a flex layout | 
| boolean | isInitialLayoutOccurred() | 
| boolean | isInitialUpdateOccurred() | 
| boolean | isOverflowClipped()Returns if child elements that overflow this element's bounds (e.g. | 
| boolean | isRenderNodeDirty() | 
| UiElement | remove(int index)Removes a child  UiElementat a specific index | 
| boolean | remove(UiElement element)Removes a  UiElementfrom thisParentUiElement | 
| void | removeAll()Removes all children from this  ParentUiElement | 
| void | removeAllAsync()Removes all children safely from a non-OpenGL thread | 
| void | setFlex(float x,
       float y,
       float width,
       float height)Equivalent to  UiElement.set(float, float, float, float)for usage with flex layout | 
| void | setFlexLayout(java.lang.String flexLayout)Sets the current flex layout | 
| void | setHeightFlex(float height)Equivalent to  UiElement.setHeight(float)for usage with flex layout | 
| void | setOverflowClipped(boolean overflowClipped)Sets if child elements that overflow this element's bounds (e.g. | 
| void | setRenderNodeDirty() | 
| void | setStyleId(java.lang.String styleId)Sets the style if for this  UiElement | 
| void | setVisibility(Visibility visibility)Sets the current  Visibilityof thisUiElement | 
| void | setWidthFlex(float width)Equivalent to  UiElement.setWidth(float)for usage with flex layout | 
| void | setXFlex(float x)Equivalent to  UiElement.setX(float)for usage with flex layout | 
| void | setXYFlex(float x,
         float y)Equivalent to  UiElement.setXY(float, float)for usage with flex layout | 
| void | setYFlex(float y)Equivalent to  UiElement.setY(float)for usage with flex layout | 
| void | setZIndex(int zIndex)Sets the Z index of this  UiElement. | 
| void | shrinkToContents(boolean recursive)Shrinks the width and height for this element based on its children | 
| void | shrinkToContents(boolean recursive,
                java.lang.Runnable callback) | 
| 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, getHeight, getId, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleId, getStyleRule, getVisibility, getWidth, getX, getY, getZIndex, hashCode, isDebugEnabled, isInitialised, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, notifyNodeStateListeners, removeEffectListener, removeHoverListener, removeNodeStateListener, set, setContentHeight, setContentWidth, setDebugEnabled, setHeight, setHeightToContentHeightOf, setHeightToHeightOf, setWidth, setWidthToContentWidthOf, setWidthToWidthOf, setX, setXY, setY, snapTo, snapTo, syncWithLayout, syncWithRenderprotected final com.badlogic.gdx.utils.Array<UiElement> children
protected final java.util.concurrent.atomic.AtomicBoolean asyncRemoveAll
protected ParentRenderNode<?,?> renderNode
public ParentUiElement()
ParentUiElementpublic ParentUiElement(java.lang.String id)
id - The unique ID for this ParentUiElementpublic ParentUiElement(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 ParentUiElement(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 elementprotected abstract ParentRenderNode<?,?> createRenderNode(ParentRenderNode<?,?> parent)
ParentRenderNode for this UiElementparent - The parent of this nodeParentRenderNodepublic UiElement get(int index)
UiElement at the specified indexindex - The index of the child elementUiElement instancepublic void add(UiElement element)
UiElement to this ParentUiElementelement - The UiElement to be addedpublic void add(int index,
                UiElement element)
UiElement at a specific index into this
 ParentUiElement 's child elementsindex - The index to insert atelement - The UiElement to be insertedpublic boolean remove(UiElement element)
UiElement from this ParentUiElementelement - The UiElement to be removedParentUiElement contained the
         UiElementpublic UiElement remove(int index)
UiElement at a specific indexindex - The index to remove atUiElement that was removedpublic void removeAll()
ParentUiElementpublic void removeAllAsync()
public UiElement getChild(int i)
UiElementi - The child indexpublic void shrinkToContents(boolean recursive)
public void shrinkToContents(boolean recursive,
                             java.lang.Runnable callback)
public 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()
HoverableinvokeBeginHover in interface Hoverablepublic void invokeEndHover()
HoverableinvokeEndHover in interface Hoverablepublic boolean isOverflowClipped()
public void setOverflowClipped(boolean overflowClipped)
overflowClipped - True if child elements should have their rendering clippedpublic 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 int getTotalChildren()
public java.lang.String getFlexLayout()
FlexUiElementgetFlexLayout in interface FlexUiElementpublic void setFlexLayout(java.lang.String flexLayout)
FlexUiElementsetFlexLayout in interface FlexUiElementflexLayout - see: FlexLayoutRulesetpublic UiElement getElementById(java.lang.String id)
UiElementUiElement with a given id. Warning: This
 can be an expensive operation for complex UIs. It is recommended you
 cache results.getElementById in class UiElementid - The UiElement identifier to search forUiElement with the given idpublic 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 UiElementpublic boolean isFlexLayout()
UiElementUiElement is using a flex layoutisFlexLayout in interface FlexUiElementisFlexLayout in class UiElementpublic void setFlex(float x,
                    float y,
                    float width,
                    float height)
UiElement.set(float, float, float, float) for usage with flex layoutx - The x coordinate (in pixels) relative to its parenty - The y coordinate (in pixels) relative to its parentwidth - The width in pixelsheight - The height in pixelspublic void setXYFlex(float x,
                      float y)
UiElement.setXY(float, float) for usage with flex layoutx - The x coordinate (in pixels) relative to its parenty - The y coordinate (in pixels) relative to its parentpublic void setXFlex(float x)
UiElement.setX(float) for usage with flex layoutx - The x coordinate (in pixels) relative to its parentpublic void setYFlex(float y)
UiElement.setY(float) for usage with flex layouty - The y coordinate (in pixels) relative to its parentpublic void setWidthFlex(float width)
UiElement.setWidth(float) for usage with flex layoutwidth - The width in pixelspublic void setHeightFlex(float height)
UiElement.setHeight(float) for usage with flex layoutheight - The height in pixels