Package com.adobe.xfa.svg
Class SVGNode
- java.lang.Object
-
- com.adobe.xfa.Obj
-
- com.adobe.xfa.Node
-
- com.adobe.xfa.Element
-
- com.adobe.xfa.svg.SVGNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContent
-
Nested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTION
-
Fields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefix
-
Fields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
defaultAttribute(int eTag)
Attribute
getAttribute(int eTag, boolean bPeek, boolean bValidate)
Gets this element's attribute whose attribute tag is given.UnitSpan
getMeasurement(int eTag)
Convenience method for getting an attribute that's represented as a measurement valueSVGNode
getRegionGroup(boolean bCheckCaption)
Find the SVG <gesc> element that corresponds to the caption region of the XFA box model.UnitSpan
getSVGHeight()
Get the height of this SVG fragment.UnitSpan
getSVGWidth()
Get the width of this SVG fragment.void
parseTransform(UnitSpan x, UnitSpan y, int r)
Convenience method for getting the offset and rotation out of a transform attribute in the form of transform="translate(x y) rotate(r)".void
storeGlyphs(java.lang.Object oFontInstance, int[] glyphs, int nGlyphs)
Store the Glyphs represented by this node.void
storeText(java.lang.Object oFontInstance, java.lang.String text)
Store the text represented by this node.-
Methods inherited from class com.adobe.xfa.Element
appendChild, appendChild, appendPI, appendPI, assignNode, clone, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAppModel, getAtom, getAttr, getAttribute, getAttributeByName, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getName, getNode, getNodes, getNodeSchema, getNS, getNumAttrs, getOneOfChild, getOneOfChild, getPI, getPI, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getScriptTable, getSibling, getText, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isContainer, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isSpecified, isTransient, isTransparent, isValidAttr, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, newAttribute, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, preSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, serialize, setAttribute, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setDOMProperties, setElement, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setName, setNS, setOneOfChild, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeer
-
Methods inherited from class com.adobe.xfa.Node
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getFirstXMLChildElement, getLocked, getNextXFASibling, getNextXMLSibling, getNextXMLSiblingElement, getNodeAsXML, getOwnerDocument, getPIAsXML, getPIName, getPreviousXMLSibling, getPrivateName, getPropName, getSOMExpression, getSOMExpression, getSomName, getUniqueSOMName, getWillDirty, getXFAChildCount, getXFAParent, getXfaPeer, getXMLChildCount, getXMLParent, hasChanged, isDefault, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, notifyPeers, performSOMAssignment, remove, resolveNode, resolveNode, resolveNode, resolveNodes, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPermsLock, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchema, validateUsage, validateUsageFailedIsFatal
-
Methods inherited from class com.adobe.xfa.Obj
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
-
-
-
-
Method Detail
-
defaultAttribute
public Attribute defaultAttribute(int eTag)
- Overrides:
defaultAttribute
in classElement
- See Also:
Element.getAttribute(int)
-
getAttribute
public Attribute getAttribute(int eTag, boolean bPeek, boolean bValidate)
Description copied from class:Element
Gets this element's attribute whose attribute tag is given.To peek at an attribute, set the peek argument to true. If the attribute is present, it is returned; otherwise null is returned.
To create an attribute, set the peek argument to false. If the attribute is absent, a default attribute is created and returned; for attributes with no default, null is returned.
If validation argument is true, and the validation fails, this method throws.
- Overrides:
getAttribute
in classElement
- Parameters:
eTag
- the tag of the attribute.bPeek
- whether to peek at the attribute or not.bValidate
- whether to validate the attribute or not.- Returns:
- the attribute.
-
getRegionGroup
public SVGNode getRegionGroup(boolean bCheckCaption)
Find the SVG <gesc> element that corresponds to the caption region of the XFA box model. This node is identified by having a <desc> element with the text: "Caption"- Parameters:
bCheckCaption
- if true get the caption node else get content- Returns:
- the caption group. Null object if not found.
-
getMeasurement
public UnitSpan getMeasurement(int eTag)
Convenience method for getting an attribute that's represented as a measurement value- Parameters:
eTag
- - the attribute to get- Returns:
- value - the value of the attribute
-
parseTransform
public void parseTransform(UnitSpan x, UnitSpan y, int r)
Convenience method for getting the offset and rotation out of a transform attribute in the form of transform="translate(x y) rotate(r)". Note that this method does not handle any other transform operations.- Parameters:
x
- the parsed X offsety
- the parsed Y Offsetr
- the rotation angle
-
getSVGWidth
public UnitSpan getSVGWidth()
Get the width of this SVG fragment.- Returns:
- the width attribute from the root
-
getSVGHeight
public UnitSpan getSVGHeight()
Get the height of this SVG fragment.- Returns:
- the hieght attribute from the root
-
storeGlyphs
public void storeGlyphs(java.lang.Object oFontInstance, int[] glyphs, int nGlyphs)
Store the Glyphs represented by this node. This method is used as an optimization. Once an external agent has gone to the trouble of parsing our content, we allow them to store the result. This method is appropriate only if the underlying node is an- Parameters:
oFontInstance
- - the font we resolved toglyphs
- - The array of glyphsnGlyphs
- - the number of glyphs in the array
-
storeText
public void storeText(java.lang.Object oFontInstance, java.lang.String text)
Store the text represented by this node. This method is used as an optimization. Once an external agent has gone to the trouble of parsing our content, we allow them to store the result. This method is appropriate only if the underlying node is an- Parameters:
oFontInstance
- - the font we resolved totext
- - the text to store
-
-