Draw2D v2.0

org.eclipse.draw2d
Class ViewportLayout

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractLayout
        |
        +--org.eclipse.draw2d.ViewportLayout
All Implemented Interfaces:
LayoutManager

public class ViewportLayout
extends AbstractLayout

Layout for a viewport. A viewport is a flexible window onto a figure.


Constructor Summary
ViewportLayout()
           
 
Method Summary
protected  Dimension calculatePreferredSize(IFigure parent)
          Calculates and returns the preferred size of the figure given in the input.
 Dimension getMinimumSize(IFigure figure)
          Returns the minimum size of the given figure.
 void layout(IFigure figure)
          Lays out the given figure.
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getPreferredSize, getPreferredSize, invalidate, invalidate, remove, setConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportLayout

public ViewportLayout()
Method Detail

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure parent)
Calculates and returns the preferred size of the figure given in the input. Since the viewport would generally like to cover the contents it is windowing, it returns the preferred size of the contents, with its own borders added.
Overrides:
calculatePreferredSize in class AbstractLayout
Parameters:
Viewport - for which the preferred size is required.
Returns:
Preferred size of the viewport.
Since:
2.0

layout

public void layout(IFigure figure)
Description copied from interface: LayoutManager
Lays out the given figure.

getMinimumSize

public Dimension getMinimumSize(IFigure figure)
Description copied from class: AbstractLayout
Returns the minimum size of the given figure.
Overrides:
getMinimumSize in class AbstractLayout

Draw2D v2.0