de.cau.cs.kieler.kaom.custom
Class EntityLayout

java.lang.Object
  extended by org.eclipse.draw2d.AbstractLayout
      extended by org.eclipse.draw2d.AbstractHintLayout
          extended by de.cau.cs.kieler.kaom.custom.EntityLayout
All Implemented Interfaces:
LayoutManager

public class EntityLayout
extends AbstractHintLayout

A layout manager for entities.

Rating red

Field Summary
static int MIN_HEIGHT
          the minimal height for entities.
static int MIN_WIDTH
          the minimal width for entities.
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
EntityLayout()
           
 
Method Summary
 Dimension calculateMinimumSize(IFigure container, int wHint, int hHint)
          
protected  Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
          
 void layout(IFigure parent)
          
 void setFixedMinSize(int width, int height)
          Sets a different minimum size than the default.
 
Methods inherited from class org.eclipse.draw2d.AbstractHintLayout
getMinimumSize, getPreferredSize, invalidate, isSensitiveHorizontally, isSensitiveVertically
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_WIDTH

public static final int MIN_WIDTH
the minimal width for entities.

See Also:
Constant Field Values

MIN_HEIGHT

public static final int MIN_HEIGHT
the minimal height for entities.

See Also:
Constant Field Values
Constructor Detail

EntityLayout

public EntityLayout()
Method Detail

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure container,
                                           int wHint,
                                           int hHint)

Specified by:
calculatePreferredSize in class AbstractLayout

calculateMinimumSize

public Dimension calculateMinimumSize(IFigure container,
                                      int wHint,
                                      int hHint)

Overrides:
calculateMinimumSize in class AbstractHintLayout

layout

public void layout(IFigure parent)


setFixedMinSize

public void setFixedMinSize(int width,
                            int height)
Sets a different minimum size than the default.

Parameters:
width - new min width
height - new min height