Package org.eclipse.draw2d
Class ScrollBarLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.ScrollBarLayout
- All Implemented Interfaces:
- LayoutManager
Lays out the Figures that make up a ScrollBar.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringUsed as a constraint for the down arrow figure.static final StringUsed as a constraint for the page down figure.static final StringUsed as a constraint for the page up figure.static final StringUsed as a constraint for the thumb figure.protected final TransposerTransposes values if the ScrollBar is horizontally oriented.static final StringUsed as a constraint for the up arrow figure.Fields inherited from class org.eclipse.draw2d.AbstractLayoutisObservingVisibility, preferredSize
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected DimensioncalculatePreferredSize(IFigure parent, int w, int h) Calculates the preferred size of the given figure, using width and height hints.voidLays out the given figure.protected RectanglelayoutButtons(ScrollBar scrollBar) Places the buttons and returns the Rectangle into which the track should be placed.voidRemoves the given figure from this LayoutManager's list of figures.voidsetConstraint(IFigure figure, Object constraint) Sets the constraint for the given figure.Methods inherited from class org.eclipse.draw2d.AbstractLayoutcalculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility
- 
Field Details- 
UP_ARROWUsed as a constraint for the up arrow figure.- See Also:
 
- 
DOWN_ARROWUsed as a constraint for the down arrow figure.- See Also:
 
- 
THUMBUsed as a constraint for the thumb figure.- See Also:
 
- 
PAGE_UPUsed as a constraint for the page up figure.- See Also:
 
- 
PAGE_DOWNUsed as a constraint for the page down figure.- See Also:
 
- 
transposerTransposes values if the ScrollBar is horizontally oriented. When used properly, the layout manager just needs to code for one case: vertical orientation.
 
- 
- 
Constructor Details- 
ScrollBarLayoutConstructs a ScrollBarLayout. If the given Transposer is enabled, the Scrollbar will be horizontally oriented. Otherwise, the ScrollBar will be vertically oriented.- Parameters:
- t- the Transposer
- Since:
- 2.0
 
 
- 
- 
Method Details- 
setConstraintDescription copied from class:AbstractLayoutSets the constraint for the given figure.- Specified by:
- setConstraintin interface- LayoutManager
- Overrides:
- setConstraintin class- AbstractLayout
- Parameters:
- figure- the child
- constraint- the child's new constraint
- See Also:
 
- 
calculatePreferredSizeDescription copied from class:AbstractLayoutCalculates the preferred size of the given figure, using width and height hints.- Specified by:
- calculatePreferredSizein class- AbstractLayout
- Parameters:
- parent- The figure
- w- The width hint
- h- The height hint
- Returns:
- The preferred size
- See Also:
 
- 
layoutDescription copied from interface:LayoutManagerLays out the given figure.- Parameters:
- parent- The figure
- See Also:
 
- 
layoutButtonsPlaces the buttons and returns the Rectangle into which the track should be placed. The track consists of the pageup, pagedown, and thumb figures. The Rectangle returned should be transposed correctly, that is, it should be vertically oriented. Users of the rectangle will re-transpose it for horizontal use.- Parameters:
- scrollBar- the scrollbar whose buttons are being layed out
- Returns:
- the Rectangle into which the track should be placed
- Since:
- 2.0
 
- 
removeDescription copied from class:AbstractLayoutRemoves the given figure from this LayoutManager's list of figures.- Specified by:
- removein interface- LayoutManager
- Overrides:
- removein class- AbstractLayout
- Parameters:
- child- The figure to remove
- See Also:
 
 
-