net.sf.latexdraw.parsers.svg
Class SVGSVGElement
java.lang.Object
net.sf.latexdraw.parsers.svg.SVGElement
net.sf.latexdraw.parsers.svg.SVGSVGElement
- All Implemented Interfaces:
- java.lang.Cloneable, org.w3c.dom.Element, org.w3c.dom.Node
public class SVGSVGElement
- extends SVGElement
Defines the SVG tag SVG
.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
09/11/07
- Since:
- 0.1
- Version:
- 3.0
- Author:
- Arnaud BLOUIN
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Methods inherited from class net.sf.latexdraw.parsers.svg.SVGElement |
appendChild, cloneNode, compareDocumentPosition, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildNodes, getChildren, getDef, getElementsByTagName, getElementsByTagNameNS, getFeature, getFill, getFirstChild, getFontFamily, getFontSize, getFontStyle, getFontWeight, getId, getLastChild, getLocalName, getNamespaceURI, getNbChildren, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getRootElement, getSchemaTypeInfo, getStroke, getStrokeDasharray, getStrokeLinecap, getStrokeLinejoin, getStrokeMiterlimit, getStrokeWidth, getStylesCSS, getSVGAttribute, getSVGRoot, getTagName, getTextContent, getTransform, getUsablePrefix, getUsablePrefix, getUserData, getWholeTransform, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, lookupPrefixUsable, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributes, setFill, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeName, setNodeValue, setOwnerDocument, setParent, setPrefix, setStroke, setStrokeDashArray, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLevel, setStrokeWidth, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SVGSVGElement
public SVGSVGElement(SVGDocument owner,
org.w3c.dom.Node n)
throws MalformedSVGDocument
- See
SVGElement.SVGElement()
- Parameters:
n
- The node.owner
- The owner document.
- Throws:
MalformedSVGDocument
- If the tag is not valid.
SVGSVGElement
public SVGSVGElement(org.w3c.dom.Node n,
SVGElement e)
throws MalformedSVGDocument
- Parameters:
n
- The source node.e
- Will not be used.
- Throws:
MalformedSVGDocument
- If the document is not valid.
SVGSVGElement
public SVGSVGElement(SVGDocument owner)
- Creates an empty SVG element.
- Parameters:
owner
- The owner document.
- Throws:
java.lang.IllegalArgumentException
- If owner is null.
getMeta
public SVGMetadataElement getMeta()
- Returns:
- the meta element or null.
- Since:
- 0.1
getDefs
public SVGDefsElement getDefs()
- Returns:
- the defs element or null.
- Since:
- 0.1
toString
public java.lang.String toString()
- Overrides:
toString
in class SVGElement
checkAttributes
public boolean checkAttributes()
- Description copied from class:
SVGElement
- Check if the SVG element is valid according to the SVG specification.
- Specified by:
checkAttributes
in class SVGElement
- Returns:
- True if valid.
enableRendering
public boolean enableRendering()
- Description copied from class:
SVGElement
- According to the SVG specification, some attributes may lead to disables rendering of the element (e.g. width=0,
height=0,...). This method checks these conditions depending of the SVG element.
- Specified by:
enableRendering
in class SVGElement
- Returns:
- True if the element can be rendered.
getX
public double getX()
- Returns:
- The value of the X attribute (0 if there it does not exist or it is not a length).
- Since:
- 0.1
getY
public double getY()
- Returns:
- The value of the X attribute (0 if there it does not exist or it is not a length).
- Since:
- 0.1
getWidth
public double getWidth()
- Returns:
- The value of the
width
attribute (0 if there it does not exist or it is not a length). - Since:
- 0.1
getHeight
public double getHeight()
- Returns:
- The value of the
height
attribute (0 if there it does not exist or it is not a length). - Since:
- 0.1
getVersion
public java.lang.String getVersion()
- Returns:
- The version of the SVG document or an empty string if it is not specified.
- Since:
- 0.1