ibm_ilog.diagram.adorners.Adorner
The Adorner object provides a graphical decoration for a graph entity. The decoration is composed of a graphical representation given by the adorner template and also by a set of smaller AdornerHandle entities. Each adorner usually defines a fixed set of handles which can be used. AdornerHandles usually provide an interactive service to the user. For example, the handle can connect to the onmousedown event of its shapes to perform some kind of action on the adorned. If this action leads to an interaction process that is not instantaneous, then the AdornerHandle can push an Interactor object into the interactors stack, blocking other conflicting interactors temporarily while the action is performed. For example, during the creation of links some interactions may be disabled.
construction: Adorners don't use parameterized constructors. Instead, they rely on an initialize method. For example:
new ibm_ilog.diagram.editor.ResizeAdorner().initialize(diagram, templatePool, "ResizeAdorner0");
The reason for this is that the creation is implemented with a template method, and thus the template code implemented in the superclass needs the methods already overriden. Currently dojo executes superclass constructors before overriding methods redeclared in the subclass.
TODO: . update extendCreateShape for using deserialization . change individual props for composite: elemBounds instead of elemLeft, elemTop, elemW, elemH
Method Summary
- activate() activates the adorner
- constructor()
- deactivate() deactivates the adorner
- destroy() removes the diagram connection
- forceUpdate() Used to clear the timeout and update the adorner shape immediately.
- getAdorned() gets the bounded element
- getBaseShape()
- getBounds(parent) Returns the bounds of this node in the coordinate space of the specified parent.
- getDiagram() gets the diagram
- getId()
- getViewport() gets the viewport
- gfxConnector(src, evt, object, handler)
- gfxDisconnector(handle, src)
- initialize(diagram, templatePool, templateId) Initializes an Adorner after construction.
- setAdorned(element) apply the adorner to the given element
Event Summary
Attached Objects
Methods
Parameter | Type | Description |
---|---|---|
parent | dojox.gfx.Group | The parent object that determines the coordinate space the bounds are relative to. If null or undefined, the bounds of the node relative to its parent are returned. |
Parameter | Type | Description |
---|---|---|
diagram | The | Diagram Dijit |
templatePool | The | template pool. The adorner gets its template from this pool using the templateId argument, and also for instantiating its handles with the templates from the pool. |
templateId | the | Id for the adorner template in the pool |