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.gfxlayout.Layout

Object » ibm_ilog.diagram.gfxlayout.Layout
dojo.require("ibm_ilog.diagram.gfxlayout.Layout");

A Layout instance is responsible for arranging the children of a GFX container according to positioning and sizing constraints.

Method Summary

  • adjustBBox(bbox) Adjusts the specified rectangle according to the constraints of this layout.
  • computePreferredSize(proposedSize) compute the preferred size of the associated container according to the layout strategy.
  • constructor(args) Creates and initializes a new ibm_ilog.diagram.gfxlayout.Layout instance. args : Object : a mixin set of parameters.
  • doLayout(contBounds) Applies this layout to the associated container.
  • getConfig() Gets the current configuration of this layout instance.
  • inLayout() Indicates whether this layout is in a layout session.
  • invalidate() Invalidates this layout.
  • layoutChildren(contBounds) Applies this layout strategy to the associated container within the specified bounds. Subclass must override this method to implement their own layout logic.
  • placeChildInSlot(shape, slotBounds, hAlign, vAlign) Places the specified object in the given slotBounds.

Event Summary

Methods

adjustBBox
Adjusts the specified rectangle according to the constraints of this layout.
ParameterTypeDescription
bboxRectangle
computePreferredSize
compute the preferred size of the associated container according to the layout strategy.
ParameterTypeDescription
proposedSize
constructor
Creates and initializes a new ibm_ilog.diagram.gfxlayout.Layout instance. args : Object : a mixin set of parameters.
ParameterTypeDescription
args
doLayout
Applies this layout to the associated container.
ParameterTypeDescription
contBoundsRect
getConfig
Object An object that represents the layout current configuration.
Gets the current configuration of this layout instance.
inLayout
Indicates whether this layout is in a layout session.
invalidate

This method post a layout request to the layout engine.

layoutChildren
Applies this layout strategy to the associated container within the specified bounds. Subclass must override this method to implement their own layout logic.
ParameterTypeDescription
contBoundsRect
placeChildInSlot

This method should be invoked by layout implementation to place a shape within the given slot bounds, taking into account the vertical and horizontal alignment contraints of the shape (specified by means of the 'valign' and 'halign' properties on the shape object) and the margins, if any (specified by means of the 'margins' property. shape : dojox.gfx.Shape: the shape. slotBounds : Rectangle : the slot bounds (i.e the bounds where the shape must lie in)

ParameterTypeDescription
shapedojox.gfx.Shape
slotBoundsdojox.gfx.Rectangle
hAlignBoolean: indicates whether the shape must be aligned horizontally according to the value of its halign property.
vAlignBoolean: indicates whether the shape must be aligned vertically according to the value of its valign property.

Events

onLayoutPropertyChanged

This method should be called by layout subclasses when a property change needs the layout to be refreshed.