Package org.eclipse.draw2d
Class OrderedLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.OrderedLayout
- All Implemented Interfaces:
- LayoutManager
- Direct Known Subclasses:
- FlowLayout,- ToolbarLayout
Abstract superclass for layout managers that arrange their children in
 columns/rows.
- Since:
- 3.7
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intConstant to specify components to be aligned on the right/bottomstatic final intConstant to specify components to be aligned in the centerstatic final intConstant to specify components to be aligned on the left/topprotected booleanDeprecated.static final booleanDeprecated.Pulled up from derived layout manager and deprecated here because unused.protected intDeprecated.UsegetMinorAlignment()andsetMinorAlignment(int)instead.protected TransposerTransposer object that may be used in layout calculations.static final booleanDeprecated.Pulled up from derived layout manager and deprecated here because unused.Fields inherited from class org.eclipse.draw2d.AbstractLayoutisObservingVisibility, preferredSize
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a newOrderedLayoutwith the default orientation and a minor alignment ofALIGN_TOPLEFT.
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract intReturns the default orientation of this layout.intReturns the minor alignment of the layout.booleanReturnstrueif the orientation of the layout is horizontal.abstract booleanReturns whether figures should obtain the same height/width in the minor axis.voidsetHorizontal(boolean flag) Sets the orientation of the layout.voidsetMinorAlignment(int align) Sets the alignment of the children contained in the layout.abstract voidsetStretchMinorAxis(boolean value) Causes children that are smaller in the dimension of the minor axis to be stretched to fill the minor axis.Methods inherited from class org.eclipse.draw2d.AbstractHintLayoutcalculateMinimumSize, getMinimumSize, getPreferredSize, invalidate, isSensitiveHorizontally, isSensitiveVerticallyMethods inherited from class org.eclipse.draw2d.AbstractLayoutcalculatePreferredSize, calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibilityMethods 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- 
ALIGN_CENTERpublic static final int ALIGN_CENTERConstant to specify components to be aligned in the center- See Also:
 
- 
ALIGN_TOPLEFTpublic static final int ALIGN_TOPLEFTConstant to specify components to be aligned on the left/top- See Also:
 
- 
ALIGN_BOTTOMRIGHTpublic static final int ALIGN_BOTTOMRIGHTConstant to specify components to be aligned on the right/bottom- See Also:
 
- 
HORIZONTALDeprecated.Pulled up from derived layout manager and deprecated here because unused.Constant to specify components should be layed out horizontally- See Also:
 
- 
VERTICALDeprecated.Pulled up from derived layout manager and deprecated here because unused.Constant to specify components should be layed out vertically- See Also:
 
- 
horizontalDeprecated.UsesetHorizontal(boolean)andisHorizontal()instead.The horizontal property.
- 
minorAlignmentDeprecated.UsegetMinorAlignment()andsetMinorAlignment(int)instead.The alignment along the minor axis.
- 
transposerTransposer object that may be used in layout calculations. Will be automatically enabled/disabled dependent on the default and the actual orientation.- @noreference
- This field is not intended to be referenced by clients.
 
 
- 
- 
Constructor Details- 
OrderedLayoutpublic OrderedLayout()Constructs a newOrderedLayoutwith the default orientation and a minor alignment ofALIGN_TOPLEFT.
 
- 
- 
Method Details- 
getDefaultOrientationprotected abstract int getDefaultOrientation()Returns the default orientation of this layout.- Returns:
- one of PositionConstants.HORIZONTALorPositionConstants.VERTICAL
 
- 
getMinorAlignmentpublic int getMinorAlignment()Returns the minor alignment of the layout. Minor minor axis is the axis perpendicular to the overall orientation set in the constructor.- Returns:
- the minor alignment
 
- 
isHorizontalpublic boolean isHorizontal()Returnstrueif the orientation of the layout is horizontal.- Returns:
- trueif the orientation of the layout is horizontal
 
- 
isStretchMinorAxispublic abstract boolean isStretchMinorAxis()Returns whether figures should obtain the same height/width in the minor axis.- Returns:
- whether children are to be stretched in the minor axis.
- TODO
- Made abstract here, so that derived layout managers can guarantee backwards compatibility for their exposed fields. Can be made concrete in the next major release, removing implementations in the derived layout managers.
 
- 
setHorizontalpublic void setHorizontal(boolean flag) Sets the orientation of the layout.- Parameters:
- flag-- trueif this layout should be horizontal,- falseotherwise.
 
- 
setMinorAlignmentpublic void setMinorAlignment(int align) Sets the alignment of the children contained in the layout. Possible values areALIGN_CENTER,ALIGN_BOTTOMRIGHTandALIGN_TOPLEFT.- Parameters:
- align- the minor alignment
 
- 
setStretchMinorAxispublic abstract void setStretchMinorAxis(boolean value) Causes children that are smaller in the dimension of the minor axis to be stretched to fill the minor axis. The minor axis is the opposite of the orientation. That is, in horizontal orientation, all figures will have the same height. If in vertical orientation, all figures will have the same width.- Parameters:
- value- whether children should be stretched in the minor axis.
- TODO
- Made abstract here, so that derived layout managers can guarantee backwards compatibility for their exposed fields. Can be made concrete in the next major release, removing implementations in the derived layout managers.
 
 
- 
setHorizontal(boolean)andisHorizontal()instead.