public class mxStencilShape extends mxBasicShape
Modifier and Type | Class and Description |
---|---|
protected class |
mxStencilShape.svgShape |
Modifier and Type | Field and Description |
---|---|
protected Rectangle2D |
boundingBox |
protected AffineTransform |
cachedTransform
Transform cached to save instance created.
|
protected String |
iconPath |
protected String |
name |
protected Node |
root
Reference to the root node of the Dia shape description.
|
protected mxStencilShape.svgShape |
rootShape |
protected GeneralPath |
shapePath |
Constructor and Description |
---|
mxStencilShape() |
mxStencilShape(Document document) |
mxStencilShape(String shapeXml)
Constructs a new stencil for the given Dia shape description.
|
Modifier and Type | Method and Description |
---|---|
mxStencilShape.svgShape |
createElement(Node root)
Forms an internal representation of the specified SVG element and returns
that representation
|
void |
createShape(Node root,
mxStencilShape.svgShape shape) |
Rectangle2D |
getBoundingBox() |
String |
getIconPath() |
String |
getName() |
protected static Map<String,Object> |
getStylenames(String style)
Returns the stylenames in a style of the form stylename[;key=value] or an
empty array if the given style does not contain any stylenames.
|
void |
paintNode(mxGraphics2DCanvas canvas,
mxCellState state,
mxStencilShape.svgShape shape,
double widthRatio,
double heightRatio) |
void |
paintShape(mxGraphics2DCanvas canvas,
mxCellState state) |
void |
setBoundingBox(Rectangle2D boundingBox) |
void |
setIconPath(String iconPath) |
void |
setName(String name) |
protected void |
transformShape(Shape shape,
double transX,
double transY,
double widthRatio,
double heightRatio)
Scales the points composing this shape by the x and y ratios specified
|
configureGraphics, createShape, getFillColor, getGradientBounds, getStrokeColor, hasGradient, hasShadow
protected GeneralPath shapePath
protected Node root
protected mxStencilShape.svgShape rootShape
protected Rectangle2D boundingBox
protected String name
protected String iconPath
protected AffineTransform cachedTransform
public mxStencilShape()
public mxStencilShape(String shapeXml)
public mxStencilShape(Document document)
public void paintShape(mxGraphics2DCanvas canvas, mxCellState state)
paintShape
in interface mxIShape
paintShape
in class mxBasicShape
public void paintNode(mxGraphics2DCanvas canvas, mxCellState state, mxStencilShape.svgShape shape, double widthRatio, double heightRatio)
protected void transformShape(Shape shape, double transX, double transY, double widthRatio, double heightRatio)
shape
- the shape to scaletransX
- the x translationtransY
- the y translationwidthRatio
- the x co-ordinate scaleheightRatio
- the y co-ordinate scalepublic void createShape(Node root, mxStencilShape.svgShape shape)
public mxStencilShape.svgShape createElement(Node root)
root
- the SVG element to representprotected static Map<String,Object> getStylenames(String style)
style
- String of the form stylename[;stylename][;key=value].public String getName()
public void setName(String name)
public String getIconPath()
public void setIconPath(String iconPath)
public Rectangle2D getBoundingBox()
public void setBoundingBox(Rectangle2D boundingBox)
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.