mxSaxOutputHandler (JGraph X 2.1.0.7 API Specification)
Date: 2013-07-31

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mxgraph.reader
Class mxSaxOutputHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          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)));

Nested Class Summary
`protected static interface` | `mxSaxOutputHandler.IElementHandler`

Field Summary
`protected mxICanvas2D` | `canvas`
`protected Map<String,mxSaxOutputHandler.IElementHandler>` | `handlers`

Constructor Summary
`mxSaxOutputHandler(mxICanvas2D canvas)`

Method Summary
`mxICanvas2D` | `getCanvas()` Returns the canvas for rendering.
`protected String` | `getValue(Attributes atts, String name, String defaultValue)` Returns the given attribute value or an empty string.
`protected void` | `initHandlers()`
`void` | `setCanvas(mxICanvas2D value)` Sets the canvas for rendering.
`void` | `startElement(String uri, String localName, String qName, Attributes atts)`

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`

Field Detail

### canvas

    protected mxICanvas2D canvas

### handlers

    protected transient Map<String,mxSaxOutputHandler.IElementHandler> handlers

Constructor Detail

### mxSaxOutputHandler

    public mxSaxOutputHandler(mxICanvas2D canvas)

Method Detail

### 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:
    `startElement` in interface `ContentHandler`
  Overrides:
    `startElement` in 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2010 Gaudenz Alder. All rights reserved.