public class ToolbarLayout extends OrderedLayout
| Modifier and Type | Field and Description |
|---|---|
static boolean |
HORIZONTAL
Deprecated.
Unused.
|
protected boolean |
matchWidth
Deprecated.
|
protected int |
spacing
Deprecated.
Use
getSpacing() and setSpacing(int)
instead. |
static boolean |
VERTICAL
Deprecated.
Unused.
|
ALIGN_BOTTOMRIGHT, ALIGN_CENTER, ALIGN_TOPLEFT, horizontal, minorAlignment, transposerisObservingVisibility, preferredSize| Constructor and Description |
|---|
ToolbarLayout()
Constructs a vertically oriented ToolbarLayout with child spacing of 0
pixels,
setStretchMinorAxis(boolean) true, and
OrderedLayout.ALIGN_TOPLEFT minor alignment. |
ToolbarLayout(boolean isHorizontal)
Constructs a ToolbarLayout with a specified orientation.
|
| Modifier and Type | Method and Description |
|---|---|
protected Dimension |
calculateMinimumSize(IFigure container,
int wHint,
int hHint)
Calculates the minimum size of the container based on the given hints.
|
protected Dimension |
calculatePreferredSize(IFigure container,
int wHint,
int hHint)
Calculates the preferred size of the container based on the given hints.
|
protected Dimension |
getChildMinimumSize(IFigure child,
int wHint,
int hHint) |
protected Dimension |
getChildPreferredSize(IFigure child,
int wHint,
int hHint) |
protected int |
getDefaultOrientation()
Returns
PositionConstants.VERTICAL by default. |
int |
getSpacing() |
boolean |
getStretchMinorAxis()
Deprecated.
Use
isStretchMinorAxis() instead. |
protected boolean |
isSensitiveHorizontally(IFigure parent)
Returns whether this layout manager is sensitive to changes in the
horizontal hint.
|
protected boolean |
isSensitiveVertically(IFigure parent)
Returns whether this layout manager is sensitive to changes in the
vertical hint.
|
boolean |
isStretchMinorAxis()
Overwritten to guarantee backwards compatibility with
matchWidth
field. |
void |
layout(IFigure parent)
Lays out the given figure.
|
void |
setMatchWidth(boolean match)
Deprecated.
|
void |
setSpacing(int space)
Sets the amount of space between children.
|
void |
setStretchMinorAxis(boolean value)
Overwritten to guarantee backwards compatibility with
matchWidth
field. |
void |
setVertical(boolean flag)
Deprecated.
Use
OrderedLayout.setHorizontal(boolean) with argument
false instead. |
getMinorAlignment, isHorizontal, setHorizontal, setMinorAlignmentgetMinimumSize, getPreferredSize, invalidatecalculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibilitypublic static final boolean HORIZONTAL
public static final boolean VERTICAL
protected boolean matchWidth
OrderedLayout.setStretchMinorAxis(boolean) and
OrderedLayout.isStretchMinorAxis() instead.protected int spacing
public ToolbarLayout()
setStretchMinorAxis(boolean) true, and
OrderedLayout.ALIGN_TOPLEFT minor alignment.public ToolbarLayout(boolean isHorizontal)
setStretchMinorAxis(boolean)
false, and OrderedLayout.ALIGN_TOPLEFT alignment.isHorizontal - whether the children are oriented horizontallyprotected Dimension calculateMinimumSize(IFigure container, int wHint, int hHint)
calculateMinimumSize in class AbstractHintLayoutcontainer - the figure whose minimum size has to be calculatedwHint - the width hint (the desired width of the container)hHint - the height hint (the desired height of the container)AbstractHintLayout.getMinimumSize(IFigure, int, int)protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
calculatePreferredSize in class AbstractLayoutcontainer - the figure whose preferred size has to be calculatedwHint - the width hint (the desired width of the container)hHint - the height hint (the desired height of the container)AbstractHintLayout.getPreferredSize(IFigure, int, int)protected Dimension getChildMinimumSize(IFigure child, int wHint, int hHint)
child - the figure whose minimum size is to be determinedwHint - the width hinthHint - the height hintprotected Dimension getChildPreferredSize(IFigure child, int wHint, int hHint)
child - the figure whose preferred size is to be determinedwHint - the width hinthHint - the height hintprotected int getDefaultOrientation()
PositionConstants.VERTICAL by default.getDefaultOrientation in class OrderedLayoutPositionConstants.HORIZONTAL or
PositionConstants.VERTICALOrderedLayout.getDefaultOrientation()public int getSpacing()
protected boolean isSensitiveHorizontally(IFigure parent)
AbstractHintLayouttrue.isSensitiveHorizontally in class AbstractHintLayoutparent - the layout's containertrue if this layout is sensite to horizontal hint
changesAbstractHintLayout.isSensitiveHorizontally(IFigure)protected boolean isSensitiveVertically(IFigure parent)
AbstractHintLayouttrue.isSensitiveVertically in class AbstractHintLayoutparent - the layout's containertrue if this layout is sensite to vertical hint
changesAbstractHintLayout.isSensitiveVertically(IFigure)public boolean getStretchMinorAxis()
isStretchMinorAxis() instead.true if stretch minor axis has been enabled. The
default value is false.true if stretch minor axis is enabledpublic boolean isStretchMinorAxis()
matchWidth
field.isStretchMinorAxis in class OrderedLayoutOrderedLayout.isStretchMinorAxis()public void layout(IFigure parent)
LayoutManagerparent - The figureLayoutManager.layout(IFigure)public void setMatchWidth(boolean match)
setStretchMinorAxis(boolean)match - whether to stretch childrenpublic void setSpacing(int space)
space - the amount of space between childrenpublic void setStretchMinorAxis(boolean value)
matchWidth
field.setStretchMinorAxis in class OrderedLayoutvalue - whether children should be stretched in the minor axis.OrderedLayout.setStretchMinorAxis(boolean)public void setVertical(boolean flag)
flag - whether the orientation should be verticalCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.