org.xml.sax.ContentHandler
, org.xml.sax.DTDHandler
, org.xml.sax.EntityResolver
, org.xml.sax.ErrorHandler
public class mxGraphViewImageReader extends mxGraphViewReader
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
antiAlias |
Specifies if the image should be anti-aliased.
|
protected java.awt.Color |
background |
Specifies the background color.
|
protected int |
border |
Specifies the border which is added to the size of the graph.
|
protected mxRectangle |
clip |
Defines the clip to be drawn.
|
protected boolean |
cropping |
Specifies the border which is added to the size of the graph.
|
canvas, htmlLabels, scale
Constructor | Description |
---|---|
mxGraphViewImageReader() |
Constructs a new reader with a transparent background.
|
mxGraphViewImageReader(java.awt.Color background) |
Constructs a new reader with the given background color.
|
mxGraphViewImageReader(java.awt.Color background,
int border) |
Constructs a new reader with a transparent background.
|
mxGraphViewImageReader(java.awt.Color background,
int border,
boolean antiAlias) |
Constructs a new reader with a transparent background.
|
mxGraphViewImageReader(java.awt.Color background,
int border,
boolean antiAlias,
boolean cropping) |
Constructs a new reader with a transparent background.
|
Modifier and Type | Method | Description |
---|---|---|
static java.awt.image.BufferedImage |
convert(java.lang.String filename,
mxGraphViewImageReader viewReader) |
Creates the image for the given display XML file.
|
static java.awt.image.BufferedImage |
convert(org.xml.sax.InputSource inputSource,
mxGraphViewImageReader viewReader) |
Creates the image for the given display XML input source.
|
mxICanvas |
createCanvas(java.util.Map<java.lang.String,java.lang.Object> attrs) |
Returns the canvas to be used for rendering.
|
protected mxGraphics2DCanvas |
createGraphicsCanvas() |
Hook that creates the graphics canvas.
|
java.awt.Color |
getBackground() |
|
int |
getBorder() |
|
mxRectangle |
getClip() |
|
boolean |
isAntiAlias() |
|
boolean |
isCropping() |
Specifies the optional clipping rectangle.
|
void |
setAntiAlias(boolean antiAlias) |
|
void |
setBackground(java.awt.Color background) |
|
void |
setBorder(int border) |
|
void |
setClip(mxRectangle value) |
|
void |
setCropping(boolean value) |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
getCanvas, isHtmlLabels, parseElement, parsePoints, parseState, setHtmlLabels, startElement
protected java.awt.Color background
protected boolean antiAlias
protected int border
protected boolean cropping
protected mxRectangle clip
public mxGraphViewImageReader()
public mxGraphViewImageReader(java.awt.Color background)
public mxGraphViewImageReader(java.awt.Color background, int border)
public mxGraphViewImageReader(java.awt.Color background, int border, boolean antiAlias)
public mxGraphViewImageReader(java.awt.Color background, int border, boolean antiAlias, boolean cropping)
public java.awt.Color getBackground()
public void setBackground(java.awt.Color background)
public int getBorder()
public void setBorder(int border)
public boolean isAntiAlias()
public void setAntiAlias(boolean antiAlias)
public boolean isCropping()
public void setCropping(boolean value)
public mxRectangle getClip()
public void setClip(mxRectangle value)
public mxICanvas createCanvas(java.util.Map<java.lang.String,java.lang.Object> attrs)
mxGraphViewReader
createCanvas
in class mxGraphViewReader
attrs
- Specifies the attributes of the new canvas.protected mxGraphics2DCanvas createGraphicsCanvas()
public static java.awt.image.BufferedImage convert(java.lang.String filename, mxGraphViewImageReader viewReader) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
filename
- Filename of the display XML file.javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public static java.awt.image.BufferedImage convert(org.xml.sax.InputSource inputSource, mxGraphViewImageReader viewReader) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
inputSource
- Input source that contains the display XML.javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.