Class mxGraphViewReader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.mxgraph.reader.mxGraphViewReader
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Direct Known Subclasses:
mxGraphViewImageReader
An abstract converter that renders display XML data onto a canvas.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxICanvasHolds the canvas to be used for rendering the graph.protected booleanSpecifies if labels should be rendered as HTML markup.protected doubleHolds the global scale of the graph. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract mxICanvascreateCanvas(Map<String, Object> attrs) Returns the canvas to be used for rendering.Returns the canvas that is used for rendering the graph.booleanReturns the htmlLabels switch.voidparseElement(String tagName, Map<String, Object> attrs) Parses the given element and paints it onto the canvas.parsePoints(String pts) Parses the list of points into an object-oriented representation.parseState(mxCellState state, boolean edge) Parses the bounds, absolute points and label information from the style of the state into its respective fields and returns the label of the cell.voidsetHtmlLabels(boolean value) Sets the htmlLabels switch.voidstartElement(String uri, String localName, String qName, Attributes atts) Methods inherited from class DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
canvas
Holds the canvas to be used for rendering the graph. -
scale
protected double scaleHolds the global scale of the graph. This is set just before createCanvas is called. -
htmlLabels
protected boolean htmlLabelsSpecifies if labels should be rendered as HTML markup.
-
-
Constructor Details
-
mxGraphViewReader
public mxGraphViewReader()
-
-
Method Details
-
setHtmlLabels
public void setHtmlLabels(boolean value) Sets the htmlLabels switch. -
isHtmlLabels
public boolean isHtmlLabels()Returns the htmlLabels switch. -
createCanvas
-
getCanvas
Returns the canvas that is used for rendering the graph.- Returns:
- Returns the canvas.
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
parseElement
-
parseState
Parses the bounds, absolute points and label information from the style of the state into its respective fields and returns the label of the cell. -
parsePoints
-