de.cau.cs.kieler.core.model.gmf.figures.layout
Class AbstractTableLayout

java.lang.Object
  extended by org.eclipse.draw2d.AbstractLayout
      extended by org.eclipse.draw2d.AbstractHintLayout
          extended by de.cau.cs.kieler.core.model.gmf.figures.layout.AbstractTableLayout
All Implemented Interfaces:
LayoutManager
Direct Known Subclasses:
StateLayout

public abstract class AbstractTableLayout
extends AbstractHintLayout

A generic configurable table layout for figures: Inner elements are laid out in a tabular style. See example above. The exact configuration for the tableLayout is passed through the GMFTableLayoutConfiguration. To use this layouter one have to implement a configuration.

Rating red

Field Summary
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
AbstractTableLayout()
          Creates a state layout.
 
Method Summary
 Dimension calculateMinimumSize(IFigure stateFigure, int whint, int hhint)
          
protected  Dimension calculatePreferredSize(IFigure stateFigure, int whint, int hhint)
          
 void checkNewSize(IFigure stateFigure, EObject state, Rectangle newBounds)
          Checks the new size of the state figure.
 ExtendedTable getCorrespondingLayout(IFigure stateFigure)
           
 void layout(IFigure stateFigure)
          
 
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
 

Constructor Detail

AbstractTableLayout

public AbstractTableLayout()
Creates a state layout.

Method Detail

getCorrespondingLayout

public ExtendedTable getCorrespondingLayout(IFigure stateFigure)
Parameters:
stateFigure - a state figure
Returns:
the layout for the given figure

layout

public final void layout(IFigure stateFigure)


calculateMinimumSize

public Dimension calculateMinimumSize(IFigure stateFigure,
                                      int whint,
                                      int hhint)

Overrides:
calculateMinimumSize in class AbstractHintLayout

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure stateFigure,
                                           int whint,
                                           int hhint)

Specified by:
calculatePreferredSize in class AbstractLayout

checkNewSize

public void checkNewSize(IFigure stateFigure,
                         EObject state,
                         Rectangle newBounds)
Checks the new size of the state figure.

Parameters:
stateFigure - the state figure
state - the corresponding model element
newBounds - the new bounds of the state figure