de.cau.cs.kieler.synccharts.custom
Class ListCompartmentLayout

java.lang.Object
  extended by org.eclipse.draw2d.AbstractLayout
      extended by org.eclipse.draw2d.XYLayout
          extended by de.cau.cs.kieler.synccharts.custom.ListCompartmentLayout
All Implemented Interfaces:
LayoutManager

public class ListCompartmentLayout
extends XYLayout

A layout for compartments that lays out the compartment's children in rows, which are wrapped around if they are longer than the available space.

Rating proposed yellow
(2010-01-27) msp

Field Summary
 
Fields inherited from class org.eclipse.draw2d.XYLayout
constraints
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
ListCompartmentLayout()
           
 
Method Summary
protected  Dimension calculateMinimumSize(IFigure container, int wHint, int hHint)
          Performs calculation of the minimum size of the container.
protected  Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
          
 Dimension getMinimumSize(IFigure container, int wHint, int hHint)
          
 void layout(IFigure container)
          Apply the layout.
 
Methods inherited from class org.eclipse.draw2d.XYLayout
getConstraint, getOrigin, remove, setConstraint
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, 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
 

Constructor Detail

ListCompartmentLayout

public ListCompartmentLayout()
Method Detail

layout

public void layout(IFigure container)
Apply the layout.

Specified by:
layout in interface LayoutManager
Overrides:
layout in class XYLayout
Parameters:
container - the figure

getMinimumSize

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

Specified by:
getMinimumSize in interface LayoutManager
Overrides:
getMinimumSize in class AbstractLayout

calculateMinimumSize

protected Dimension calculateMinimumSize(IFigure container,
                                         int wHint,
                                         int hHint)
Performs calculation of the minimum size of the container.

Parameters:
container - the container figure
wHint - width hint
hHint - height hint
Returns:
the minimum size

calculatePreferredSize

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

Overrides:
calculatePreferredSize in class XYLayout