|
Draw2d 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractHintLayout
org.eclipse.draw2d.OrderedLayout
org.eclipse.draw2d.ToolbarLayout
public class ToolbarLayout
Arranges figures in a single row or column. Orientation can be set to produce either a row or column layout. This layout tries to fit all children within the parent's client area. To do this, it compresses the children by some amount, but will not compress them smaller than their minimum size. If a child's preferred size is smaller than the row's or column's minor dimension, the layout can be configured to stretch the child.
Field Summary | |
---|---|
static boolean |
HORIZONTAL
Deprecated. Unused. |
protected boolean |
matchWidth
Deprecated. Use OrderedLayout.setStretchMinorAxis(boolean) and
OrderedLayout.isStretchMinorAxis() instead. |
protected int |
spacing
Deprecated. Use getSpacing() and setSpacing(int)
instead. |
static boolean |
VERTICAL
Deprecated. Unused. |
Fields inherited from class org.eclipse.draw2d.OrderedLayout |
---|
ALIGN_BOTTOMRIGHT, ALIGN_CENTER, ALIGN_TOPLEFT, horizontal, minorAlignment, transposer |
Fields inherited from class org.eclipse.draw2d.AbstractLayout |
---|
isObservingVisibility, preferredSize |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. use setStretchMinorAxis(boolean) |
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. |
Methods inherited from class org.eclipse.draw2d.OrderedLayout |
---|
getMinorAlignment, isHorizontal, setHorizontal, setMinorAlignment |
Methods inherited from class org.eclipse.draw2d.AbstractHintLayout |
---|
getMinimumSize, getPreferredSize, invalidate |
Methods inherited from class org.eclipse.draw2d.AbstractLayout |
---|
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean HORIZONTAL
public static final boolean VERTICAL
protected boolean matchWidth
OrderedLayout.setStretchMinorAxis(boolean)
and
OrderedLayout.isStretchMinorAxis()
instead.
protected int spacing
getSpacing()
and setSpacing(int)
instead.
Constructor Detail |
---|
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 horizontallyMethod Detail |
---|
protected Dimension calculateMinimumSize(IFigure container, int wHint, int hHint)
calculateMinimumSize
in class AbstractHintLayout
container
- 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 AbstractLayout
container
- 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 hint
protected Dimension getChildPreferredSize(IFigure child, int wHint, int hHint)
child
- the figure whose preferred size is to be determinedwHint
- the width hinthHint
- the height hint
protected int getDefaultOrientation()
PositionConstants.VERTICAL
by default.
getDefaultOrientation
in class OrderedLayout
PositionConstants.HORIZONTAL
or
PositionConstants.VERTICAL
OrderedLayout.getDefaultOrientation()
public int getSpacing()
protected boolean isSensitiveHorizontally(IFigure parent)
AbstractHintLayout
true
.
isSensitiveHorizontally
in class AbstractHintLayout
parent
- the layout's container
true
if this layout is sensite to horizontal hint
changesAbstractHintLayout.isSensitiveHorizontally(IFigure)
protected boolean isSensitiveVertically(IFigure parent)
AbstractHintLayout
true
.
isSensitiveVertically
in class AbstractHintLayout
parent
- the layout's container
true
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 OrderedLayout
OrderedLayout.isStretchMinorAxis()
public void layout(IFigure parent)
LayoutManager
parent
- 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 OrderedLayout
value
- whether children should be stretched in the minor axis.OrderedLayout.setStretchMinorAxis(boolean)
public void setVertical(boolean flag)
OrderedLayout.setHorizontal(boolean)
with argument
false
instead.
flag
- whether the orientation should be vertical
|
Draw2d 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |