mxLabel

Extends mxShape to implement an image shape with a label.  This shape is registered under mxConstants.SHAPE_LABEL in mxCellRenderer.

Summary
mxLabelExtends mxShape to implement an image shape with a label.
Functions
mxLabelConstructs a new label shape.
Variables
vmlNodesAdds local references to mxShape.vmlNodes.
imageSizeDefault width and height for the image.
spacingDefault value for spacing.
indicatorSizeDefault width and height for the indicicator.
indicatorSpacingDefault spacing between image and indicator.
opaqueVmlImagesSpecifies if all VML images should be rendered without transparency, that is, if the current opacity should be ignored for images.
Functions
initInitializes the shape and adds it to the container.
reconfigureReconfigures this shape.
createHtmlCreates and returns the HTML node to represent this shape.
createVmlCreates and returns the VML node to represent this shape.
createVmlImageCreates an image node for the given image src and opacity to be used in VML.
createSvgCreates and returns the SVG node to represent this shape.
redrawOverrides redraw to define a unified implementation for redrawing all supported dialects.

Functions

mxLabel

function mxLabel(bounds,
fill,
stroke,
strokewidth)

Constructs a new label shape.

Parameters

boundsmxRectangle that defines the bounds.  This is stored in mxShape.bounds.
fillString that defines the fill color.  This is stored in <fill>.
strokeString that defines the stroke color.  This is stored in <stroke>.
strokewidthOptional integer that defines the stroke width.  Default is 1.  This is stored in <strokewidth>.

Variables

vmlNodes

mxLabel.prototype.vmlNodes

Adds local references to mxShape.vmlNodes.

imageSize

mxLabel.prototype.imageSize

Default width and height for the image.  Default is mxConstants.DEFAULT_IMAGESIZE.

spacing

mxLabel.prototype.spacing

Default value for spacing.  Default is 2.

indicatorSize

mxLabel.prototype.indicatorSize

Default width and height for the indicicator.  Default is 10.

indicatorSpacing

mxLabel.prototype.indicatorSpacing

Default spacing between image and indicator.  Default is 2.

opaqueVmlImages

mxLabel.prototype.opaqueVmlImages

Specifies if all VML images should be rendered without transparency, that is, if the current opacity should be ignored for images.  Default is false.

Functions

init

mxLabel.prototype.init = function(container)

Initializes the shape and adds it to the container.  This function is overridden so that the node is already in the DOM when the indicator is added.  This is required to access the ownerSVGelement of the container in the init function of the indicator.

reconfigure

mxLabel.prototype.reconfigure = function()

Reconfigures this shape.  This will update the colors of the indicator and reconfigure it if required.

createHtml

mxLabel.prototype.createHtml = function()

Creates and returns the HTML node to represent this shape.

createVml

mxLabel.prototype.createVml = function()

Creates and returns the VML node to represent this shape.

createVmlImage

mxLabel.prototype.createVmlImage = function(src,
opacity)

Creates an image node for the given image src and opacity to be used in VML.

createSvg

mxLabel.prototype.createSvg = function()

Creates and returns the SVG node to represent this shape.

redraw

mxLabel.prototype.redraw = function()

Overrides redraw to define a unified implementation for redrawing all supported dialects.

Base class for all shapes.
function mxLabel(bounds,
fill,
stroke,
strokewidth)
Constructs a new label shape.
mxLabel.prototype.vmlNodes
Adds local references to mxShape.vmlNodes.
mxShape.prototype.vmlNodes
Array if VML node names to fix in IE8 standards mode.
mxLabel.prototype.imageSize
Default width and height for the image.
mxLabel.prototype.spacing
Default value for spacing.
mxLabel.prototype.indicatorSize
Default width and height for the indicicator.
mxLabel.prototype.indicatorSpacing
Default spacing between image and indicator.
mxLabel.prototype.opaqueVmlImages
Specifies if all VML images should be rendered without transparency, that is, if the current opacity should be ignored for images.
mxLabel.prototype.init = function(container)
Initializes the shape and adds it to the container.
mxLabel.prototype.reconfigure = function()
Reconfigures this shape.
mxLabel.prototype.createHtml = function()
Creates and returns the HTML node to represent this shape.
mxLabel.prototype.createVml = function()
Creates and returns the VML node to represent this shape.
mxLabel.prototype.createVmlImage = function(src,
opacity)
Creates an image node for the given image src and opacity to be used in VML.
mxLabel.prototype.createSvg = function()
Creates and returns the SVG node to represent this shape.
mxLabel.prototype.redraw = function()
Overrides redraw to define a unified implementation for redrawing all supported dialects.
Name under which mxLabel is registered in mxCellRenderer.
Renders cells into a document object model.
Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.
mxShape.prototype.bounds
Holds the mxRectangle that specifies the bounds of this shape.
Defines the default width and height for images used in the label shape.
Close