Draw2D v2.0

org.eclipse.draw2d
Class ScrollPaneLayout

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

public class ScrollPaneLayout
extends AbstractLayout

The ScrollPaneLayout is responsible for laying out the Viewport and ScrollBars of a ScrollPane.


Field Summary
protected static int ALWAYS
           
protected static int AUTO
           
protected static int NEVER
           
 
Constructor Summary
ScrollPaneLayout()
           
 
Method Summary
 Dimension calculateMinimumSize(IFigure figure)
          Calculates and returns the minimum size of the container given as input.
protected  Dimension calculatePreferredSize(IFigure container)
          Calculates and returns the preferred size of the container given as input.
 Dimension getMinimumSize(IFigure container)
          Returns the minimum size of the given figure.
 void invalidate()
          Removes all cached information for all figures this LayoutManager is responsible for.
 void layout(IFigure parent)
          Lays out the given figure.
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getPreferredSize, getPreferredSize, invalidate, remove, setConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEVER

protected static final int NEVER

AUTO

protected static final int AUTO

ALWAYS

protected static final int ALWAYS
Constructor Detail

ScrollPaneLayout

public ScrollPaneLayout()
Method Detail

calculateMinimumSize

public Dimension calculateMinimumSize(IFigure figure)
Calculates and returns the minimum size of the container given as input. In the case of the ScrollPaneLayout this is the minimum size of the passed Figure's Viewport plus its Insets.
Parameters:
figure - Figure whose preferred size is required.
Returns:
The minimum size of the Figure input.
Since:
2.0

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure container)
Calculates and returns the preferred size of the container given as input. In the case of the ScrollPaneLayout this is the preferred size of the passed Figure's Viewport plus its Insets.
Overrides:
calculatePreferredSize in class AbstractLayout
Parameters:
container - Figure whose preferred size is required.
Returns:
The preferred size of the figure input.
Since:
2.0

getMinimumSize

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

invalidate

public void invalidate()
Description copied from class: AbstractLayout
Removes all cached information for all figures this LayoutManager is responsible for.
Overrides:
invalidate in class AbstractLayout

layout

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

Draw2D v2.0