public abstract class Node extends Object implements Copyable
Modifier and Type | Class and Description |
---|---|
static interface |
Node.Container<T extends Node>
Interface to be implemented by a Node with children.
|
static interface |
Node.LayoutResult<T>
Represents the result of a Layout pass.
|
Constructor and Description |
---|
Node() |
Modifier and Type | Method and Description |
---|---|
abstract Node.LayoutResult |
calculateLayout(RenderState.LayoutContext context,
int widthSpec,
int heightSpec)
Implementations of Node are responsible to calculate a layout based on the width/height
constraints provided.
|
Copyable |
getLayoutParams() |
RenderUnit |
getRenderUnit() |
Node |
makeCopy() |
void |
setLayoutParams(Copyable layoutParams) |
void |
setRenderUnit(RenderUnit content) |
public final RenderUnit getRenderUnit()
public final void setRenderUnit(RenderUnit content)
public abstract Node.LayoutResult calculateLayout(RenderState.LayoutContext context, int widthSpec, int heightSpec)
context
- The LayoutContext associated with this layout calculation RenderState.LayoutContext
widthSpec
- a measure spec for the width in the format of View.MeasureSpec
heightSpec
- a measure spec for the height in the format of View.MeasureSpec
public Copyable getLayoutParams()
public void setLayoutParams(Copyable layoutParams)