Runtime

org.eclipse.gmf.runtime.diagram.ui.figures
Class CanonicalShapeCompartmentLayout

java.lang.Object
  extended byorg.eclipse.draw2d.AbstractLayout
      extended byorg.eclipse.draw2d.XYLayout
          extended byorg.eclipse.draw2d.FreeformLayout
              extended byorg.eclipse.gmf.runtime.diagram.ui.layout.FreeFormLayoutEx
                  extended byorg.eclipse.gmf.runtime.diagram.ui.figures.CanonicalShapeCompartmentLayout
All Implemented Interfaces:
ICanonicalShapeCompartmentLayout, LayoutManager

public class CanonicalShapeCompartmentLayout
extends FreeFormLayoutEx
implements ICanonicalShapeCompartmentLayout

Layouts the shape compartment's children. This class provides utility methods to layout figure's whose position are undefined.

See Also:
ICanonicalShapeCompartmentLayout

Field Summary
 
Fields inherited from class org.eclipse.draw2d.XYLayout
constraints
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
 
Fields inherited from interface org.eclipse.gmf.runtime.diagram.ui.figures.ICanonicalShapeCompartmentLayout
UNDEFINED
 
Constructor Summary
CanonicalShapeCompartmentLayout(java.util.Map map)
          Creates an instance
 
Method Summary
 java.util.Map getVisualPartMap()
          Return the [figure, editpart] map.
 void layout(IFigure parent)
          Implements the algorithm to layout the components of the given container figure.
 void layoutUndefinedChildren(IFigure parent)
          Layout the supplied parent's children whose position is equal to ICanonicalShapeCompartmentLayout.UNDEFINED.
 void setVisualPartMap(java.util.Map map)
          Set the [figure, editpart] map.
 
Methods inherited from class org.eclipse.draw2d.FreeformLayout
getOrigin
 
Methods inherited from class org.eclipse.draw2d.XYLayout
calculatePreferredSize, getConstraint, remove, setConstraint
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d.LayoutManager
getConstraint, getMinimumSize, getPreferredSize, invalidate, remove, setConstraint
 

Constructor Detail

CanonicalShapeCompartmentLayout

public CanonicalShapeCompartmentLayout(java.util.Map map)
Creates an instance

Parameters:
map - the [figure,editpart] map.
See Also:
EditPartViewer.getVisualPartMap()
Method Detail

layout

public void layout(IFigure parent)
Implements the algorithm to layout the components of the given container figure. Each component is laid out using it's own layout constraint specifying it's size and position. Calls CanonicalShapeCompartmentLayout.layoutUndefinedChildren(IFigure) to layout all child figure whose position are undefined

Specified by:
layout in interface LayoutManager
Overrides:
layout in class FreeFormLayoutEx
Parameters:
parent - containing figure.
See Also:
ICanonicalShapeCompartmentLayout

layoutUndefinedChildren

public void layoutUndefinedChildren(IFigure parent)
Layout the supplied parent's children whose position is equal to ICanonicalShapeCompartmentLayout.UNDEFINED. Calls LayoutHelper.layoutUndefinedChildren(ICanonicalShapeCompartmentLayout, IFigure, Map);

Specified by:
layoutUndefinedChildren in interface ICanonicalShapeCompartmentLayout
Parameters:
parent - the containing figure.

setVisualPartMap

public void setVisualPartMap(java.util.Map map)
Set the [figure, editpart] map.

Specified by:
setVisualPartMap in interface ICanonicalShapeCompartmentLayout
Parameters:
map - to set
See Also:
EditPartViewer.getVisualPartMap()

getVisualPartMap

public java.util.Map getVisualPartMap()
Return the [figure, editpart] map.

Specified by:
getVisualPartMap in interface ICanonicalShapeCompartmentLayout
Returns:
Map
See Also:
EditPartViewer.getVisualPartMap()

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.