public class VML extends DomSurface
Modifier and Type | Class and Description |
---|---|
static interface |
VML.SpritePooling |
static interface |
VML.VmlBundle |
static interface |
VML.VmlCss |
Modifier and Type | Field and Description |
---|---|
protected VML.VmlCss |
css |
protected boolean |
ignoreOptimizations |
protected <any> |
pool |
protected boolean |
poolingEnabled
Flag to cache unused VML elements since they can leak if excessively created and deleted.
|
elements, spriteIds
backgroundSprite, component, container, height, sprites, surfaceElement, width
Constructor and Description |
---|
VML() |
Modifier and Type | Method and Description |
---|---|
void |
deleteSprite(Sprite sprite)
Deletes the given sprite from the surface.
|
void |
draw()
Renders the surface to the DOM as well as any sprites already added.
|
void |
drawIgnoreOptimizations()
Draws the surface ignoring whether or not sprites are dirty.
|
protected PreciseRectangle |
getBBoxText(TextSprite sprite)
Calculates the bounding box of the given text sprite.
|
void |
renderSprite(Sprite sprite)
Renders the given sprite to the DOM.
|
void |
setCursor(Sprite sprite,
String property)
Sets the cursor property for the given sprite.
|
void |
setViewBox(double x,
double y,
double width,
double height)
Sets the view box of the surface.
|
protected static String |
toFixed(double number,
double place)
Returns the given number rounded to the given precision.
|
getElement, setElement, setId
add, addGradient, clear, create, create, getBBox, getComponent, getHeight, getSprites, getSurfaceElement, getWidth, renderAll, setBackground, setHeight, setWidth
protected boolean ignoreOptimizations
protected VML.VmlCss css
protected boolean poolingEnabled
<set-property name="gxt.vml.enableSpritePooling" value="true" />
This protected field can also be configured programmatically, but must be set before any sprites are added to the
surface (including before any axis/series/legend is added to a chart, and before it is attached).protected <any> pool
protected static String toFixed(double number, double place)
number
- the number to be roundedplace
- the decimal placepublic void deleteSprite(Sprite sprite)
Surface
deleteSprite
in class DomSurface
sprite
- the sprite to be deletedpublic void draw()
Surface
public void drawIgnoreOptimizations()
public void renderSprite(Sprite sprite)
Surface
renderSprite
in class Surface
sprite
- the sprite to be renderedpublic void setCursor(Sprite sprite, String property)
Surface
public void setViewBox(double x, double y, double width, double height)
Surface
setViewBox
in class Surface
x
- the x coordinate of the viewboxy
- the y coordinate of the viewboxwidth
- the width of the viewboxheight
- the height of the viewboxprotected PreciseRectangle getBBoxText(TextSprite sprite)
Surface
getBBoxText
in class Surface
sprite
- the text sprite to be used in the calculationCopyright © 2018. All rights reserved.