Package org.eclipse.draw2d
Class ScrollPaneLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.ScrollPaneLayout
- All Implemented Interfaces:
LayoutManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateMinimumSize
(IFigure figure, int w, int h) Calculates the minimum size using the given width and height hints.protected Dimension
calculatePreferredSize
(IFigure container, int wHint, int hHint) Calculates and returns the preferred size of the container based on the given hints.void
Lays out the given figure.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
-
Field Details
-
NEVER
protected static final int NEVER- See Also:
-
AUTO
protected static final int AUTO- See Also:
-
ALWAYS
protected static final int ALWAYS- See Also:
-
-
Constructor Details
-
ScrollPaneLayout
public ScrollPaneLayout()
-
-
Method Details
-
calculateMinimumSize
Description copied from class:AbstractHintLayout
Calculates the minimum size using the given width and height hints. This method is called fromAbstractHintLayout.getMinimumSize(IFigure, int, int)
whenever the cached minimum size has been flushed.By default, this method just calls
AbstractHintLayout.getPreferredSize(IFigure, int, int)
, meaning minimum and preferres sizes will be the same unless this method is overridden.- Overrides:
calculateMinimumSize
in classAbstractHintLayout
- Parameters:
figure
- the Figure on which this layout is installedw
- the width hinth
- the height hint- Returns:
- the layout's minimum size
- See Also:
-
calculatePreferredSize
Calculates and returns the preferred size of the container based on the given hints. If the given ScrollPane's (container) horizontal and vertical scroll bar visibility is notScrollPane.NEVER
, then space for those bars is always deducted from the hints (whether or not we actually need the scroll bars).- Specified by:
calculatePreferredSize
in classAbstractLayout
- Parameters:
container
- the ScrollPane whose preferred size needs to be calculatedwHint
- the width hinthHint
- the height hint- Returns:
- the preferred size of the given container
- Since:
- 2.0
-
layout
Description copied from interface:LayoutManager
Lays out the given figure.- Parameters:
parent
- The figure- See Also:
-