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
imageSizeDefault width and height for the image.
spacingDefault value for image spacing.
indicatorSizeDefault width and height for the indicicator.
indicatorSpacingDefault spacing between image and indicator.
Functions
initInitializes the shape and the <indicator>.
redrawReconfigures this shape.
isHtmlAllowedReturns true for non-rounded, non-rotated shapes with no glass gradient and no indicator shape.
paintForegroundGeneric background painting implementation.
paintImageGeneric background painting implementation.
getImageBoundsGeneric background painting implementation.
paintIndicatorGeneric background painting implementation.
getIndicatorBoundsGeneric background painting implementation.
redrawHtmlShapeGeneric background painting implementation.

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

imageSize

mxLabel.prototype.imageSize

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

spacing

mxLabel.prototype.spacing

Default value for image 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.

Functions

init

mxLabel.prototype.init = function(container)

Initializes the shape and the <indicator>.

redraw

mxLabel.prototype.redraw = function()

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

isHtmlAllowed

mxLabel.prototype.isHtmlAllowed = function()

Returns true for non-rounded, non-rotated shapes with no glass gradient and no indicator shape.

paintForeground

mxLabel.prototype.paintForeground = function(c,
x,
y,
w,
h)

Generic background painting implementation.

paintImage

mxLabel.prototype.paintImage = function(c,
x,
y,
w,
h)

Generic background painting implementation.

getImageBounds

mxLabel.prototype.getImageBounds = function(x,
y,
w,
h)

Generic background painting implementation.

paintIndicator

mxLabel.prototype.paintIndicator = function(c,
x,
y,
w,
h)

Generic background painting implementation.

getIndicatorBounds

mxLabel.prototype.getIndicatorBounds = function(x,
y,
w,
h)

Generic background painting implementation.

redrawHtmlShape

mxLabel.prototype.redrawHtmlShape = function()

Generic background painting implementation.

Base class for all shapes.
function mxLabel(bounds,
fill,
stroke,
strokewidth)
Constructs a new label shape.
mxLabel.prototype.imageSize
Default width and height for the image.
mxLabel.prototype.spacing
Default value for image spacing.
mxLabel.prototype.indicatorSize
Default width and height for the indicicator.
mxLabel.prototype.indicatorSpacing
Default spacing between image and indicator.
mxLabel.prototype.init = function(container)
Initializes the shape and the indicator.
mxLabel.prototype.redraw = function()
Reconfigures this shape.
mxLabel.prototype.isHtmlAllowed = function()
Returns true for non-rounded, non-rotated shapes with no glass gradient and no indicator shape.
mxLabel.prototype.paintForeground = function(c,
x,
y,
w,
h)
Generic background painting implementation.
mxLabel.prototype.paintImage = function(c,
x,
y,
w,
h)
Generic background painting implementation.
mxLabel.prototype.getImageBounds = function(x,
y,
w,
h)
Generic background painting implementation.
mxLabel.prototype.paintIndicator = function(c,
x,
y,
w,
h)
Generic background painting implementation.
mxLabel.prototype.getIndicatorBounds = function(x,
y,
w,
h)
Generic background painting implementation.
mxLabel.prototype.redrawHtmlShape = function()
Generic background painting implementation.
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