be.ac.vub.cocompose.eclipse.figures
Class ConceptLayout

java.lang.Object
  extended byorg.eclipse.draw2d.AbstractLayout
      extended byorg.eclipse.draw2d.XYLayout
          extended byorg.eclipse.draw2d.FreeformLayout
              extended bybe.ac.vub.cocompose.eclipse.figures.ConceptLayout
All Implemented Interfaces:
LayoutManager

public class ConceptLayout
extends FreeformLayout

Manages the layout of concept elements.

Since:
0.2.0
Version:
0.2.0, 09/01/2004
Author:
Dennis Wagelaar

Field Summary
 
Fields inherited from class org.eclipse.draw2d.XYLayout
constraints
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
preferredSize
 
Constructor Summary
ConceptLayout()
           
 
Method Summary
protected  Dimension calculatePreferredSize(IFigure f, int wHint, int hHint)
          Forces expansion of preferred size by (1, 1) to prevent clipping of contained figures.
 void clipConstraint(IFigure figure, Rectangle constraint)
          Clips the position constraint to behave like a vertical flow layout.
 void setConstraint(IFigure figure, Object newConstraint)
          Clips the Rectangle constraint to behave like a vertical flow layout.
 
Methods inherited from class org.eclipse.draw2d.FreeformLayout
getOrigin
 
Methods inherited from class org.eclipse.draw2d.XYLayout
getConstraint, layout, remove
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConceptLayout

public ConceptLayout()
Method Detail

setConstraint

public void setConstraint(IFigure figure,
                          Object newConstraint)
Clips the Rectangle constraint to behave like a vertical flow layout.

See Also:
LayoutManager.setConstraint(IFigure, Object)

clipConstraint

public void clipConstraint(IFigure figure,
                           Rectangle constraint)
Clips the position constraint to behave like a vertical flow layout.

Parameters:
figure - - the figure of which to clip the position.
constraint - - the rectangle to clip.

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure f,
                                           int wHint,
                                           int hHint)
Forces expansion of preferred size by (1, 1) to prevent clipping of contained figures.

See Also:
AbstractLayout.calculatePreferredSize(org.eclipse.draw2d.IFigure, int, int)