public class ScrollBarLayout extends AbstractLayout
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOWN_ARROW
Used as a constraint for the down arrow figure.
|
static java.lang.String |
PAGE_DOWN
Used as a constraint for the page down figure.
|
static java.lang.String |
PAGE_UP
Used as a constraint for the page up figure.
|
static java.lang.String |
THUMB
Used as a constraint for the thumb figure.
|
protected Transposer |
transposer
Transposes values if the ScrollBar is horizontally oriented.
|
static java.lang.String |
UP_ARROW
Used as a constraint for the up arrow figure.
|
isObservingVisibility, preferredSize
Constructor and Description |
---|
ScrollBarLayout(Transposer t)
Constructs a ScrollBarLayout.
|
Modifier and Type | Method and Description |
---|---|
protected Dimension |
calculatePreferredSize(IFigure parent,
int w,
int h)
Calculates the preferred size of the given figure, using width and height
hints.
|
void |
layout(IFigure parent)
Lays out the given figure.
|
protected Rectangle |
layoutButtons(ScrollBar scrollBar)
Places the buttons and returns the Rectangle into which the track should
be placed.
|
void |
remove(IFigure child)
Removes the given figure from this LayoutManager's list of figures.
|
void |
setConstraint(IFigure figure,
java.lang.Object constraint)
Sets the constraint for the given figure.
|
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility
public static final java.lang.String UP_ARROW
public static final java.lang.String DOWN_ARROW
public static final java.lang.String THUMB
public static final java.lang.String PAGE_UP
public static final java.lang.String PAGE_DOWN
protected final Transposer transposer
public ScrollBarLayout(Transposer t)
t
- the Transposerpublic void setConstraint(IFigure figure, java.lang.Object constraint)
AbstractLayout
setConstraint
in interface LayoutManager
setConstraint
in class AbstractLayout
figure
- the childconstraint
- the child's new constraintAbstractLayout.setConstraint(IFigure, Object)
protected Dimension calculatePreferredSize(IFigure parent, int w, int h)
AbstractLayout
calculatePreferredSize
in class AbstractLayout
parent
- The figurew
- The width hinth
- The height hintAbstractLayout.calculatePreferredSize(IFigure, int, int)
public void layout(IFigure parent)
LayoutManager
parent
- The figureLayoutManager.layout(IFigure)
protected Rectangle layoutButtons(ScrollBar scrollBar)
scrollBar
- the scrollbar whose buttons are being layed outpublic void remove(IFigure child)
AbstractLayout
remove
in interface LayoutManager
remove
in class AbstractLayout
child
- The figure to removeLayoutManager.remove(IFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.