FileDocCategorySizeDatePackage
Defs.javaAPI DocphoneME MR2 API (J2ME)3030Wed May 02 18:00:36 BST 2007com.sun.perseus.model

Defs

public class Defs extends StructureNode
Defs are used as placeholders where proxied ModelNode can be stored for reference by ElementNodeProxy instances.
Note that according to the SVG 1.1 DTD, <defs> should be StructureNode. However, we should not apply GraphicsNode and TextNode properties on <defs> as it is useless: <defs> content is never rendered directly, so properties set on defs are _never_ inherited by <defs> children. Therefore, having defs support graphics and text properties is an oversight in the SVG Tiny specification. Note: There is a JDTS test failure when defs extends ElementNode instead of StructureNode. This is caused by the fact that in that case it breaks an inheritance chain from a child to defs's parent.
version
$Id: Defs.java,v 1.3 2006/04/21 06:36:16 st125089 Exp $

Fields Summary
Constructors Summary
public Defs(DocumentNode ownerDocument)
Constructor.

param
ownerDocument this element's owner DocumentNode

        super(ownerDocument);

        // do not render this node
        canRenderState |= CAN_RENDER_RENDERABLE_BIT;
    
Methods Summary
public java.lang.StringgetLocalName()

return
the SVGConstants.SVG_DEFS_TAG value

        return SVGConstants.SVG_DEFS_TAG;
    
public ElementNodenewInstance(DocumentNode doc)
Used by DocumentNode to create a new instance from a prototype Defs.

param
doc the DocumentNode for which a new node is should be created.
return
a new DefsNode for the requested document.

        return new Defs(doc);