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() |
CSSNode |
getChildAt(int i) |
int |
getChildCount() |
CSSDirection |
getLayoutDirection() |
float |
getLayoutHeight() |
float |
getLayoutWidth() |
float |
getLayoutX() |
float |
getLayoutY() |
CSSNode |
getParent() |
CSSDirection |
getStyleDirection()
Get this node's direction, as defined in the style.
|
float |
getStyleHeight()
Get this node's height, as defined in the style.
|
Spacing |
getStylePadding()
Get this node's padding, as defined by style + default padding.
|
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 |
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) |
protected <T> boolean |
valuesEqual(T o1,
T o2) |
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)
layout
protected 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.Object
protected boolean valuesEqual(float f1, float f2)
protected <T> boolean valuesEqual(@Nullable T o1, @Nullable T o2)
public void setDirection(CSSDirection direction)
public void setFlexDirection(CSSFlexDirection flexDirection)
public void setJustifyContent(CSSJustify justifyContent)
public void setAlignItems(CSSAlign alignItems)
public void setAlignSelf(CSSAlign alignSelf)
public void setPositionType(CSSPositionType positionType)
public void setWrap(CSSWrap flexWrap)
public void setFlex(float flex)
public void setMargin(int spacingType, float margin)
public void setPadding(int spacingType, float padding)
public void setBorder(int spacingType, float border)
public void setPositionTop(float positionTop)
public void setPositionBottom(float positionBottom)
public void setPositionLeft(float positionLeft)
public void setPositionRight(float positionRight)
public void setStyleWidth(float width)
public void setStyleHeight(float height)
public float getLayoutX()
public float getLayoutY()
public float getLayoutWidth()
public float getLayoutHeight()
public CSSDirection getLayoutDirection()
public Spacing getStylePadding()
public float getStyleWidth()
public float getStyleHeight()
public CSSDirection getStyleDirection()
public void setDefaultPadding(int spacingType, float padding)