mxICanvasmxGraphics2DCanvas, mxHtmlCanvas, mxSvgCanvas, mxVmlCanvaspublic abstract class mxBasicCanvas extends java.lang.Object implements mxICanvas
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DEFAULT_IMAGEBASEPATH |
Defines the default value for the imageBasePath in all GDI canvases.
|
protected boolean |
drawLabels |
Specifies whether labels should be painted.
|
protected java.lang.String |
imageBasePath |
Defines the base path for images with relative paths.
|
protected java.util.Hashtable<java.lang.String,java.awt.image.BufferedImage> |
imageCache |
Cache for images.
|
static boolean |
PRESERVE_IMAGE_ASPECT |
Specifies if image aspect should be preserved in drawImage.
|
protected double |
scale |
Specifies the current scale.
|
protected mxPoint |
translate |
Specifies the current translation.
|
| Constructor | Description |
|---|---|
mxBasicCanvas() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
flushImageCache() |
|
java.lang.String |
getImageBasePath() |
|
java.lang.String |
getImageForStyle(java.util.Map<java.lang.String,java.lang.Object> style) |
Gets the image path from the given style.
|
double |
getScale() |
Returns the scale.
|
mxPoint |
getTranslate() |
Returns the current translate.
|
boolean |
isDrawLabels() |
|
java.awt.image.BufferedImage |
loadImage(java.lang.String image) |
Returns an image instance for the given URL.
|
void |
setDrawLabels(boolean drawLabels) |
|
void |
setImageBasePath(java.lang.String imageBasePath) |
|
void |
setScale(double scale) |
Sets the scale for the following drawing requests.
|
void |
setTranslate(double dx,
double dy) |
Sets the current translate.
|
public static boolean PRESERVE_IMAGE_ASPECT
public static java.lang.String DEFAULT_IMAGEBASEPATH
protected java.lang.String imageBasePath
protected mxPoint translate
protected double scale
protected boolean drawLabels
protected java.util.Hashtable<java.lang.String,java.awt.image.BufferedImage> imageCache
public void setTranslate(double dx,
double dy)
setTranslate in interface mxICanvaspublic mxPoint getTranslate()
getTranslate in interface mxICanvaspublic void setScale(double scale)
mxICanvaspublic double getScale()
mxICanvaspublic void setDrawLabels(boolean drawLabels)
public java.lang.String getImageBasePath()
public void setImageBasePath(java.lang.String imageBasePath)
public boolean isDrawLabels()
public java.awt.image.BufferedImage loadImage(java.lang.String image)
public void flushImageCache()
public java.lang.String getImageForStyle(java.util.Map<java.lang.String,java.lang.Object> style)
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.