|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.draw2d.AbstractLayout
|
+--org.eclipse.draw2d.FlowLayout
Implements the ILayoutManager interface using the Flow Layout algorithm. This displays the components of the container figure in an ordered list. The components can also be aligned in different ways within the available space.
| Field Summary | |
static int |
ALIGN_CENTER
|
static int |
ALIGN_LEFTTOP
|
static int |
ALIGN_RIGHTBOTTOM
|
protected boolean |
fFill
|
protected boolean |
horizontal
|
static boolean |
HORIZONTAL
|
protected int |
majorAlignment
|
protected int |
minorAlignment
|
protected Transposer |
transposer
|
static boolean |
VERTICAL
|
| Constructor Summary | |
FlowLayout()
Constructs a FlowLayout with horizontal orientation. |
|
FlowLayout(boolean isHorizontal)
Constructs a FlowLayout whose orientation is given in the input. |
|
| Method Summary | |
protected Dimension |
calculatePreferredSize(IFigure parent)
Calculates and returns the preferred size of the container given as input. |
int |
getMajorAlignment()
Returns the alignment along the major orientation of the layout. |
int |
getMinorAlignment()
Returns the alignment of the layout perpendicular to the orientation of the layout. |
boolean |
isHorizontal()
Returns whether the orientation of the layout is horizontal or not. |
void |
layout(IFigure parent)
Lays out the given figure. |
protected void |
layoutRow(IFigure parent)
Layouts one row of components. |
void |
setAlignment(int align)
Deprecated. Use specific major, minor alignment approaches. |
protected void |
setBoundsOfChild(IFigure parent,
IFigure child,
Rectangle bounds)
Sets the given bounds for the child figure input. |
void |
setFill(boolean value)
Sets flag based on layout orientation. |
void |
setHorizontal(boolean flag)
Sets the orientation of the layout. |
void |
setMajorAlignment(int align)
Sets the alignment required along the orientation direction set. |
void |
setMajorSpacing(int n)
Sets the spacing in pixels to be used between children in the direction parallel to the layout's orientation. |
void |
setMinorAlignment(int align)
Sets the alignment to be used between children perpendicular to the orientation of the layout. |
void |
setMinorSpacing(int n)
Sets the spacing to be used between children perpendicular to the orientation of the layout. |
| Methods inherited from class org.eclipse.draw2d.AbstractLayout |
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, remove, setConstraint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ALIGN_CENTER
public static final int ALIGN_LEFTTOP
public static final int ALIGN_RIGHTBOTTOM
public static final boolean HORIZONTAL
public static final boolean VERTICAL
protected boolean horizontal
protected boolean fFill
protected Transposer transposer
protected int majorAlignment
protected int minorAlignment
| Constructor Detail |
public FlowLayout()
FlowLayout(boolean)public FlowLayout(boolean isHorizontal)
isHorizontal - Whether the layout should be horizontal.| Method Detail |
protected Dimension calculatePreferredSize(IFigure parent)
calculatePreferredSize in class AbstractLayoutfigure - Figure whose preferred size is required.public int getMajorAlignment()
setMajorAlignment(int),
setMinorAlignment(int),
getMinorAlignment()public int getMinorAlignment()
setMajorAlignment(int),
setMinorAlignment(int),
getMajorAlignment()public boolean isHorizontal()
public void layout(IFigure parent)
LayoutManagerprotected void layoutRow(IFigure parent)
parent - Figure whose children are to be placed.
protected void setBoundsOfChild(IFigure parent,
IFigure child,
Rectangle bounds)
parent - Parent Figure which holds the child.child - Child Figure whose bounds are to be set.bounds - The size of the child to be set.public void setFill(boolean value)
value - Fill state desired.public void setHorizontal(boolean flag)
flag - Orientation of the layout.public void setMajorAlignment(int align)
align - Major alignment required.setMinorAlignment(int),
getMinorAlignment(),
getMajorAlignment()public void setMajorSpacing(int n)
n - Amount of major space.setMinorSpacing(int)public void setMinorAlignment(int align)
align - Minor alignment required.setMajorAlignment(int),
getMinorAlignment(),
getMajorAlignment()public void setMinorSpacing(int n)
n - Amount of minor space.setMajorSpacing(int)public void setAlignment(int align)
setMajorAlignment(int),
setMinorAlignment(int),
getMinorAlignment(),
getMajorAlignment()
|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||