Top Fields Constructors Methods
com.sun.javafx.sg.prism

public Class NGGroup

extends NGNode
Class Inheritance
Known Direct Subclasses
com.sun.javafx.sg.prism.NGRegion
Imports
java.util.ArrayList, .Collections, .List, com.sun.javafx.geom.DirtyRegionContainer, .RectBounds, .Rectangle, com.sun.javafx.geom.transform.BaseTransform, .GeneralTransform3D, com.sun.javafx.scene.NodeHelper, com.sun.prism.Graphics, com.sun.scenario.effect.Blend, .Blend.Mode, .FilterContext, .ImageData, com.sun.scenario.effect.impl.prism.PrDrawable, .PrEffectHelper, javafx.scene.Node

Field Summary

Modifier and TypeField and Description
private Blend.Mode
blendMode

The blend mode to use with this group.

private List<NGNode>
private static final int
REGION_INTERSECTS_MASK

This mask has all bits that mark that a region intersects this group.

private List<NGNode>
private List<NGNode>
private final List<NGNode>
viewOrderChildren

The viewOrderChildren is a list children sorted in decreasing viewOrder order if it is not empty.

Inherited from com.sun.javafx.sg.prism.NGNode:
childDirtycontentBoundscullingBitsdirtyDIRTY_CHILDREN_ACCUMULATED_THRESHOLDDIRTY_REGION_CONTAINS_NODE_BOUNDSDIRTY_REGION_CONTAINS_OR_INTERSECTS_NODE_BOUNDSDIRTY_REGION_INTERSECTS_NODE_BOUNDSdirtyBoundsdirtyChildrenAccumulatedTEMP_TRANSFORMtransformedBounds

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(int
-1, or <= node.size()
index
,
NGNode node)

Adds a node to the given index.

public void
public void
public void
clearDirty()

Overrides com.sun.javafx.sg.prism.NGNode.clearDirty.

Clears the dirty flag.

public void
clearFrom(int fromIndex)

protected NGNode.RenderRootResult
computeRenderRoot(NodePath path, RectBounds dirtyRegion, int cullingIndex, BaseTransform tx, GeneralTransform3D pvTx)

Overrides com.sun.javafx.sg.prism.NGNode.computeRenderRoot.

* Culling Related Methods * *

public void
drawDirtyOpts(final BaseTransform tx, final GeneralTransform3D pvTx, Rectangle clipBounds, int[] countBuffer, int dirtyRegionIndex)

Overrides com.sun.javafx.sg.prism.NGNode.drawDirtyOpts.

Helper method draws rectangles indicating the overdraw rectangles.

public List<NGNode>
getChildren()

Gets an unmodifiable list of the current children on this group

private List<NGNode>
public List<NGNode>
protected boolean
protected boolean
hasVisuals()

Overrides com.sun.javafx.sg.prism.NGNode.hasVisuals.

Marks if the node has some visuals and that the bounds change should be taken into account when using the dirty region.

public boolean
protected void
markCullRegions(DirtyRegionContainer drc, int cullingRegionsBitsOfParent, BaseTransform tx, GeneralTransform3D pvTx)

Overrides com.sun.javafx.sg.prism.NGNode.markCullRegions.

Marks placement of the node in dirty region encoded into 2 bit flag: 00 - node outside dirty region 01 - node intersecting dirty region 11 - node completely within dirty region 32 bits = 15 regions max.

protected boolean
needsBlending()

Overrides com.sun.javafx.sg.prism.NGNode.needsBlending.

Return true if this node has a blend mode that requires special processing.

public void
remove(NGNode node)

public void
remove(int index)

protected void
public void
renderForcedContent(Graphics gOptional)

Overrides com.sun.javafx.sg.prism.NGNode.renderForcedContent.

Called on every render pulse for all nodes in case they have render-time operations that must be completed on a pulse, but were not otherwise rendered by the ordinary damage management logic.

public void
setBlendMode(Object
cannot be null
blendMode
)

Set by the FX scene graph.

public void
setViewOrderChildren(List<Node> sortedChildren)

Inherited from com.sun.javafx.sg.prism.NGNode:
accumulateDirtyRegionsaccumulateGroupDirtyRegionaccumulateNodeDirtyRegionapplyClipapplyEffectapplyTransformcheckBoundsInQuadclearPaintedcomputeNodeRenderRootcomputeOpaqueRegioncomputePaddingdoPreCullingdoRendereffectChangedgeometryChangedgetCacheFiltergetClipNodegetClippedBoundsgetCompleteBoundsgetContentBoundsgetEffectgetEffectBoundsgetEffectFiltergetFilterContextgetNamegetNodeBlendModegetOpacitygetOpaqueRegiongetParentgetRenderRootgetTransformhasOpaqueRegioninvalidateCacheinvalidateCacheByTranslationinvalidateOpaqueRegionisCleanisContentBounds2DisDepthTestisOpaqueRegionInvalidisReadbackSupportedisRectClipisShape3DisVisiblemarkDirtymarkTreeDirtymarkTreeDirtyNoIncrementprintDirtyOptsreleaserenderrenderCliprenderEffectrenderForClipsetCachedAsBitmapsetClipNodesetContentBoundssetDepthTestsetEffectsetNamesetNodeBlendModesetOpacitysetParentsetTransformedBoundssetTransformMatrixsetViewOrdersetVisiblesupportsOpaqueRegionstoStringvisualsChanged

