Package org.eclipse.draw2d
Class BorderLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.BorderLayout
- All Implemented Interfaces:
- LayoutManager
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final IntegerConstant to be used as a constraint for child figuresstatic final IntegerConstant to be used as a constraint for child figuresstatic final IntegerConstant to be used as a constraint for child figuresstatic final IntegerConstant to be used as a constraint for child figuresstatic final IntegerConstant to be used as a constraint for child figuresFields inherited from class org.eclipse.draw2d.AbstractLayoutisObservingVisibility, preferredSize
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected DimensioncalculateMinimumSize(IFigure container, int wHint, int hHint) Calculates the minimum size using the given width and height hints.protected DimensioncalculatePreferredSize(IFigure figure, int wHint, int hHint) Calculates the preferred size of the given figure, using width and height hints.voidLays out the given figure.voidRemoves the given figure from this LayoutManager's list of figures.voidsetConstraint(IFigure child, Object constraint) Sets the location of hte given child in this layout.voidsetHorizontalSpacing(int gap) Sets the horizontal spacing to be used between the children.voidsetVerticalSpacing(int gap) Sets the vertical spacing ot be used between the children.Methods inherited from class org.eclipse.draw2d.AbstractHintLayoutgetMinimumSize, getPreferredSize, invalidate, isSensitiveHorizontally, isSensitiveVerticallyMethods inherited from class org.eclipse.draw2d.AbstractLayoutcalculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, setObserveVisibility
- 
Field Details- 
CENTERConstant to be used as a constraint for child figures
- 
TOPConstant to be used as a constraint for child figures
- 
BOTTOMConstant to be used as a constraint for child figures
- 
LEFTConstant to be used as a constraint for child figures
- 
RIGHTConstant to be used as a constraint for child figures
 
- 
- 
Constructor Details- 
BorderLayoutpublic BorderLayout()
 
- 
- 
Method Details- 
calculateMinimumSizeDescription copied from class:AbstractHintLayoutCalculates 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:
- calculateMinimumSizein class- AbstractHintLayout
- Parameters:
- container- the Figure on which this layout is installed
- wHint- the width hint
- hHint- the height hint
- Returns:
- the layout's minimum size
- 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:
- figure- The figure
- wHint- The width hint
- hHint- The height hint
- Returns:
- The preferred size
- See Also:
 
- 
layoutDescription copied from interface:LayoutManagerLays out the given figure.- Parameters:
- container- The figure
- See Also:
 
- 
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:
 
- 
setConstraintSets the location of hte given child in this layout. Valid constraints:Ensure that the given Figure is indeed a child of the Figure on which this layout has been set. Proper behaviour cannot be guaranteed if that is not the case. Also ensure that every child has a valid constraint. Passing a nullconstraint will invokeremove(IFigure).If the given child was assigned another constraint earlier, it will be re-assigned to the new constraint. If there is another child with the given constraint, it will be over-ridden so that the given child now has that constraint. - Specified by:
- setConstraintin interface- LayoutManager
- Overrides:
- setConstraintin class- AbstractLayout
- Parameters:
- child- the child
- constraint- the child's new constraint
- See Also:
 
- 
setHorizontalSpacingpublic void setHorizontalSpacing(int gap) Sets the horizontal spacing to be used between the children. Default is 0.- Parameters:
- gap- The horizonal spacing
 
- 
setVerticalSpacingpublic void setVerticalSpacing(int gap) Sets the vertical spacing ot be used between the children. Default is 0.- Parameters:
- gap- The vertical spacing
 
 
-