| Modifier and Type | Field and Description |
|---|---|
protected java.util.Queue<UiElement> |
asyncAddQueue |
protected java.util.concurrent.atomic.AtomicBoolean |
asyncRemoveAll |
protected java.util.Queue<UiElement> |
asyncRemoveQueue |
protected java.util.List<UiElement> |
children |
protected ParentRenderNode<?,?> |
renderNode |
| Constructor and Description |
|---|
ParentUiElement()
Constructor.
|
ParentUiElement(java.lang.String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
UiElement element)
Inserts a
UiElement at a specific index into this
ParentUiElement 's child elements |
void |
add(UiElement element)
Adds a
UiElement to this ParentUiElement |
void |
addAsync(UiElement element)
Adds a
UiElement safely from a non-OpenGL thread |
void |
attach(ParentRenderNode<?,?> parentRenderNode)
Attaches a
RenderNode for this element to a parent
RenderNode |
protected abstract ParentRenderNode<?,?> |
createRenderNode(ParentRenderNode<?,?> parent)
Creates the
ParentRenderNode for this UiElement |
void |
detach(ParentRenderNode<?,?> parentRenderNode)
Detaches this element's
RenderNode from a parent
RenderNode |
UiElement |
get(int index)
Returns the child
UiElement at the specified index |
UiElement |
getElementById(java.lang.String id)
Searches the UI for a
UiElement with a given id. |
FlexDirection |
getFlexDirection()
Returns the
FlexDirection of this element |
java.lang.String |
getHorizontalLayout()
Returns the current horizontal layout rules
|
int |
getTotalChildren()
Returns the total number of child elements for this element
|
java.lang.String |
getVerticalLayout()
Returns the current vertical layout rules
|
boolean |
isOverflowClipped()
Returns if child elements that overflow this element's bounds (e.g.
|
UiElement |
remove(int index)
Removes a child
UiElement at a specific index |
boolean |
remove(UiElement element)
Removes a
UiElement from this ParentUiElement |
void |
removeAll()
Removes all children from this
ParentUiElement |
void |
removeAllAsync()
Removes all children safely from a non-OpenGL thread
|
void |
removeAsync(UiElement element)
Removes a
UiElement safely from a non-OpenGL thread |
void |
setFlexDirection(FlexDirection flexDirection)
Sets the
FlexDirection of this element |
void |
setHorizontalLayout(java.lang.String layoutRuleset)
Sets the current horizontal layout rules
|
void |
setOverflowClipped(boolean overflowClipped)
Sets if child elements that overflow this element's bounds (e.g.
|
void |
setStyleId(java.lang.String styleId)
Sets the style if for this
UiElement |
void |
setVerticalLayout(java.lang.String layoutRuleset)
Sets the current vertical layout rules
|
void |
setVisibility(Visibility visibility)
Sets the current
Visibility of this UiElement |
void |
setZIndex(int zIndex)
Sets the Z index of this
UiElement. |
void |
syncWithRenderNode()
Syncs data between the
UiElement and RenderNode |
addEffectListener, addHoverListener, applyEffect, defer, defer, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, processDeferred, removeEffectListener, removeHoverListener, setDebugEnabledprotected final java.util.List<UiElement> children
protected final java.util.Queue<UiElement> asyncAddQueue
protected final java.util.Queue<UiElement> asyncRemoveQueue
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 ParentUiElementprotected 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 void addAsync(UiElement element)
UiElement safely from a non-OpenGL threadelement - The UiElement to be addedpublic boolean remove(UiElement element)
UiElement from this ParentUiElementelement - The UiElement to be removedParentUiElement contained the
UiElementpublic void removeAsync(UiElement element)
UiElement safely from a non-OpenGL threadelement - The UiElement to be removepublic UiElement remove(int index)
UiElement at a specific indexindex - The index to remove atUiElement that was removedpublic void removeAll()
ParentUiElementpublic void removeAllAsync()
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 java.lang.String getHorizontalLayout()
public void setHorizontalLayout(java.lang.String layoutRuleset)
layoutRuleset - public java.lang.String getVerticalLayout()
public void setVerticalLayout(java.lang.String layoutRuleset)
layoutRuleset - public 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 syncWithRenderNode()
UiElementUiElement and RenderNodesyncWithRenderNode 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 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 FlexDirection getFlexDirection()
FlexDirection of this elementFlexDirection - defaults to
FlexDirection.COLUMNpublic void setFlexDirection(FlexDirection flexDirection)
FlexDirection of this elementflexDirection - The FlexDirection to set