Field Detail

blendModeback to summary
private Blend.Mode blendMode

The blend mode to use with this group.

childrenback to summary
private List<NGNode> children
REGION_INTERSECTS_MASKback to summary
private static final int REGION_INTERSECTS_MASK

This mask has all bits that mark that a region intersects this group. Which means it looks like this: 00010101010101010101010101010101 (first bit for sign)

removedback to summary
private List<NGNode> removed
unmodback to summary
private List<NGNode> unmod
viewOrderChildrenback to summary
private final List<NGNode> viewOrderChildren

The viewOrderChildren is a list children sorted in decreasing viewOrder order if it is not empty. Its size should always be equal to children.size(). If viewOrderChildren is empty it implies that the rendering order of the children is the same as the order in the children list.

Constructor Detail

NGGroupback to summary
public NGGroup()

Method Detail

addback to summary
public void add(int index, NGNode node)

Adds a node to the given index. An index of -1 means "append", for legacy reasons (it was easier than asking for the number of children, iirc).

Parameters
index:int

-1, or <= node.size()

addToRemovedback to summary
public void addToRemoved(NGNode n)
clearback to summary
public void clear()
clearDirtyback to summary
public void clearDirty()

Overrides com.sun.javafx.sg.prism.NGNode.clearDirty.

Doc from com.sun.javafx.sg.prism.NGNode.clearDirty.

Clears the dirty flag. This should only happen during rendering.

Annotations
@Override
clearFromback to summary
public void clearFrom(int fromIndex)
computeRenderRootback to summary
protected NGNode.RenderRootResult computeRenderRoot(NodePath path, RectBounds dirtyRegion, int cullingIndex, BaseTransform tx, GeneralTransform3D pvTx)

Overrides com.sun.javafx.sg.prism.NGNode.computeRenderRoot.

* Culling Related Methods * *

Annotations
@Override
drawDirtyOptsback to summary
public void drawDirtyOpts(final BaseTransform tx, final GeneralTransform3D pvTx, Rectangle clipBounds, int[] countBuffer, int dirtyRegionIndex)

Overrides com.sun.javafx.sg.prism.NGNode.drawDirtyOpts.

Doc from com.sun.javafx.sg.prism.NGNode.drawDirtyOpts.

Helper method draws rectangles indicating the overdraw rectangles.

Annotations
@Override
getChildrenback to summary
public List<NGNode> getChildren()

Gets an unmodifiable list of the current children on this group

getOrderedChildrenback to summary
private List<NGNode> getOrderedChildren()
getRemovedChildrenback to summary
public List<NGNode> getRemovedChildren()
hasOverlappingContentsback to summary
protected boolean hasOverlappingContents()

Implements abstract com.sun.javafx.sg.prism.NGNode.hasOverlappingContents.

Annotations
@Override
hasVisualsback to summary
protected boolean hasVisuals()

Overrides com.sun.javafx.sg.prism.NGNode.hasVisuals.

Doc from com.sun.javafx.sg.prism.NGNode.hasVisuals.

Marks if the node has some visuals and that the bounds change should be taken into account when using the dirty region. This will be false for NGGroup (but not for NGRegion)

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()
markCullRegionsback to summary
protected void markCullRegions(DirtyRegionContainer drc, int cullingRegionsBitsOfParent, BaseTransform tx, GeneralTransform3D pvTx)

Overrides com.sun.javafx.sg.prism.NGNode.markCullRegions.

Doc from com.sun.javafx.sg.prism.NGNode.markCullRegions.

Marks placement of the node in dirty region encoded into 2 bit flag: 00 - node outside dirty region 01 - node intersecting dirty region 11 - node completely within dirty region 32 bits = 15 regions max. * 2 bit each. The first two bits are not used because we have a special use case for -1, so they should only be set if in that case.

Annotations
@Override
needsBlendingback to summary
protected boolean needsBlending()

Overrides com.sun.javafx.sg.prism.NGNode.needsBlending.

Doc from com.sun.javafx.sg.prism.NGNode.needsBlending.

Return true if this node has a blend mode that requires special processing. Regular nodes can handle null or SRC_OVER just by rendering into the existing buffer. Groups override this since they must collect their children into a single rendering pass if their mode is explicitly SRC_OVER.

Annotations
@Override
removeback to summary
public void remove(NGNode node)
removeback to summary
public void remove(int index)
renderContentback to summary
protected void renderContent(Graphics g)

Implements abstract com.sun.javafx.sg.prism.NGNode.renderContent.

Annotations
@Override
renderForcedContentback to summary
public void renderForcedContent(Graphics gOptional)

Overrides com.sun.javafx.sg.prism.NGNode.renderForcedContent.

Doc from com.sun.javafx.sg.prism.NGNode.renderForcedContent.

Called on every render pulse for all nodes in case they have render-time operations that must be completed on a pulse, but were not otherwise rendered by the ordinary damage management logic. The graphics argument will be the graphics that was used to render the scene if it is available, but may be null for cases when the scene required no visible updates and thus no back buffer graphics was actually obtained. Implementors must have a backup plan for that case when the Graphics object is null.

Annotations
@Override
setBlendModeback to summary
public void setBlendMode(Object blendMode)

Set by the FX scene graph.

Parameters
blendMode:Object

cannot be null

setViewOrderChildrenback to summary
public void setViewOrderChildren(List<Node> sortedChildren)