Package org.eclipse.draw2d
Class ViewportLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.ViewportLayout
- All Implemented Interfaces:
- LayoutManager
Layout for a viewport. A viewport is a flexible window onto a figure.
- 
Field SummaryFields inherited from class org.eclipse.draw2d.AbstractLayoutisObservingVisibility, preferredSize
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected DimensioncalculateMinimumSize(IFigure figure, int wHint, int hHint) Returns the minimum size required by the input viewport figure.protected DimensioncalculatePreferredSize(IFigure parent, int wHint, int hHint) Calculates and returns the preferred size of the figure based on the given hints.protected booleanisSensitiveHorizontally(IFigure parent) Returns whether this layout manager is sensitive to changes in the horizontal hint.protected booleanisSensitiveVertically(IFigure parent) Returns whether this layout manager is sensitive to changes in the vertical hint.voidLays out the given figure.Methods inherited from class org.eclipse.draw2d.AbstractHintLayoutgetMinimumSize, getPreferredSize, invalidateMethods inherited from class org.eclipse.draw2d.AbstractLayoutcalculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility
- 
Constructor Details- 
ViewportLayoutpublic ViewportLayout()
 
- 
- 
Method Details- 
calculateMinimumSizeReturns the minimum size required by the input viewport figure. Since viewport is flexible, the minimum size required would be the just the size of the borders.- Overrides:
- calculateMinimumSizein class- AbstractHintLayout
- Parameters:
- figure- the Figure on which this layout is installed
- wHint- the width hint
- hHint- the height hint
- Returns:
- the layout's minimum size
- See Also:
 
- 
calculatePreferredSizeCalculates and returns the preferred size of the figure based on the given hints. The given wHint is ignored unless the viewport (parent) is tracking width. The same is true for the height hint.- Specified by:
- calculatePreferredSizein class- AbstractLayout
- Parameters:
- parent- the Viewport whose preferred size is to be calculated
- wHint- the width hint
- hHint- the height hint
- Returns:
- the Preferred size of the given viewport
- Since:
- 2.0
 
- 
isSensitiveHorizontallyDescription copied from class:AbstractHintLayoutReturns whether this layout manager is sensitive to changes in the horizontal hint. By default, this method returnstrue.- Overrides:
- isSensitiveHorizontallyin class- AbstractHintLayout
- Parameters:
- parent- the layout's container
- Returns:
- trueif this layout is sensite to horizontal hint changes
- See Also:
 
- 
isSensitiveVerticallyDescription copied from class:AbstractHintLayoutReturns whether this layout manager is sensitive to changes in the vertical hint. By default, this method returnstrue.- Overrides:
- isSensitiveVerticallyin class- AbstractHintLayout
- Parameters:
- parent- the layout's container
- Returns:
- trueif this layout is sensite to vertical hint changes
- See Also:
 
- 
layoutDescription copied from interface:LayoutManagerLays out the given figure.- Parameters:
- figure- The figure
- See Also:
 
 
-