public class ScrollPaneLayout extends AbstractHintLayout
Modifier and Type | Field and Description |
---|---|
protected static int |
ALWAYS |
protected static int |
AUTO |
protected static int |
NEVER |
isObservingVisibility, preferredSize
Constructor and Description |
---|
ScrollPaneLayout() |
Modifier and Type | Method and Description |
---|---|
Dimension |
calculateMinimumSize(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 |
layout(IFigure parent)
Lays out the given figure.
|
getMinimumSize, getPreferredSize, invalidate, isSensitiveHorizontally, isSensitiveVertically
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility
protected static final int NEVER
ScrollPane.NEVER
,
Constant Field Valuesprotected static final int AUTO
ScrollPane.AUTOMATIC
,
Constant Field Valuesprotected static final int ALWAYS
ScrollPane.ALWAYS
,
Constant Field Valuespublic Dimension calculateMinimumSize(IFigure figure, int w, int h)
AbstractHintLayout
AbstractHintLayout.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.
calculateMinimumSize
in class AbstractHintLayout
figure
- the Figure on which this layout is installedw
- the width hinth
- the height hintAbstractHintLayout.calculateMinimumSize(IFigure, int, int)
protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
ScrollPane.NEVER
, then
space for those bars is always deducted from the hints (whether or not we
actually need the scroll bars).calculatePreferredSize
in class AbstractLayout
container
- the ScrollPane whose preferred size needs to be calculatedwHint
- the width hinthHint
- the height hintpublic void layout(IFigure parent)
LayoutManager
parent
- The figureLayoutManager.layout(IFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.