public abstract class mxGraphViewReader
extends org.xml.sax.helpers.DefaultHandler
| Modifier and Type | Field and Description |
|---|---|
protected mxICanvas |
canvas
Holds the canvas to be used for rendering the graph.
|
protected boolean |
htmlLabels
Specifies if labels should be rendered as HTML markup.
|
protected double |
scale
Holds the global scale of the graph.
|
| Constructor and Description |
|---|
mxGraphViewReader() |
| Modifier and Type | Method and Description |
|---|---|
abstract mxICanvas |
createCanvas(java.util.Map<java.lang.String,java.lang.Object> attrs)
Returns the canvas to be used for rendering.
|
mxICanvas |
getCanvas()
Returns the canvas that is used for rendering the graph.
|
boolean |
isHtmlLabels()
Returns the htmlLabels switch.
|
void |
parseElement(java.lang.String tagName,
java.util.Map<java.lang.String,java.lang.Object> attrs)
Parses the given element and paints it onto the canvas.
|
static java.util.List<mxPoint> |
parsePoints(java.lang.String pts)
Parses the list of points into an object-oriented representation.
|
java.lang.String |
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.
|
void |
setHtmlLabels(boolean value)
Sets the htmlLabels switch.
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts) |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningprotected mxICanvas canvas
protected double scale
protected boolean htmlLabels
public void setHtmlLabels(boolean value)
public boolean isHtmlLabels()
public abstract mxICanvas createCanvas(java.util.Map<java.lang.String,java.lang.Object> attrs)
attrs - Specifies the attributes of the new canvas.public mxICanvas getCanvas()
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void parseElement(java.lang.String tagName,
java.util.Map<java.lang.String,java.lang.Object> attrs)
tagName - Name of the node to be parsed.attrs - Attributes of the node to be parsed.public java.lang.String parseState(mxCellState state, boolean edge)
public static java.util.List<mxPoint> parsePoints(java.lang.String pts)
pts - String containing a list of points.