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