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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewportLayout
public ViewportLayout()
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