Package org.eclipse.draw2d
Class AbstractLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
- All Implemented Interfaces:
- LayoutManager
- Direct Known Subclasses:
- AbstractConstraintLayout,- AbstractHintLayout,- ScrollBarLayout
Provides generic support for LayoutManagers.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanWhether or not this layout pays attention to visiblity of figures when calculating its bounds.protected DimensionThe cached preferred size.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected final voidcalculatePreferredSize(IFigure container) This method is nowcalculatePreferredSize(IFigure, int, int).protected abstract DimensioncalculatePreferredSize(IFigure container, int wHint, int hHint) Calculates the preferred size of the given figure, using width and height hints.protected DimensiongetBorderPreferredSize(IFigure container) Returns the preferred size of the figure's border.getConstraint(IFigure child) Returns the constraint for the given figure.final voidgetMinimumSize(IFigure container) This method is nowgetMinimumSize(IFigure, int, int).getMinimumSize(IFigure container, int wHint, int hHint) Returns the minimum size of the given figure.final voidgetPreferredSize(IFigure container) This method is nowgetPreferredSize(IFigure, int, int).getPreferredSize(IFigure container, int wHint, int hHint) Returns the preferred size of the given figure, using width and height hints.voidTells the LayoutManager to throw away all cached information about the figures it is responsible for.protected voidinvalidate(IFigure child) Removes any cached information about the given figure.booleanReturns whether or not this layout pays attention to visiblity when calculating its bounds.voidRemoves the given figure from this LayoutManager's list of figures.voidsetConstraint(IFigure child, Object constraint) Sets the constraint for the given figure.voidsetObserveVisibility(boolean newValue) Sets isObservingVisibility to the given value.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.draw2d.LayoutManagerlayout
- 
Field Details- 
preferredSizeThe cached preferred size.
- 
isObservingVisibilityprotected boolean isObservingVisibilityWhether or not this layout pays attention to visiblity of figures when calculating its bounds. By default, false.
 
- 
- 
Constructor Details- 
AbstractLayoutpublic AbstractLayout()
 
- 
- 
Method Details- 
calculatePreferredSizeThis method is nowcalculatePreferredSize(IFigure, int, int).- Parameters:
- container- the figure
 
- 
calculatePreferredSizeCalculates the preferred size of the given figure, using width and height hints.- Parameters:
- container- The figure
- wHint- The width hint
- hHint- The height hint
- Returns:
- The preferred size
 
- 
getBorderPreferredSizeReturns the preferred size of the figure's border.- Parameters:
- container- The figure that the border is on
- Returns:
- The border's preferred size
 
- 
getConstraintReturns the constraint for the given figure.- Specified by:
- getConstraintin interface- LayoutManager
- Parameters:
- child- The figure
- Returns:
- The constraint
 
- 
getMinimumSizeThis method is nowgetMinimumSize(IFigure, int, int).- Parameters:
- container- the figure
 
- 
getMinimumSizeDescription copied from interface:LayoutManagerReturns the minimum size of the given figure.- Specified by:
- getMinimumSizein interface- LayoutManager
- Parameters:
- container- The Figure
- wHint- the width hint
- hHint- the height hint
- Returns:
- The minimum size
- See Also:
 
- 
getPreferredSizeReturns the preferred size of the given figure, using width and height hints. If the preferred size is cached, that size is returned. Otherwise,calculatePreferredSize(IFigure, int, int)is called.- Specified by:
- getPreferredSizein interface- LayoutManager
- Parameters:
- container- The figure
- wHint- The width hint
- hHint- The height hint
- Returns:
- The preferred size
 
- 
getPreferredSizeThis method is nowgetPreferredSize(IFigure, int, int).- Parameters:
- container- the figure
 
- 
invalidatepublic void invalidate()Description copied from interface:LayoutManagerTells the LayoutManager to throw away all cached information about the figures it is responsible for. This method is called whenever the owning figure is invalidated.- Specified by:
- invalidatein interface- LayoutManager
- See Also:
 
- 
invalidateRemoves any cached information about the given figure.- Parameters:
- child- the child that is invalidated
 
- 
isObservingVisibilitypublic boolean isObservingVisibility()Returns whether or not this layout pays attention to visiblity when calculating its bounds.- Returns:
- true if invisible figures should not contribute to this layout's bounds.
 
- 
removeRemoves the given figure from this LayoutManager's list of figures.- Specified by:
- removein interface- LayoutManager
- Parameters:
- child- The figure to remove
 
- 
setConstraintSets the constraint for the given figure.- Specified by:
- setConstraintin interface- LayoutManager
- Parameters:
- child- the child
- constraint- the child's new constraint
 
- 
setObserveVisibilitypublic void setObserveVisibility(boolean newValue) Sets isObservingVisibility to the given value.- Parameters:
- newValue-- trueif visibility should be observed
 
 
-