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 toabsolute
.
Examples:
Example 1
See the widgets/widgets.html sample for examples.dojox.gfx.Rect
Property Summary
Method Summary
- applyLayout(rect)
- byWidget(widget) Returns the GfxWidget instance that created the specified widget.
- constructor() Creates an empty GfxWidget instance.
- getFontMinPxSize()
- getFontPxSize()
- getHeight()
- getMinHeight()
- getMinWidth()
- getWidth()
- prepare(container)
- setFontMinPxSize(sz)
- setFontPxSize(sz)
- setHeight(h)
- setMinHeight(h)
- setMinWidth(w)
- setShape(shape) Sets the attributes of the GfxWidget shape.
- setWidth(w)
Attached Objects
Properties
Methods
Returns the GfxWidget instance that created the specified widget.
Parameter | Type | Description |
---|---|---|
widget |
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 . |
Parameter | Type | Description |
---|---|---|
shape | Object | A hash that contains the properties of the widget. |