public class DefaultInternalNode extends Node implements InternalNode, Cloneable
InternalNode
.Node.Container<T extends Node>, Node.LayoutResult<T>
InternalNode.NestedTreeProps, InternalNode.Outputs
UNSPECIFIED
Modifier | Constructor and Description |
---|---|
protected |
DefaultInternalNode(ComponentContext componentContext) |
protected |
DefaultInternalNode(ComponentContext componentContext,
boolean createDebugComponentsInCtor) |
protected |
DefaultInternalNode(ComponentContext componentContext,
YogaNode yogaNode) |
protected |
DefaultInternalNode(ComponentContext componentContext,
YogaNode yogaNode,
boolean createDebugComponentsInCtor) |
getLayoutParams, getRenderUnit, makeCopy, setLayoutParams, setRenderUnit
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRenderUnit
protected DefaultInternalNode(ComponentContext componentContext)
protected DefaultInternalNode(ComponentContext componentContext, YogaNode yogaNode)
protected DefaultInternalNode(ComponentContext componentContext, boolean createDebugComponentsInCtor)
protected DefaultInternalNode(ComponentContext componentContext, YogaNode yogaNode, boolean createDebugComponentsInCtor)
public void addChildAt(InternalNode child, int index)
addChildAt
in interface InternalNode
public void addComponentNeedingPreviousRenderData(Component component)
addComponentNeedingPreviousRenderData
in interface InternalNode
public void addTransition(Transition transition)
addTransition
in interface InternalNode
public void addWorkingRanges(List<com.facebook.litho.WorkingRangeContainer.Registration> registrations)
addWorkingRanges
in interface InternalNode
public InternalNode alignContent(YogaAlign alignContent)
alignContent
in interface InternalNode
public InternalNode alignItems(YogaAlign alignItems)
alignItems
in interface InternalNode
public void alignSelf(YogaAlign alignSelf)
public void appendComponent(Component component)
appendComponent
in interface InternalNode
public void appendUnresolvedComponent(Component component)
appendUnresolvedComponent
in interface InternalNode
public boolean areCachedMeasuresValid()
areCachedMeasuresValid
in interface InternalNode
public void aspectRatio(float aspectRatio)
public InternalNode background(Drawable background)
background
in interface InternalNode
public InternalNode backgroundColor(int backgroundColor)
backgroundColor
in interface InternalNode
public InternalNode backgroundRes(int resId)
backgroundRes
in interface InternalNode
public InternalNode border(Border border)
border
in interface InternalNode
public void border(Edges width, int[] colors, float[] radii)
border
in interface InternalNode
public void calculateLayout(float width, float height)
calculateLayout
in interface InternalNode
public void calculateLayout()
calculateLayout
in interface InternalNode
public InternalNode child(Component child)
child
in interface InternalNode
public InternalNode child(Component.Builder<?> child)
child
in interface InternalNode
public InternalNode child(InternalNode child)
child
in interface InternalNode
public InternalNode duplicateParentState(boolean duplicateParentState)
duplicateParentState
in interface InternalNode
public void flex(float flex)
public InternalNode flexBasisAuto()
InternalNode
flexBasisAuto
in interface InternalNode
public void flexBasisPercent(float percent)
public void flexBasisPx(int flexBasis)
public InternalNode flexDirection(YogaFlexDirection direction)
flexDirection
in interface InternalNode
public void flexGrow(float flexGrow)
public void flexShrink(float flexShrink)
public InternalNode focusedHandler(EventHandler<FocusedVisibleEvent> focusedHandler)
focusedHandler
in interface InternalNode
public InternalNode foreground(Drawable foreground)
foreground
in interface InternalNode
public InternalNode foregroundColor(int foregroundColor)
foregroundColor
in interface InternalNode
public InternalNode foregroundRes(int resId)
foregroundRes
in interface InternalNode
public InternalNode fullImpressionHandler(EventHandler<FullImpressionVisibleEvent> fullImpressionHandler)
fullImpressionHandler
in interface InternalNode
public int[] getBorderColors()
getBorderColors
in interface InternalNode
public PathEffect getBorderPathEffect()
getBorderPathEffect
in interface InternalNode
public float[] getBorderRadius()
getBorderRadius
in interface InternalNode
public int getChildrenCount()
getChildrenCount
in interface Node.LayoutResult
public InternalNode getChildAt(int index)
getChildAt
in interface DiffNode
getChildAt
in interface InternalNode
getChildAt
in interface Node.LayoutResult
public int getXForChildAtIndex(int index)
getXForChildAtIndex
in interface Node.LayoutResult
public int getYForChildAtIndex(int index)
getYForChildAtIndex
in interface Node.LayoutResult
public int getHeightSpec()
getHeightSpec
in interface Node.LayoutResult
public int getWidthSpec()
getWidthSpec
in interface Node.LayoutResult
public int getChildCount()
getChildCount
in interface DiffNode
getChildCount
in interface InternalNode
public Object getLayoutData()
getLayoutData
in interface Node.LayoutResult
public Node.LayoutResult calculateLayout(RenderState.LayoutContext context, int widthSpec, int heightSpec)
Node
calculateLayout
in class Node
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 int getChildIndex(InternalNode child)
getChildIndex
in interface InternalNode
public List<Component> getComponents()
getComponents
in interface InternalNode
public List<Component> getUnresolvedComponents()
getUnresolvedComponents
in interface InternalNode
public ArrayList<Component> getComponentsNeedingPreviousRenderData()
getComponentsNeedingPreviousRenderData
in interface InternalNode
public ComponentContext getContext()
getContext
in interface InternalNode
public DiffNode getDiffNode()
getDiffNode
in interface InternalNode
public void setDiffNode(DiffNode diffNode)
setDiffNode
in interface InternalNode
public EventHandler<FocusedVisibleEvent> getFocusedHandler()
getFocusedHandler
in interface InternalNode
public Drawable getForeground()
getForeground
in interface InternalNode
public EventHandler<FullImpressionVisibleEvent> getFullImpressionHandler()
getFullImpressionHandler
in interface InternalNode
public Component getHeadComponent()
getHeadComponent
in interface InternalNode
public int getImportantForAccessibility()
getImportantForAccessibility
in interface InternalNode
public EventHandler<InvisibleEvent> getInvisibleHandler()
getInvisibleHandler
in interface InternalNode
public int getLastHeightSpec()
getLastHeightSpec
in interface DiffNode
getLastHeightSpec
in interface InternalNode
public void setLastHeightSpec(int heightSpec)
setLastHeightSpec
in interface DiffNode
setLastHeightSpec
in interface InternalNode
public float getLastMeasuredHeight()
Component
returned for the
height. This is used together with InternalNode.getLastHeightSpec()
to implement
measure caching.getLastMeasuredHeight
in interface DiffNode
getLastMeasuredHeight
in interface InternalNode
public void setLastMeasuredHeight(float lastMeasuredHeight)
Component
returned
for the height.setLastMeasuredHeight
in interface DiffNode
setLastMeasuredHeight
in interface InternalNode
public float getLastMeasuredWidth()
Component
returned for the
width. This is used together with InternalNode.getLastWidthSpec()
to implement measure
caching.getLastMeasuredWidth
in interface DiffNode
getLastMeasuredWidth
in interface InternalNode
public void setLastMeasuredWidth(float lastMeasuredWidth)
Component
returned
for the width.setLastMeasuredWidth
in interface DiffNode
setLastMeasuredWidth
in interface InternalNode
public int getLastWidthSpec()
getLastWidthSpec
in interface DiffNode
getLastWidthSpec
in interface InternalNode
public void setLastWidthSpec(int widthSpec)
setLastWidthSpec
in interface DiffNode
setLastWidthSpec
in interface InternalNode
public int getLayoutBorder(YogaEdge edge)
getLayoutBorder
in interface InternalNode
public float getMaxHeight()
getMaxHeight
in interface InternalNode
public float getMaxWidth()
getMaxWidth
in interface InternalNode
public float getMinHeight()
getMinHeight
in interface InternalNode
public float getMinWidth()
getMinWidth
in interface InternalNode
public InternalNode getNestedTree()
getNestedTree
in interface InternalNode
public void setNestedTree(InternalNode nestedTree)
setNestedTree
in interface InternalNode
public InternalNode getNestedTreeHolder()
getNestedTreeHolder
in interface InternalNode
public NodeInfo getNodeInfo()
getNodeInfo
in interface InternalNode
public void setNodeInfo(NodeInfo nodeInfo)
setNodeInfo
in interface InternalNode
public InternalNode.NestedTreeProps getOrCreateNestedTreeProps()
getOrCreateNestedTreeProps
in interface InternalNode
public NodeInfo getOrCreateNodeInfo()
getOrCreateNodeInfo
in interface InternalNode
public InternalNode getParent()
getParent
in interface InternalNode
public TreeProps getPendingTreeProps()
getPendingTreeProps
in interface InternalNode
public Component getTailComponent()
getTailComponent
in interface InternalNode
public void setRootComponent(Component component)
setRootComponent
in interface InternalNode
public StateListAnimator getStateListAnimator()
getStateListAnimator
in interface InternalNode
public int getStateListAnimatorRes()
getStateListAnimatorRes
in interface InternalNode
public YogaDirection getStyleDirection()
getStyleDirection
in interface InternalNode
public float getStyleHeight()
getStyleHeight
in interface InternalNode
public float getStyleWidth()
getStyleWidth
in interface InternalNode
public String getTestKey()
getTestKey
in interface InternalNode
public Edges getTouchExpansion()
getTouchExpansion
in interface InternalNode
public int getTouchExpansionBottom()
getTouchExpansionBottom
in interface InternalNode
public int getTouchExpansionLeft()
getTouchExpansionLeft
in interface InternalNode
public int getTouchExpansionRight()
getTouchExpansionRight
in interface InternalNode
public int getTouchExpansionTop()
getTouchExpansionTop
in interface InternalNode
public String getTransitionKey()
getTransitionKey
in interface InternalNode
public String getTransitionOwnerKey()
getTransitionOwnerKey
in interface InternalNode
public Transition.TransitionKeyType getTransitionKeyType()
getTransitionKeyType
in interface InternalNode
public ArrayList<Transition> getTransitions()
getTransitions
in interface InternalNode
public EventHandler<UnfocusedVisibleEvent> getUnfocusedHandler()
getUnfocusedHandler
in interface InternalNode
public EventHandler<VisibilityChangedEvent> getVisibilityChangedHandler()
getVisibilityChangedHandler
in interface InternalNode
public EventHandler<VisibleEvent> getVisibleHandler()
getVisibleHandler
in interface InternalNode
public float getVisibleHeightRatio()
getVisibleHeightRatio
in interface InternalNode
public float getVisibleWidthRatio()
getVisibleWidthRatio
in interface InternalNode
public ArrayList<com.facebook.litho.WorkingRangeContainer.Registration> getWorkingRangeRegistrations()
getWorkingRangeRegistrations
in interface InternalNode
public YogaNode getYogaNode()
getYogaNode
in interface InternalNode
public boolean hasBorderColor()
hasBorderColor
in interface InternalNode
public boolean hasNestedTree()
hasNestedTree
in interface InternalNode
public boolean hasNewLayout()
hasNewLayout
in interface InternalNode
public boolean hasStateListAnimatorResSet()
hasStateListAnimatorResSet
in interface InternalNode
public boolean hasTouchExpansion()
hasTouchExpansion
in interface InternalNode
public boolean hasTransitionKey()
hasTransitionKey
in interface InternalNode
public boolean hasVisibilityHandlers()
hasVisibilityHandlers
in interface InternalNode
public InternalNode heightAuto()
InternalNode
heightAuto
in interface InternalNode
public void heightPercent(float percent)
public void heightPx(int height)
public InternalNode importantForAccessibility(int importantForAccessibility)
importantForAccessibility
in interface InternalNode
public InternalNode invisibleHandler(EventHandler<InvisibleEvent> invisibleHandler)
invisibleHandler
in interface InternalNode
public boolean isDuplicateParentStateEnabled()
isDuplicateParentStateEnabled
in interface InternalNode
public boolean isForceViewWrapping()
isForceViewWrapping
in interface InternalNode
public boolean isImportantForAccessibilityIsSet()
isImportantForAccessibilityIsSet
in interface InternalNode
public boolean isInitialized()
isInitialized
in interface InternalNode
public boolean isLayoutDirectionInherit()
isLayoutDirectionInherit
in interface InternalNode
public boolean isNestedTreeHolder()
isNestedTreeHolder
in interface InternalNode
Layout.create(ComponentContext, Component, boolean)
.public void isReferenceBaseline(boolean isReferenceBaseline)
public InternalNode justifyContent(YogaJustify justifyContent)
justifyContent
in interface InternalNode
public void layoutDirection(YogaDirection direction)
public void marginAuto(YogaEdge edge)
public void marginPercent(YogaEdge edge, float percent)
public void marginPx(YogaEdge edge, int margin)
public void markIsNestedTreeHolder(TreeProps currentTreeProps)
markIsNestedTreeHolder
in interface InternalNode
public void markLayoutSeen()
markLayoutSeen
in interface InternalNode
public void maxHeightPercent(float percent)
public void maxHeightPx(int maxHeight)
public void maxWidthPercent(float percent)
public void maxWidthPx(int maxWidth)
public void minHeightPercent(float percent)
public void minHeightPx(int minHeight)
public void minWidthPercent(float percent)
public void minWidthPx(int minWidth)
public void paddingPercent(YogaEdge edge, float percent)
public void paddingPx(YogaEdge edge, int padding)
public void positionPercent(YogaEdge edge, float percent)
public void positionPx(YogaEdge edge, int position)
public void positionType(YogaPositionType positionType)
public YogaDirection recursivelyResolveLayoutDirection()
recursivelyResolveLayoutDirection
in interface InternalNode
public void registerDebugComponent(DebugComponent debugComponent)
registerDebugComponent
in interface InternalNode
public InternalNode removeChildAt(int index)
removeChildAt
in interface InternalNode
public void resetResolvedLayoutProperties()
resetResolvedLayoutProperties
in interface InternalNode
public void setBorderWidth(YogaEdge edge, int borderWidth)
setBorderWidth
in interface InternalNode
public void setCachedMeasuresValid(boolean valid)
setCachedMeasuresValid
in interface InternalNode
public void setMeasureFunction(YogaMeasureFunction measureFunction)
setMeasureFunction
in interface InternalNode
public void setStyleHeightFromSpec(int heightSpec)
setStyleHeightFromSpec
in interface InternalNode
public void setStyleWidthFromSpec(int widthSpec)
setStyleWidthFromSpec
in interface InternalNode
public boolean shouldDrawBorders()
shouldDrawBorders
in interface InternalNode
public InternalNode stateListAnimator(StateListAnimator stateListAnimator)
stateListAnimator
in interface InternalNode
public InternalNode stateListAnimatorRes(int resId)
stateListAnimatorRes
in interface InternalNode
public InternalNode testKey(String testKey)
testKey
in interface InternalNode
public InternalNode touchExpansionPx(YogaEdge edge, int touchExpansion)
touchExpansionPx
in interface InternalNode
public InternalNode transitionKey(String key, String ownerKey)
transitionKey
in interface InternalNode
public InternalNode transitionKeyType(Transition.TransitionKeyType type)
transitionKeyType
in interface InternalNode
public InternalNode unfocusedHandler(EventHandler<UnfocusedVisibleEvent> unfocusedHandler)
unfocusedHandler
in interface InternalNode
public void useHeightAsBaseline(boolean useHeightAsBaselineFunction)
public InternalNode visibilityChangedHandler(EventHandler<VisibilityChangedEvent> visibilityChangedHandler)
visibilityChangedHandler
in interface InternalNode
public InternalNode visibleHandler(EventHandler<VisibleEvent> visibleHandler)
visibleHandler
in interface InternalNode
public InternalNode visibleHeightRatio(float visibleHeightRatio)
visibleHeightRatio
in interface InternalNode
public InternalNode visibleWidthRatio(float visibleWidthRatio)
visibleWidthRatio
in interface InternalNode
public InternalNode widthAuto()
widthAuto
in interface InternalNode
public void widthPercent(float percent)
public void widthPx(int width)
public InternalNode wrap(YogaWrap wrap)
wrap
in interface InternalNode
public InternalNode wrapInView()
wrapInView
in interface InternalNode
public int getX()
getX
in interface ComponentLayout
public int getY()
getY
in interface ComponentLayout
public int getWidth()
getWidth
in interface ComponentLayout
getWidth
in interface Node.LayoutResult
public int getHeight()
getHeight
in interface ComponentLayout
getHeight
in interface Node.LayoutResult
public int getPaddingTop()
getPaddingTop
in interface ComponentLayout
getPaddingTop
in interface Node.LayoutResult
public int getPaddingRight()
getPaddingRight
in interface ComponentLayout
getPaddingRight
in interface Node.LayoutResult
public int getPaddingBottom()
getPaddingBottom
in interface ComponentLayout
getPaddingBottom
in interface Node.LayoutResult
public int getPaddingLeft()
getPaddingLeft
in interface ComponentLayout
getPaddingLeft
in interface Node.LayoutResult
public boolean isPaddingSet()
isPaddingSet
in interface ComponentLayout
public Drawable getBackground()
getBackground
in interface ComponentLayout
public YogaDirection getResolvedLayoutDirection()
getResolvedLayoutDirection
in interface ComponentLayout
public void copyInto(InternalNode target)
public void applyAttributes(TypedArray a)
applyAttributes
in interface InternalNode
public void assertContextSpecificStyleNotSet()
assertContextSpecificStyleNotSet
in interface InternalNode
public DefaultInternalNode deepClone()
deepClone
in interface InternalNode
public String getSimpleName()
getSimpleName
in interface InternalNode
public InternalNode reconcile(ComponentContext c, Component next)
InternalNode
reconcile
in interface InternalNode
c
- The new ComponentContext.next
- The new component to reconcile against.protected DefaultInternalNode clone()
public Component getComponent()
getComponent
in interface DiffNode
public void setComponent(Component component)
setComponent
in interface DiffNode
public List<DiffNode> getChildren()
getChildren
in interface DiffNode
public com.facebook.litho.LayoutOutput getContentOutput()
getContentOutput
in interface DiffNode
public void setContentOutput(com.facebook.litho.LayoutOutput content)
setContentOutput
in interface DiffNode
public com.facebook.litho.VisibilityOutput getVisibilityOutput()
getVisibilityOutput
in interface DiffNode
public void setVisibilityOutput(com.facebook.litho.VisibilityOutput visibilityOutput)
setVisibilityOutput
in interface DiffNode
public com.facebook.litho.LayoutOutput getBackgroundOutput()
getBackgroundOutput
in interface DiffNode
public void setBackgroundOutput(com.facebook.litho.LayoutOutput background)
setBackgroundOutput
in interface DiffNode
public com.facebook.litho.LayoutOutput getForegroundOutput()
getForegroundOutput
in interface DiffNode
public void setForegroundOutput(com.facebook.litho.LayoutOutput foreground)
setForegroundOutput
in interface DiffNode
public com.facebook.litho.LayoutOutput getBorderOutput()
getBorderOutput
in interface DiffNode
public void setBorderOutput(com.facebook.litho.LayoutOutput border)
setBorderOutput
in interface DiffNode
public com.facebook.litho.LayoutOutput getHostOutput()
getHostOutput
in interface DiffNode
public void setHostOutput(com.facebook.litho.LayoutOutput host)
setHostOutput
in interface DiffNode
public boolean hasViewOutput()
hasViewOutput
in interface InternalNode
public void markHasViewOutput(boolean hasViewOutput)
markHasViewOutput
in interface InternalNode