| java.lang.Object com.sun.perseus.model.ModelNode
All known Subclasses: com.sun.perseus.model.CompositeNode, com.sun.perseus.model.ElementNodeProxy,
ModelNode | abstract public class ModelNode implements EventTarget(Code) | | The central structure manipulated in Perseus is called the Model. It
is used for the in-memory representation of an SVG Tiny document structure.
The ModelNode abstraction represents an atomic node in the
Model 's tree structure.
A ModelNode may have regular children (which can be added on
CompositeNode implementations, for example), and expanded
children (which are automatically computed by the node, for example on
Text or on Use ). In rendering order, expanded
content comes second.
A ModelNode can have a parent, which may be null, but it
always belongs to a DocumentNode instance which is guaranteed to
no be null.
A ModelNode can be painted into a
{com.sun.perseus.j2d.RenderGraphics RenderGraphics}. A ModelNode is subjet to interactivity and its {#nodeHitAt nodeHitAt} method can be used to perform hit detection. version: $Id: ModelNode.java,v 1.24 2006/06/29 10:47:33 ln156897 Exp $ |
Method Summary | |
Box | addBBox(Box bbox, Transform t) Parameters: bbox - the bounding box to which this node's bounding box should beappended. | static Box | addBBox(Box bbox, float x, float y, float width, float height) Implementation helper. | public void | addEventListener(String type, EventListener listener, boolean useCapture) | Box | addNodeBBox(Box bbox, Transform t) Parameters: bbox - the bounding box to which this node's bounding box should beappended. | static Box | addShapeBBox(Box bbox, Path path, Transform t) Implementation helper. | static Box | addTransformedBBox(Box bbox, float x, float y, float width, float height, Transform m) Implementation helper. | protected Transform | appendTransform(Transform tx, Transform workTx) Should be overridden by derived classes to apply any node specific
transform to the input transform.
If the input transform is null and this node does not add any
transform, the return value should be null.
If the input transform is null and this node adds a transform, the
return value should be an object equal to this node's transform,
but not be the same instance.
If the input transform is not null and this node does not add any
transform, the return value should be the same as the input transform.
If the input transform is not null and this node adds a transform,
the return value should be a new (different) transform.
The second parameter, workTxf can be re-used to hold the result
only if it is different from tx. | protected void | clearLastRenderedTile() After calling this method, getLastRenderedTile should always return null. | abstract protected void | clearLayouts() Clears the text layouts, if any exist. | void | clearLayouts(ModelNode node) Clears the text layouts in the input node and all its
siblings. | final void | computeCanRenderDisplayBit(boolean display) Recomputes the display bit in the canRenderState bit mask.
Parameters: display - the display value. | final void | computeCanRenderEmptyPathBit(Path path) Recomputes the empty path bit in the canRenderStaet bit mask.
Parameters: path - the value that determines the bit state. | final void | computeCanRenderEmptyViewBoxBit(float[][] viewBox) Recomputes the empty viewBox bit in the canRenderState
bit mask.
Parameters: viewBox - the viewBox value which drives the empty viewBoxbit. | final void | computeCanRenderFontSizeBit(float fontSize) Recomputes the zero-fontSize bit in the canRenderState bit mask.
Parameters: fontSize - the new fontSize value. | final void | computeCanRenderHeightBit(float height) Recomputes the zero-height bit in the canRenderState bit mask.
Parameters: height - the new height value. | final void | computeCanRenderRequiredExtensionsBit(String[] requiredExtensions) Recomputes the requiredExtensions bit in the canRenderState bit mask.
Parameters: requiredExtensions - if ConditionalProcessing.checkExtensions returns true, the bit is cleared. | final void | computeCanRenderRequiredFeaturesBit(String[] requiredFeatures) Recomputes the requiredFeatures bit in the canRenderState bit mask.
Parameters: requiredFeatures - if ConditionalProcessing.checkFeatures returnstrue, the bit is cleared. | final void | computeCanRenderSystemLanguageBit(String[] systemLanguage) Recomputes the systemLanguage bit in the canRenderState bit mask.
Parameters: systemLanguage - if ConditionalProcessing.checkLanguage returnstrue, the bit is cleared. | final void | computeCanRenderTransformBit(Transform transform) Recomputes the non-invertible transform bit in the canRenderState
bit mask.
Parameters: transform - the transform which drives the non-invertible transform bit. | final void | computeCanRenderWidthBit(float width) Recomputes the zero-width bit in the canRenderState bit mask.
Parameters: width - the new width value. | protected void | computeRenderingTile(Tile tile) Computes this node's rendering tile.
Parameters: tile - the Tile instance whose bounds should be set. | protected boolean | contributeBBox() By default, a node's bounding box is not accounted for. | public void | dispatchEvent(ModelEvent evt) Delegates to the associated EventSupport class. | abstract public ModelNode | getFirstChildNode() | abstract ModelNode | getFirstComputedExpandedChild() Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation. | abstract ModelNode | getFirstExpandedChild() Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation. | protected float | getFloatPropertyState(int propertyIndex) Returns the value for the given float property. | final protected float | getInheritedFloatPropertyState(int propertyIndex) | final protected int | getInheritedPackedPropertyState(int propertyIndex) | final protected Object | getInheritedPropertyState(int propertyIndex) | Transform | getInverseTransformState() this node's cached inverse transform. | abstract public ModelNode | getLastChildNode() | abstract ModelNode | getLastExpandedChild() Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation. | protected Tile | getLastRenderedTile() the tile which encompasses the node's last actual rendering. | public ModelNode | getNextSiblingNode() Returns the next sibling object of this object, or
null if this is the last sibling. | public DocumentNode | getOwnerDocument() Returns the DocumentNode this node is attached
to.
the DocumentNode this node belongs to. | protected int | getPackedPropertyState(int propertyIndex) Returns the value for the given packed property. | boolean | getPaintNeedsLoad() | public ModelNode | getParent() | public ModelNode | getPreviousSiblingNode() Returns the previous sibling object of this object, or
null if this is the first child node and there
is no previous sibling. | protected Object | getPropertyState(int propertyIndex) Returns the value for the given property. | protected Tile | getRenderingTile() the bounding box, in screen coordinate, which encompasses thenode's rendering. | public SVGMatrix | getScreenCTM() | public Transform | getTransformState() this node's cached transform. | protected String | getURIBase() The node's URI base to use to resolve URI references
If a URI base value was set on this node, then that value
is returned. | protected UpdateListener | getUpdateListener() | public boolean | hasDescendants() By default, this node returns true if there are no children.
ModelNode implementations with expanded content
should override this method.
true if this node has, or may have children or expandedchildren. | protected boolean | hasNodeRendering() By default, there is no node rendering. | boolean | inDocumentTree() | protected boolean | isFloatPropertyState(int propertyIndex, float propertyValue) Checks the state of the float property value. | protected boolean | isInDocumentTree() Utilitty method. | final public boolean | isLoaded() true if this node is considered loaded. | protected boolean | isPackedPropertyState(int propertyIndex, int propertyValue) Checks the state of the packed property value. | protected boolean | isPropertyState(int propertyIndex, Object propertyValue) Checks the state of the property value. | protected void | modifiedNode() | protected void | modifyingNode() | protected void | modifyingNodeRendering() | public ModelNode | nodeHitAt(float[] pt) Returns the ModelNode , if any, hit by the
point at coordinate x/y. | final protected ModelNode | nodeHitAt(ModelNode node, float[] pt) Returns the ModelNode , if any, hit by the
point at coordinate x/y, in viewport space. | protected static void | nodeInserted(ModelNode node) | protected void | nodeRendered() To be overridden by nodes which may have a rendering if they need
to do something specific (e.g., notify their RenderingManager) when
they have been rendered. | void | onHookedInDocumentTree() To be overriddent by derived classes, such as TimedElementNode,
if they need to perform special operations when hooked into the
document tree. | void | onUnhookedFromDocumentTree() To be overriddent by derived classes, such as TimedElementNode,
if they need to perform special operations when unhooked from the
document tree. | static void | paint(ModelNode node, RenderGraphics rg) | public void | paint(RenderGraphics rg) Paints this node into the input RenderGraphics . | protected void | propagateCanRenderState(int oldCanRenderState, int newCanRenderState) Called when the canRenderState changes. | protected void | propagateFloatPropertyState(int propertyIndex, float parentPropertyValue) Called when the computed value of the given float property has changed. | protected void | propagatePackedPropertyState(int propertyIndex, int parentPropertyValue) Called when the computed value of the given packed property has changed. | protected void | propagatePropertyState(int propertyIndex, Object parentPropertyValue) Called when the computed value of the given property has changed. | protected void | recomputeFloatPropertyState(int propertyIndex, float parentPropertyValue) Recomputes the given float property's state given the new parent
property. | void | recomputeInheritedProperties() Recomputes all inherited properties and propages the recomputation to
children. | protected void | recomputePackedPropertyState(int propertyIndex, int parentPropertyValue) Recomputes the given packed property's state given the new parent
property. | protected void | recomputePropertyState(int propertyIndex, Object parentPropertyValue) Recomputes the given property's state given the new parent property. | protected void | recomputeTransformState() Recomputes the transform cache, if one exists. | protected void | recomputeTransformState(Transform parentTransform) Recomputes the transform cache, if one exists. | void | recomputeTransformState(Transform parentTransform, ModelNode node) Recomputes the transform cache of the input ModelNode
and all its siblings. | final protected Transform | recycleTransform(Transform tx, Transform workTx) Utility method to recycle a Transform instance when
possible.
Parameters: tx - the Transform to use to initialize the returnedvalue. Parameters: workTx - the candidate Transform instance which may bere-cycled. | public void | removeEventListener(String type, EventListener listener, boolean useCapture) | protected void | setFloatPropertyState(int propertyIndex, float propertyValue) Sets the computed value for the given float property. | public void | setLoaded(boolean isLoaded) | protected void | setPackedPropertyState(int propertyIndex, int propertyValue) Sets the computed value for the given packed property. | protected void | setParent(ModelNode newParent) | protected void | setParentQuiet(ModelNode newParent) Sets this node's parent but does not generate change
events. | protected void | setPropertyState(int propertyIndex, Object propertyValue) Sets the computed value for the given property. | abstract protected void | unhookChildrenQuiet() Utility method. | abstract protected void | unhookExpandedQuiet() Utility method. | final protected void | unhookQuiet(ModelNode node) Utility method. |
CAN_RENDER_CONDITIONS_MET_BITS | final public static int CAN_RENDER_CONDITIONS_MET_BITS(Code) | | Mask for the conditionsMet bits
|
CAN_RENDER_CONDITIONS_MET_MASK | final public static int CAN_RENDER_CONDITIONS_MET_MASK(Code) | | Mask for conditions met, i.e., requiredFeatures, requiredExtensions,
and systemLanguage.
|
CAN_RENDER_DISPLAY_BIT | final public static int CAN_RENDER_DISPLAY_BIT(Code) | | Mask for the display bit
|
CAN_RENDER_DISPLAY_MASK | final public static int CAN_RENDER_DISPLAY_MASK(Code) | | Mask for the display bit
|
CAN_RENDER_EMPTY_PATH_BIT | final public static int CAN_RENDER_EMPTY_PATH_BIT(Code) | | Mask for the empty path bit
|
CAN_RENDER_EMPTY_PATH_MASK | final public static int CAN_RENDER_EMPTY_PATH_MASK(Code) | | Mask for the empty path bit
|
CAN_RENDER_EMPTY_VIEWBOX_BIT | final public static int CAN_RENDER_EMPTY_VIEWBOX_BIT(Code) | | Mask for the empty viewbox bit
|
CAN_RENDER_EMPTY_VIEWBOX_MASK | final public static int CAN_RENDER_EMPTY_VIEWBOX_MASK(Code) | | Mask for the empty viewbox bit
|
CAN_RENDER_IN_DOCUMENT_TREE_BIT | final public static int CAN_RENDER_IN_DOCUMENT_TREE_BIT(Code) | | Mask for the in document tree bit
|
CAN_RENDER_IN_DOCUMENT_TREE_MASK | final public static int CAN_RENDER_IN_DOCUMENT_TREE_MASK(Code) | | Mask for the in-document-tree bit
|
CAN_RENDER_NON_INVERTIBLE_TXF_BIT | final public static int CAN_RENDER_NON_INVERTIBLE_TXF_BIT(Code) | | Mask for the non-invertible transform bit
|
CAN_RENDER_NON_INVERTIBLE_TXF_MASK | final public static int CAN_RENDER_NON_INVERTIBLE_TXF_MASK(Code) | | Mask for the non-invertible transform bit
|
CAN_RENDER_PARENT_STATE_BIT | final public static int CAN_RENDER_PARENT_STATE_BIT(Code) | | Mask for the parent cansRenderState bit
|
CAN_RENDER_PARENT_STATE_MASK | final public static int CAN_RENDER_PARENT_STATE_MASK(Code) | | Mask for the paren canRenderState bit
|
CAN_RENDER_PROXY_BITS_MASK | final public static int CAN_RENDER_PROXY_BITS_MASK(Code) | | Mask defining which bits from the canRenderState value are copied over
to newly created proxies. See the description of the canRenderState
bits below.
|
CAN_RENDER_RENDERABLE_BIT | final public static int CAN_RENDER_RENDERABLE_BIT(Code) | | Mask for the renderable bit.
|
CAN_RENDER_RENDERABLE_MASK | final public static int CAN_RENDER_RENDERABLE_MASK(Code) | | Mask for the renderable bit.
|
CAN_RENDER_REQUIRED_EXTENSIONS_BIT | final public static int CAN_RENDER_REQUIRED_EXTENSIONS_BIT(Code) | | Mask for the required extensions bit
|
CAN_RENDER_REQUIRED_EXTENSIONS_MASK | final public static int CAN_RENDER_REQUIRED_EXTENSIONS_MASK(Code) | | Mask for the required extensions bit
|
CAN_RENDER_REQUIRED_FEATURES_BIT | final public static int CAN_RENDER_REQUIRED_FEATURES_BIT(Code) | | Mask for the required features bit
|
CAN_RENDER_REQUIRED_FEATURES_MASK | final public static int CAN_RENDER_REQUIRED_FEATURES_MASK(Code) | | Mask for the required features bit
|
CAN_RENDER_SYSTEM_LANGUAGE_BIT | final public static int CAN_RENDER_SYSTEM_LANGUAGE_BIT(Code) | | Mask for the system language bit
|
CAN_RENDER_SYSTEM_LANGUAGE_MASK | final public static int CAN_RENDER_SYSTEM_LANGUAGE_MASK(Code) | | Mask for the required languages bit
|
CAN_RENDER_ZERO_FONT_SIZE_BIT | final public static int CAN_RENDER_ZERO_FONT_SIZE_BIT(Code) | | Mask for the zero font-size bit
|
CAN_RENDER_ZERO_FONT_SIZE_MASK | final public static int CAN_RENDER_ZERO_FONT_SIZE_MASK(Code) | | Mask for the zero font-size bit
|
CAN_RENDER_ZERO_HEIGHT_BIT | final public static int CAN_RENDER_ZERO_HEIGHT_BIT(Code) | | Mask for the zero-height bit
|
CAN_RENDER_ZERO_HEIGHT_MASK | final public static int CAN_RENDER_ZERO_HEIGHT_MASK(Code) | | Mask for the zero-height bit
|
CAN_RENDER_ZERO_WIDTH_BIT | final public static int CAN_RENDER_ZERO_WIDTH_BIT(Code) | | Mask for the zero-width bit
|
CAN_RENDER_ZERO_WIDTH_MASK | final public static int CAN_RENDER_ZERO_WIDTH_MASK(Code) | | Mask for the zero-width bit
|
IDENTITY | final protected Transform IDENTITY(Code) | | Used in cases the parent node is null.
|
canRenderState | protected int canRenderState(Code) | | Pre-computes whether or not this node can render. This is a bit-mask.
0 : renderable (i.e., initialized in the class constructor). All
classes.
1 : required features. ElementNode
2 : required extensions. ElementNode
3 : required languages. ElementNode.
4 : non-invertible transform. StructureNode, AbstractRenderingNode.
5 : display. CompositeGraphicsNode.
6 : width is zero. Ellipse, ImageNode, Rect, SVG, Viewport
7 : height is zero. Ellipse, ImageNode, Rect, SVG, Viewport
8 : viewBox width or height is zero or negative.
9 : path is null or has no segments. ShapeNode.
10 : font-size is negative or zero. Text.
11 : node in document tree.
12 : parent canRenderState. This 1 bit value is set if any of the bits
in the parent node's canRenderState is set.
Only bits 1/2/3 are special in that they need to be applied from a node
to its proxies. Other bits (e.g., bit 5 (display)) do not need to be
propagated because they are set when the property changes on the node and
there is already propagation of property changes to the proxies.
By default, ModelNodes are not renderable and are not in the document
tree.
|
loaded | protected boolean loaded(Code) | | Used to track if this node is loaded or not. A node becomes loaded after
its markLoaded method is called. Note: the default is
true because when used through scripting, nodes are considered
fully loaded and operational. When used by the builder module or a
parser, the flag needs to be first turned off (see the
setLoaded method to control the progressive rendering
behavior (see the CanvasManager class).
|
addBBox | Box addBBox(Box bbox, Transform t)(Code) | | Parameters: bbox - the bounding box to which this node's bounding box should beappended. That bounding box is in the target coordinate space. It may be null, in which case this node should create a new one. Parameters: t - the transform to apply from the node's coordinate space to thetarget coordinate space. May be null for the identity transform. the node's bounding box in the target coordinate space. |
addBBox | static Box addBBox(Box bbox, float x, float y, float width, float height)(Code) | | Implementation helper. Adds the input rectangle to the input bounding box
rect.
Parameters: bbox - the rectangle to which the new box should be added. Parameters: x - the x-axis origin of the new rect to add Parameters: y - the y-axis origin of the new rect to add Parameters: width - the width of the rect to add Parameters: height - the height of the rect to add a bounding box that encompasses bbox and the (x, y, width, height) rectangle. |
addNodeBBox | Box addNodeBBox(Box bbox, Transform t)(Code) | | Parameters: bbox - the bounding box to which this node's bounding box should beappended. That bounding box is in the target coordinate space. It may be null, in which case this node should create a new one. Parameters: t - the transform from the node coordinate system to the coordinatesystem into which the bounds should be computed. the bounding box of this node, in the target coordinate space, |
addShapeBBox | static Box addShapeBBox(Box bbox, Path path, Transform t)(Code) | | Implementation helper. Adds the input shape's bounding box to the
input bounding box rect. If the shape is null, nothing is added.
Parameters: path - the shape whose bounds, transformed through t, should beadded to bbox. Parameters: t - the transform to the target bounds space. Parameters: bbox - the bounding box to which the shape's bounds should beadded. a rectangle that encompasses bbox and the path's bounding box,after transformation to the target coordinate space. |
addTransformedBBox | static Box addTransformedBBox(Box bbox, float x, float y, float width, float height, Transform m)(Code) | | Implementation helper. Computes the bounding box of the rectangle
transformed by the input matrix.
Parameters: bbox - the bounding box to which this node's bounds should be added. Parameters: x - the rectangle's x-axis origin Parameters: y - the rectangle's y-axis origin Parameters: width - the rectangle's width Parameters: height - the rectangle's height Parameters: m - the matrix transforming to the target coordinate spaceinto which the returned rectangle should be. the matrix from the input rectangle's coordinate space to the target coordinate space. |
appendTransform | protected Transform appendTransform(Transform tx, Transform workTx)(Code) | | Should be overridden by derived classes to apply any node specific
transform to the input transform.
If the input transform is null and this node does not add any
transform, the return value should be null.
If the input transform is null and this node adds a transform, the
return value should be an object equal to this node's transform,
but not be the same instance.
If the input transform is not null and this node does not add any
transform, the return value should be the same as the input transform.
If the input transform is not null and this node adds a transform,
the return value should be a new (different) transform.
The second parameter, workTxf can be re-used to hold the result
only if it is different from tx. If it is referencing the same instance
as tx and a new Transform needs to be created, then it should not
be reused.
IMPL NOTE : This is a coding style to recycle Transform
instances in animation loops.
Parameters: tx - the Transform to apply additional node transforms to. This may be null. Parameters: workTx - a Transform which can be re-used if a new Transform needs to be created and workTxis not the same instance as tx. a transform with this node's transform added. |
clearLastRenderedTile | protected void clearLastRenderedTile()(Code) | | After calling this method, getLastRenderedTile should always return null.
|
clearLayouts | abstract protected void clearLayouts()(Code) | | Clears the text layouts, if any exist. This is typically
called when the font selection has changed and nodes such
as Text should recompute their layouts.
This should recursively call clearLayouts on children
node or expanded content, if any.
|
clearLayouts | void clearLayouts(ModelNode node)(Code) | | Clears the text layouts in the input node and all its
siblings. Implementation helper.
Parameters: node - the first node whose text layouts should be cleared. |
computeCanRenderDisplayBit | final void computeCanRenderDisplayBit(boolean display)(Code) | | Recomputes the display bit in the canRenderState bit mask.
Parameters: display - the display value. If true, the bit is cleared. Iffalse, the bit is set. |
computeCanRenderEmptyPathBit | final void computeCanRenderEmptyPathBit(Path path)(Code) | | Recomputes the empty path bit in the canRenderStaet bit mask.
Parameters: path - the value that determines the bit state. If null orif no segments, the bit is set. Otherwise, the bit is cleared. |
computeCanRenderEmptyViewBoxBit | final void computeCanRenderEmptyViewBoxBit(float[][] viewBox)(Code) | | Recomputes the empty viewBox bit in the canRenderState
bit mask.
Parameters: viewBox - the viewBox value which drives the empty viewBoxbit. If null or if positive width/height, the bit is cleared. Otherwise, the bit is set. |
computeCanRenderFontSizeBit | final void computeCanRenderFontSizeBit(float fontSize)(Code) | | Recomputes the zero-fontSize bit in the canRenderState bit mask.
Parameters: fontSize - the new fontSize value. If zero or negative, the bitis set. Otherwise, the bit is cleared. |
computeCanRenderHeightBit | final void computeCanRenderHeightBit(float height)(Code) | | Recomputes the zero-height bit in the canRenderState bit mask.
Parameters: height - the new height value. If zero or negative, the bitis set. Otherwise, the bit is cleared. |
computeCanRenderRequiredExtensionsBit | final void computeCanRenderRequiredExtensionsBit(String[] requiredExtensions)(Code) | | Recomputes the requiredExtensions bit in the canRenderState bit mask.
Parameters: requiredExtensions - if ConditionalProcessing.checkExtensions returns true, the bit is cleared. Otherwise, the bit is set. |
computeCanRenderRequiredFeaturesBit | final void computeCanRenderRequiredFeaturesBit(String[] requiredFeatures)(Code) | | Recomputes the requiredFeatures bit in the canRenderState bit mask.
Parameters: requiredFeatures - if ConditionalProcessing.checkFeatures returnstrue, the bit is cleared. Otherwise, the bit is set. |
computeCanRenderSystemLanguageBit | final void computeCanRenderSystemLanguageBit(String[] systemLanguage)(Code) | | Recomputes the systemLanguage bit in the canRenderState bit mask.
Parameters: systemLanguage - if ConditionalProcessing.checkLanguage returnstrue, the bit is cleared. Otherwise, the bit is set. |
computeCanRenderTransformBit | final void computeCanRenderTransformBit(Transform transform)(Code) | | Recomputes the non-invertible transform bit in the canRenderState
bit mask.
Parameters: transform - the transform which drives the non-invertible transform bit. If non invertible, the bit is set. Otherwise, the bit is cleared. |
computeCanRenderWidthBit | final void computeCanRenderWidthBit(float width)(Code) | | Recomputes the zero-width bit in the canRenderState bit mask.
Parameters: width - the new width value. If zero or negative, the bitis set. Otherwise, the bit is cleared. |
computeRenderingTile | protected void computeRenderingTile(Tile tile)(Code) | | Computes this node's rendering tile.
Parameters: tile - the Tile instance whose bounds should be set. the device space rendering tile. |
contributeBBox | protected boolean contributeBBox()(Code) | | By default, a node's bounding box is not accounted for. This is
overridden by children classes to specify when and under which condition
their bounding box should be accounted for.
true if the node's bounding box should be accounted for. |
dispatchEvent | public void dispatchEvent(ModelEvent evt)(Code) | | Delegates to the associated EventSupport class.
Parameters: evt - the event to dispatch |
getFirstChildNode | abstract public ModelNode getFirstChildNode()(Code) | | a reference to the node's first child, or null if thereare no children. |
getFirstComputedExpandedChild | abstract ModelNode getFirstComputedExpandedChild()(Code) | | Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation.
a reference to the node's first expanded child, or null if thereare no expanded children. This forces the computation of expandedcontent if needed. |
getFirstExpandedChild | abstract ModelNode getFirstExpandedChild()(Code) | | Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation.
a reference to the node's first expanded child, or null if thereare no expanded children. This forces the computation of expandedcontent if needed. |
getFloatPropertyState | protected float getFloatPropertyState(int propertyIndex)(Code) | | Returns the value for the given float property.
the value of the given property. |
getInheritedFloatPropertyState | final protected float getInheritedFloatPropertyState(int propertyIndex)(Code) | | the inherited value for the requested float property. |
getInheritedPackedPropertyState | final protected int getInheritedPackedPropertyState(int propertyIndex)(Code) | | the inherited value for the requested packed property. |
getInheritedPropertyState | final protected Object getInheritedPropertyState(int propertyIndex)(Code) | | the inherited value for the requested property. |
getInverseTransformState | Transform getInverseTransformState()(Code) | | this node's cached inverse transform. |
getLastChildNode | abstract public ModelNode getLastChildNode()(Code) | | a reference to the node's last child, or null if thereare no children. |
getLastExpandedChild | abstract ModelNode getLastExpandedChild()(Code) | | Some node types (such as ElementNodeProxy ) have
expanded children that they compute in some specific
way depending on the implementation.
a reference to the node's last expanded child, or null if thereare no expanded children. This forces the computation of expandedcontent if needed. |
getLastRenderedTile | protected Tile getLastRenderedTile()(Code) | | the tile which encompasses the node's last actual rendering. Ifthis node's hasRendering method returns false, then this method shouldreturn null. By default, this method returns null becausehasNodeRendering returns null by default. |
getNextSiblingNode | public ModelNode getNextSiblingNode()(Code) | | Returns the next sibling object of this object, or
null if this is the last sibling.
the next sibling object. |
getOwnerDocument | public DocumentNode getOwnerDocument()(Code) | | Returns the DocumentNode this node is attached
to.
the DocumentNode this node belongs to. The returnvalue should never be null. |
getPackedPropertyState | protected int getPackedPropertyState(int propertyIndex)(Code) | | Returns the value for the given packed property.
the value of the given property. |
getPaintNeedsLoad | boolean getPaintNeedsLoad()(Code) | | true if the node needs to be fully loaded before itcan be painted |
getParent | public ModelNode getParent()(Code) | | a reference to the parent ModelNode |
getPreviousSiblingNode | public ModelNode getPreviousSiblingNode()(Code) | | Returns the previous sibling object of this object, or
null if this is the first child node and there
is no previous sibling.
the next sibling object. |
getPropertyState | protected Object getPropertyState(int propertyIndex)(Code) | | Returns the value for the given property.
the value for the given property, null if the property is unknown. |
getRenderingTile | protected Tile getRenderingTile()(Code) | | the bounding box, in screen coordinate, which encompasses thenode's rendering. If this node's hasRendering method returns false, thenthis method should return null. By default, this method returns nullbecause hasNodeRendering returns null by default. |
getTransformState | public Transform getTransformState()(Code) | | this node's cached transform. |
getURIBase | protected String getURIBase()(Code) | | The node's URI base to use to resolve URI references
If a URI base value was set on this node, then that value
is returned. Otherwise, this method returns the parent's
URI base. If there is not URI base on this node and if there
is not parent, then this method returns null.
the node's URI base to use to resolve relative URI references. |
getUpdateListener | protected UpdateListener getUpdateListener()(Code) | | the UpdateListener associated with the nearestDocumentNode ancestor or null if there is noViewporpt ancestor |
hasDescendants | public boolean hasDescendants()(Code) | | By default, this node returns true if there are no children.
ModelNode implementations with expanded content
should override this method.
true if this node has, or may have children or expandedchildren. A node may not know in advance if it has expandedchildren because in some cases, the computation of expandedcontent is done lazily. So this returns false if the nodedoes not have children and will never have expanded content. |
hasNodeRendering | protected boolean hasNodeRendering()(Code) | | By default, there is no node rendering.
true if the node has some rendering of its own,i.e., rendering beyond what its children orexpanded content render. |
inDocumentTree | boolean inDocumentTree()(Code) | | true if this node is hooked to the document tree, i.e., if it topmost ancestor is the DocumentNode. |
isFloatPropertyState | protected boolean isFloatPropertyState(int propertyIndex, float propertyValue)(Code) | | Checks the state of the float property value.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
isInDocumentTree | protected boolean isInDocumentTree()(Code) | | Utilitty method. Returns true if the input node is part of the
Document tree, i.e., if its top most ancestor is equal to its
ownerDocument.
true if this node is a DocumentNode or if one of its ancestors is a DocumentNode |
isLoaded | final public boolean isLoaded()(Code) | | true if this node is considered loaded. This is usedin support of progressive rendering. |
isPackedPropertyState | protected boolean isPackedPropertyState(int propertyIndex, int propertyValue)(Code) | | Checks the state of the packed property value.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
isPropertyState | protected boolean isPropertyState(int propertyIndex, Object propertyValue)(Code) | | Checks the state of the property value.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
modifiedNode | protected void modifiedNode()(Code) | | Used to notify the UpdateListener , if any, of
a completed node modification
|
modifyingNode | protected void modifyingNode()(Code) | | Used to notify the UpdateListener , if any, of
an upcoming node modification
|
modifyingNodeRendering | protected void modifyingNodeRendering()(Code) | | Used to notify the UpdateListener , if any, of
an change in a node's rendering
|
nodeHitAt | public ModelNode nodeHitAt(float[] pt)(Code) | | Returns the ModelNode , if any, hit by the
point at coordinate x/y.
Parameters: pt - the x/y coordinate. Should never be null and beof size two. If not, the behavior is unspecified.The coordinates are in viewport space. the ModelNode hit at the given point or nullif none was hit. |
nodeHitAt | final protected ModelNode nodeHitAt(ModelNode node, float[] pt)(Code) | | Returns the ModelNode , if any, hit by the
point at coordinate x/y, in viewport space. The input
node, and all its siblings, are tested.
Parameters: node - the first node on the set of nodes to test. Parameters: pt - the point which is hit the node hit at the given coordinate, or null ifno node was hit. |
nodeInserted | protected static void nodeInserted(ModelNode node)(Code) | | Used to notify the UpdateListener , if any, of
a node insertion
Parameters: node - the node which was just inserted |
nodeRendered | protected void nodeRendered()(Code) | | To be overridden by nodes which may have a rendering if they need
to do something specific (e.g., notify their RenderingManager) when
they have been rendered.
|
onHookedInDocumentTree | void onHookedInDocumentTree()(Code) | | To be overriddent by derived classes, such as TimedElementNode,
if they need to perform special operations when hooked into the
document tree.
|
onUnhookedFromDocumentTree | void onUnhookedFromDocumentTree()(Code) | | To be overriddent by derived classes, such as TimedElementNode,
if they need to perform special operations when unhooked from the
document tree.
|
paint | static void paint(ModelNode node, RenderGraphics rg)(Code) | | Paints the input node and all its siblings into the
RenderGraphics
Parameters: node - the ModelNode to paint. Parameters: rg - the RenderGraphics where the nodes should be painted |
paint | public void paint(RenderGraphics rg)(Code) | | Paints this node into the input RenderGraphics .
Parameters: rg - the RenderGraphics where the node should paint itself |
propagateCanRenderState | protected void propagateCanRenderState(int oldCanRenderState, int newCanRenderState)(Code) | | Called when the canRenderState changes. If both values are zero, or
if both values are non zero, then children need to recompute their
canRenderState and propagate if need be.
Parameters: oldCanRenderState - the old value for canRenderState. Parameters: newCanRenderState - the new value for canRenderState |
propagateFloatPropertyState | protected void propagateFloatPropertyState(int propertyIndex, float parentPropertyValue)(Code) | | Called when the computed value of the given float property has changed.
By default, propagate both to regular content and expanded content.
Parameters: propertyIndex - index for the property whose value has changed. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
propagatePackedPropertyState | protected void propagatePackedPropertyState(int propertyIndex, int parentPropertyValue)(Code) | | Called when the computed value of the given packed property has changed.
By default, propagate both to regular content and expanded content.
Parameters: propertyIndex - index for the property whose value has changed. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
propagatePropertyState | protected void propagatePropertyState(int propertyIndex, Object parentPropertyValue)(Code) | | Called when the computed value of the given property has changed.
By default, propagate both to regular content and expanded content.
Parameters: propertyIndex - index for the property whose value has changed. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
recomputeFloatPropertyState | protected void recomputeFloatPropertyState(int propertyIndex, float parentPropertyValue)(Code) | | Recomputes the given float property's state given the new parent
property. By default, this simply propagates to children.
Parameters: propertyIndex - index for the property whose value is changing. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
recomputeInheritedProperties | void recomputeInheritedProperties()(Code) | | Recomputes all inherited properties and propages the recomputation to
children.
|
recomputePackedPropertyState | protected void recomputePackedPropertyState(int propertyIndex, int parentPropertyValue)(Code) | | Recomputes the given packed property's state given the new parent
property. By default, this simply propagates to children.
Parameters: propertyIndex - index for the property whose value is changing. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
recomputePropertyState | protected void recomputePropertyState(int propertyIndex, Object parentPropertyValue)(Code) | | Recomputes the given property's state given the new parent property.
By default, this simply propagates to children.
Parameters: propertyIndex - index for the property whose value is changing. Parameters: parentPropertyValue - the value that children of this node should now inherit. |
recomputeTransformState | protected void recomputeTransformState()(Code) | | Recomputes the transform cache, if one exists. This should recursively
call recomputeTransformState on children node or expanded content, if
any.
By default, because a ModelNode has no transform and no cached transform,
this only does a pass down.
|
recomputeTransformState | protected void recomputeTransformState(Transform parentTransform)(Code) | | Recomputes the transform cache, if one exists. This should recursively
call recomputeTransformState on children node or expanded content, if
any.
By default, because a ModelNode has no transform and no cached transform,
this only does a pass down.
Parameters: parentTransform - the Transform applied to this node's parent. |
recomputeTransformState | void recomputeTransformState(Transform parentTransform, ModelNode node)(Code) | | Recomputes the transform cache of the input ModelNode
and all its siblings. Implementation helper.
Parameters: parentTransform - the parent transform. Parameters: node - first node whose transform cache should be cleared. |
recycleTransform | final protected Transform recycleTransform(Transform tx, Transform workTx)(Code) | | Utility method to recycle a Transform instance when
possible.
Parameters: tx - the Transform to use to initialize the returnedvalue. Parameters: workTx - the candidate Transform instance which may bere-cycled. The instance can be recycled if it is different (i.e., a different reference) from the input base transform tx . |
setFloatPropertyState | protected void setFloatPropertyState(int propertyIndex, float propertyValue)(Code) | | Sets the computed value for the given float property.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
setLoaded | public void setLoaded(boolean isLoaded)(Code) | | Parameters: isLoaded - the new loaded state |
setPackedPropertyState | protected void setPackedPropertyState(int propertyIndex, int propertyValue)(Code) | | Sets the computed value for the given packed property.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
setParent | protected void setParent(ModelNode newParent)(Code) | | Parameters: newParent - this node's new parent |
setParentQuiet | protected void setParentQuiet(ModelNode newParent)(Code) | | Sets this node's parent but does not generate change
events.
Parameters: newParent - the node's new parent node. |
setPropertyState | protected void setPropertyState(int propertyIndex, Object propertyValue)(Code) | | Sets the computed value for the given property.
Parameters: propertyIndex - the property index Parameters: propertyValue - the computed value for the property. |
unhookChildrenQuiet | abstract protected void unhookChildrenQuiet()(Code) | | Utility method. Unhooks the children.
|
unhookExpandedQuiet | abstract protected void unhookExpandedQuiet()(Code) | | Utility method. Unhooks the expanded content.
|
unhookQuiet | final protected void unhookQuiet(ModelNode node)(Code) | | Utility method. Unhooks a node and all its following siblings,
quietly setting the parent and or proxy to null.
Parameters: node - the root of the branch to unhook. |
|
|