IBM ILOG Dojo Diagrammer 1.1 API Documentation
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

ibm_ilog.diagram.gfxwidget.GfxWidget

Object » dojox.gfx.Rect » ibm_ilog.diagram.gfxwidget.GfxWidget
dojo.require("ibm_ilog.diagram.gfxwidget.GfxWidget");

The GfxWidget class is a custom GFX shape that is intended to be used in Dojo Diagrammer node and link templates to integrate Dijit widgets in nodes or links. The widget type can be specified either by specifying the dojoType property of the shape, or by passing a function as the createWidget property of the shape.

Note that this special shape has a number of limitations:

  • The widget does not zoom when the graph is zoomed (only its position will be updated).
  • The stacking order of widgets may be inconsistent with the order of their parent group shapes.
  • If the shape is used outside of a Diagram widget, the HTML element that contains the surface must have its position style set to absolute.

Examples:

Example 1

See the widgets/widgets.html sample for examples.
dojox.gfx.Rect

Property Summary

Method Summary

Attached Objects

Properties

bbox
nodeType
shape

Methods

applyLayout
Defined by dojox.gfx.Rect
ParameterTypeDescription
rect
byWidget
Returns the GfxWidget instance that created the specified widget.
ParameterTypeDescription
widget
constructor

You must call setShape to specify the widget class and attributes.

getFontMinPxSize
getFontPxSize
getHeight
getMinHeight
getMinWidth
getWidth
prepare
ParameterTypeDescription
container
setFontMinPxSize
ParameterTypeDescription
sz
setFontPxSize
ParameterTypeDescription
sz
setHeight
ParameterTypeDescription
h
setMinHeight
ParameterTypeDescription
h
setMinWidth
ParameterTypeDescription
w
setShape

The shape parameter is an object with the following properties:

Property Description
type must be 'widget'
dojoType The type of the widget, for example 'dijit.form.Button'. If createWidget is specified, dojoType is ignored.
createWidget A function that is called to create the widget. The function will be called with the GfxWidget instance as argument.
x,y The position of the widget.
width,height The size of the shape. If no size is specified, the size of the widget is used.
widget attribute Any other property is passed to the widget using an attr() call. For example, label: 'Click Here' to set the label of a Button.

ParameterTypeDescription
shapeObjectA hash that contains the properties of the widget.
setWidth
ParameterTypeDescription
w