com.mxgraph.reader
Class mxSaxOutputHandler
java.lang.Object
   org.xml.sax.helpers.DefaultHandler
org.xml.sax.helpers.DefaultHandler
       com.mxgraph.reader.mxSaxOutputHandler
com.mxgraph.reader.mxSaxOutputHandler
- All Implemented Interfaces: 
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- public class mxSaxOutputHandler 
- extends DefaultHandler
XMLReader reader = SAXParserFactory.newInstance().newSAXParser()
                        .getXMLReader();
        reader.setContentHandler(new mxSaxExportHandler(
                        new mxGraphicsExportCanvas(g2)));
        reader.parse(new InputSource(new StringReader(xml)));
 
 
 
 
| Methods inherited from class org.xml.sax.helpers.DefaultHandler | 
| characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
canvas
protected mxICanvas2D canvas
handlers
protected transient Map<String,mxSaxOutputHandler.IElementHandler> handlers
mxSaxOutputHandler
public mxSaxOutputHandler(mxICanvas2D canvas)
setCanvas
public void setCanvas(mxICanvas2D value)
- Sets the canvas for rendering.
 
- 
 
getCanvas
public mxICanvas2D getCanvas()
- Returns the canvas for rendering.
 
- 
 
startElement
public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
- 
- Specified by:
- startElementin interface- ContentHandler
- Overrides:
- startElementin class- DefaultHandler
 
- 
- Throws:
- SAXException
 
initHandlers
protected void initHandlers()
- 
 
getValue
protected String getValue(Attributes atts,
                          String name,
                          String defaultValue)
- Returns the given attribute value or an empty string.
 
- 
 
Copyright (c) 2010 Gaudenz Alder. All rights reserved.