|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface similar to org.w3c.dom.Document used for SVG XML serialization.
This interface allows the com.nwoods.jgo package to provide methods that manipulate org.w3c.dom.Document objects while not requiring the org.w3c.dom.Document class to be present in order to build com.nwoods.jgo.
Method Summary | |
DomCDATASection |
createCDATASection(java.lang.String s)
|
DomElement |
createElement(java.lang.String s)
Creates an DomElement of the type specified. |
DomElement |
createJGoClassElement(java.lang.String className,
DomElement parent)
Creates an JGoClass DomElement. |
DomText |
createText(java.lang.String s)
Creates a DomText node given the specified string. |
double |
getJGoSVGVersion()
Return the JGo SVG version number associated with this document. |
boolean |
isDisabledDrawing()
Determines if output of SVG visible elements by superclass is currently disabled |
boolean |
isGenerateJGoXML()
Determines if output of JGo XML extensions to SVG is enabled. |
boolean |
isGenerateSVG()
Determines if output of any SVG elements to the generated XML is enabled. |
boolean |
isRegisteredReference(java.lang.Object obj)
Determines whether a reference to a particular object has already been regigistered by registerReferencingNode(). |
boolean |
isSVGTooltips()
Dermines if SVG tooltips along with associated tooltip scripts should be generated. |
boolean |
JGoXMLOutputEnabled()
Compute whether the output of JGo XML extensions is currently allowed. |
void |
registerObject(java.lang.Object obj,
DomElement node)
Register the DomElement associated with an Object. |
void |
registerReferencingNode(DomElement referencingNode,
java.lang.String refName,
java.lang.Object referencedObj)
Register the attribute name and referenced Object associated with a referencing DomElement. |
void |
registerReferencingObject(java.lang.Object obj,
java.lang.String attr,
java.lang.String refTag)
Register the attribute name and referenced identifier associated with a referencing Object. |
void |
registerTag(java.lang.String tag,
java.lang.Object obj)
Register the Object associated with a DomElement id attribute. |
void |
setDisabledDrawing(boolean disable)
Disable the output of any visible SVG elements by superclass. |
void |
setGenerateJGoXML(boolean enable)
Enable the output of JGo XML extensions to SVG. |
void |
setGenerateSVG(boolean enable)
Enable the output of SVG elements to the generated XML. |
void |
setSVGTooltips(boolean enable)
Enable the generation of SVG tooltips along with associated tooltip scripts. |
boolean |
SVGOutputEnabled()
Compute whether the output of SVG elements is currently allowed. |
void |
SVGTraverseChildren(JGoDocument jGoDoc,
DomNode svgNode,
JGoArea parent,
boolean addToDoc)
Traverse the DomNode children of a DomNode. |
Method Detail |
public double getJGoSVGVersion()
public DomElement createJGoClassElement(java.lang.String className, DomElement parent)
Create a JGoClass DomElement with the specified className value for the class attribute and append it as the next child node of the specified parent. Note that the className supplied must be accurate and complete as it will be used to create an object of the correct type when the SVG XML file is read.
className
- the class name JGoObject this JGoClass DomElement representsparent
- the parent <g> to which to append the newly created DomElement that contains the definition of this JGoObject
DefaultDocument.SVGWriteDoc(java.io.OutputStream, com.nwoods.jgo.JGoDocument)
,
com.nwoods.jgo
public DomElement createElement(java.lang.String s)
s
- the name of the element type to instantiate.
DefaultDocument.SVGWriteDoc(java.io.OutputStream, com.nwoods.jgo.JGoDocument)
,
com.nwoods.jgo
public DomText createText(java.lang.String s)
s
- data for the new DomText node.
DefaultDocument.SVGWriteDoc(java.io.OutputStream, com.nwoods.jgo.JGoDocument)
,
com.nwoods.jgo
public DomCDATASection createCDATASection(java.lang.String s)
public void registerObject(java.lang.Object obj, DomElement node)
obj
- the object to register in the map.node
- the DomElement associated with the objDefaultDocument.SVGReadDoc(java.io.InputStream, com.nwoods.jgo.JGoDocument)
,
registerReferencingNode(com.nwoods.jgo.DomElement, java.lang.String, java.lang.Object)
,
JGoObject.SVGReadObject(com.nwoods.jgo.DomDoc, com.nwoods.jgo.JGoDocument, com.nwoods.jgo.DomElement, com.nwoods.jgo.DomElement)
public void registerReferencingNode(DomElement referencingNode, java.lang.String refName, java.lang.Object referencedObj)
referencingNode
- the DomElement containing a reference to another DomElement.refName
- the name of the reference attribute in the referencing DomElement.referencedObj
- the referenced ObjectDefaultDocument.SVGWriteDoc(java.io.OutputStream, com.nwoods.jgo.JGoDocument)
,
com.nwoods.jgo
public boolean isRegisteredReference(java.lang.Object obj)
DefaultDocument.SVGWriteDoc(java.io.OutputStream, com.nwoods.jgo.JGoDocument)
,
JGoObject.SVGWriteObject(com.nwoods.jgo.DomDoc, com.nwoods.jgo.DomElement)
,
registerReferencingNode(com.nwoods.jgo.DomElement, java.lang.String, java.lang.Object)
public void registerTag(java.lang.String tag, java.lang.Object obj)
tag
- the id attribute to be used as a key value for lookupsobj
- the object associated with this tag id valueDefaultDocument.SVGReadDoc(java.io.InputStream, com.nwoods.jgo.JGoDocument)
,
JGoObject.SVGReadObject(com.nwoods.jgo.DomDoc, com.nwoods.jgo.JGoDocument, com.nwoods.jgo.DomElement, com.nwoods.jgo.DomElement)
,
JGoObject.SVGUpdateReference(java.lang.String, java.lang.Object)
public void registerReferencingObject(java.lang.Object obj, java.lang.String attr, java.lang.String refTag)
obj
- the Object containing a reference to another Object described by a DomElement.attr
- the name of the reference attribute in the referencing DomElement.refTag
- the unique identifier of the referenced Object as specified in the referencing DomElement.DefaultDocument.SVGReadDoc(java.io.InputStream, com.nwoods.jgo.JGoDocument)
,
com.nwoods.jgo
,
com.nwoods.jgo
public void SVGTraverseChildren(JGoDocument jGoDoc, DomNode svgNode, JGoArea parent, boolean addToDoc)
jGoDoc
- the JGoDocument being populated from the SVG XML documentsvgNode
- the DomNode whose children are to be traversedparent
- the JGoArea to which child objects should be added, or nulladdToDoc
- a flag indicating whether objects should be added to the JGoDocumentDefaultDocument.SVGReadDoc(java.io.InputStream, com.nwoods.jgo.JGoDocument)
,
DefaultDocument.SVGReadElement(com.nwoods.jgo.JGoDocument, java.lang.String, com.nwoods.jgo.DomElement, java.lang.String, com.nwoods.jgo.DomElement, com.nwoods.jgo.JGoArea, boolean)
,
com.nwoods.jgo
public void setDisabledDrawing(boolean disable)
disable
- true if SVG output of visible elements is to be disabledpublic boolean isDisabledDrawing()
setDisabledDrawing(boolean)
public void setGenerateJGoXML(boolean enable)
enable
- true if JGo XML extensions to SVG are to be disabledpublic boolean isGenerateJGoXML()
setDisabledDrawing(boolean)
public void setGenerateSVG(boolean enable)
enable
- true if the output of any SVG elements to the generated XML is to be enabledpublic boolean isGenerateSVG()
setDisabledDrawing(boolean)
public void setSVGTooltips(boolean enable)
public boolean isSVGTooltips()
public boolean JGoXMLOutputEnabled()
public boolean SVGOutputEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |