org.eclipse.draw2d
Class ScrollPaneLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.ScrollPaneLayout
- All Implemented Interfaces:
- LayoutManager
public class ScrollPaneLayout
- extends AbstractHintLayout
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NEVER
protected static final int NEVER
- See Also:
ScrollPane.NEVER
,
Constant Field Values
AUTO
protected static final int AUTO
- See Also:
ScrollPane.AUTOMATIC
,
Constant Field Values
ALWAYS
protected static final int ALWAYS
- See Also:
ScrollPane.ALWAYS
,
Constant Field Values
ScrollPaneLayout
public ScrollPaneLayout()
calculateMinimumSize
public Dimension calculateMinimumSize(IFigure figure,
int w,
int h)
- Description copied from class:
AbstractHintLayout
- Calculates the minimum size using the given width and height hints. This
method is called from
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.
- Overrides:
calculateMinimumSize
in class AbstractHintLayout
- Parameters:
figure
- the Figure on which this layout is installedw
- the width hinth
- the height hint
- Returns:
- the layout's minimum size
- See Also:
AbstractHintLayout.calculateMinimumSize(IFigure, int, int)
calculatePreferredSize
protected Dimension calculatePreferredSize(IFigure container,
int wHint,
int hHint)
- 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 not
ScrollPane.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 class AbstractLayout
- 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
public void layout(IFigure parent)
- Description copied from interface:
LayoutManager
- Lays out the given figure.
- Parameters:
parent
- The figure- See Also:
LayoutManager.layout(IFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.