public class CSSNode
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CSSNode.MeasureFunction |
| Modifier and Type | Field and Description |
|---|---|
int |
lineIndex |
| Constructor and Description |
|---|
CSSNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildAt(CSSNode child,
int i) |
void |
calculateLayout(CSSLayoutContext layoutContext)
Performs the actual layout and saves the results in
layout |
protected void |
dirty() |
CSSAlign |
getAlignItems()
Get this node's align items, as defined by style.
|
CSSAlign |
getAlignSelf()
Get this node's align items, as defined by style.
|
Spacing |
getBorder()
Get this node's border, as defined by style.
|
CSSNode |
getChildAt(int i) |
int |
getChildCount() |
float |
getFlex()
Get this node's flex, as defined by style.
|
CSSFlexDirection |
getFlexDirection()
Get this node's flex direction, as defined by style.
|
CSSJustify |
getJustifyContent()
Get this node's justify content, as defined by style.
|
CSSDirection |
getLayoutDirection() |
float |
getLayoutHeight() |
float |
getLayoutWidth() |
float |
getLayoutX() |
float |
getLayoutY() |
Spacing |
getMargin()
Get this node's margin, as defined by style + default margin.
|
Spacing |
getPadding()
Get this node's padding, as defined by style + default padding.
|
CSSNode |
getParent() |
float |
getPositionBottom()
Get this node's position bottom, as defined by style.
|
float |
getPositionLeft()
Get this node's position left, as defined by style.
|
float |
getPositionRight()
Get this node's position right, as defined by style.
|
float |
getPositionTop()
Get this node's position top, as defined by style.
|
CSSPositionType |
getPositionType()
Get this node's position type, as defined by style.
|
CSSDirection |
getStyleDirection()
Get this node's direction, as defined in the style.
|
float |
getStyleHeight()
Get this node's height, as defined in the style.
|
float |
getStyleWidth()
Get this node's width, as defined in the style.
|
boolean |
hasNewLayout()
See
LayoutState#HAS_NEW_LAYOUT. |
int |
indexOf(CSSNode child) |
protected boolean |
isDirty()
See
LayoutState#DIRTY. |
boolean |
isMeasureDefined() |
void |
markLayoutSeen()
Tells the node that the current values in
layout have been seen. |
CSSNode |
removeChildAt(int i) |
void |
reset()
Resets this instance to its default state.
|
void |
setAlignItems(CSSAlign alignItems) |
void |
setAlignSelf(CSSAlign alignSelf) |
void |
setBorder(int spacingType,
float border) |
void |
setDefaultPadding(int spacingType,
float padding)
Set a default padding (left/top/right/bottom) for this node.
|
void |
setDirection(CSSDirection direction) |
void |
setFlex(float flex) |
void |
setFlexDirection(CSSFlexDirection flexDirection) |
void |
setJustifyContent(CSSJustify justifyContent) |
void |
setMargin(int spacingType,
float margin) |
void |
setMeasureFunction(CSSNode.MeasureFunction measureFunction) |
void |
setPadding(int spacingType,
float padding) |
void |
setPositionBottom(float positionBottom) |
void |
setPositionLeft(float positionLeft) |
void |
setPositionRight(float positionRight) |
void |
setPositionTop(float positionTop) |
void |
setPositionType(CSSPositionType positionType) |
void |
setStyleHeight(float height) |
void |
setStyleWidth(float width) |
void |
setWrap(CSSWrap flexWrap) |
java.lang.String |
toString() |
protected boolean |
valuesEqual(float f1,
float f2) |
public int getChildCount()
public CSSNode getChildAt(int i)
public void addChildAt(CSSNode child, int i)
public CSSNode removeChildAt(int i)
@Nullable public CSSNode getParent()
public int indexOf(CSSNode child)
public void setMeasureFunction(CSSNode.MeasureFunction measureFunction)
public boolean isMeasureDefined()
public void calculateLayout(CSSLayoutContext layoutContext)
layoutprotected boolean isDirty()
LayoutState#DIRTY.public boolean hasNewLayout()
LayoutState#HAS_NEW_LAYOUT.protected void dirty()
public void markLayoutSeen()
layout have been seen. Subsequent calls
to hasNewLayout() will return false until this node is laid out with new parameters.
You must call this each time the layout is generated if the node has a new layout.public java.lang.String toString()
toString in class java.lang.Objectprotected boolean valuesEqual(float f1,
float f2)
public CSSDirection getStyleDirection()
public void setDirection(CSSDirection direction)
public CSSFlexDirection getFlexDirection()
public void setFlexDirection(CSSFlexDirection flexDirection)
public CSSJustify getJustifyContent()
public void setJustifyContent(CSSJustify justifyContent)
public CSSAlign getAlignItems()
public void setAlignItems(CSSAlign alignItems)
public CSSAlign getAlignSelf()
public void setAlignSelf(CSSAlign alignSelf)
public CSSPositionType getPositionType()
public void setPositionType(CSSPositionType positionType)
public void setWrap(CSSWrap flexWrap)
public float getFlex()
public void setFlex(float flex)
public Spacing getMargin()
public void setMargin(int spacingType,
float margin)
public Spacing getPadding()
public void setPadding(int spacingType,
float padding)
public Spacing getBorder()
public void setBorder(int spacingType,
float border)
public float getPositionTop()
public void setPositionTop(float positionTop)
public float getPositionBottom()
public void setPositionBottom(float positionBottom)
public float getPositionLeft()
public void setPositionLeft(float positionLeft)
public float getPositionRight()
public void setPositionRight(float positionRight)
public float getStyleWidth()
public void setStyleWidth(float width)
public float getStyleHeight()
public void setStyleHeight(float height)
public float getLayoutX()
public float getLayoutY()
public float getLayoutWidth()
public float getLayoutHeight()
public CSSDirection getLayoutDirection()
public void setDefaultPadding(int spacingType,
float padding)
public void reset()
CSSNode instances.