|
mxGraph 1.10.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler com.mxgraph.reader.mxGraphViewReader com.mxgraph.reader.mxGraphViewImageReader
public class mxGraphViewImageReader
A converter that renders display XML data onto a graphics canvas. This reader can only be used to generate images for encoded graph views.
Field Summary | |
---|---|
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. |
Fields inherited from class com.mxgraph.reader.mxGraphViewReader |
---|
canvas, htmlLabels, scale |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class com.mxgraph.reader.mxGraphViewReader |
---|
getCanvas, isHtmlLabels, parseElement, parsePoints, parseState, setHtmlLabels, startElement |
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 |
---|
protected Color background
protected boolean antiAlias
protected int border
protected boolean cropping
protected mxRectangle clip
Constructor Detail |
---|
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)
Method Detail |
---|
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
|
mxGraph 1.10.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |