|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.AbstractLayout | +--org.eclipse.draw2d.AbstractHintLayout | +--org.eclipse.draw2d.FlowLayout
Lays our children in rows or columns, wrapping when the current row/column is filled. The aligment and spacing of rows in the parent can be configured. The aligment and spacing of children within a row can be configured.
Field Summary | |
static int |
ALIGN_CENTER
|
static int |
ALIGN_LEFTTOP
|
static int |
ALIGN_RIGHTBOTTOM
|
protected boolean |
fill
|
protected boolean |
horizontal
|
static boolean |
HORIZONTAL
|
protected int |
majorAlignment
|
protected int |
majorSpacing
|
protected int |
minorAlignment
|
protected int |
minorSpacing
|
protected Transposer |
transposer
|
static boolean |
VERTICAL
|
Fields inherited from class org.eclipse.draw2d.AbstractLayout |
preferredSize |
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 container,
int wHint,
int hHint)
Calculates the preferred size of the given figure, using width and height hints. |
protected Dimension |
getChildSize(IFigure child,
int wHint,
int hHint)
Provides the given child's preferred size |
int |
getMajorAlignment()
Returns the alignment used for an entire row/column. |
int |
getMajorSpacing()
Returns the spacing in pixels to be used between children in the direction parallel to the layout's orientation. |
int |
getMinorAlignment()
Returns the alignment used for children within a row/column. |
int |
getMinorSpacing()
Returns the spacing to be used between children within a row/column |
boolean |
isHorizontal()
Returns whether the orientation of the layout is horizontal or not. |
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. |
void |
layout(IFigure parent)
Lays out the given figure. |
protected void |
layoutRow(IFigure parent)
Layouts one row of components. |
protected void |
setBoundsOfChild(IFigure parent,
IFigure child,
Rectangle bounds)
Sets the given bounds for the child figure input. |
void |
setHorizontal(boolean flag)
Sets the orientation of the layout. |
void |
setMajorAlignment(int align)
Sets the alignment for an entire row/column within the parent figure. |
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 within a row/column. |
void |
setMinorSpacing(int n)
Sets the spacing to be used between children within a row/column. |
void |
setStretchMinorAxis(boolean value)
Sets flag based on layout orientation. |
Methods inherited from class org.eclipse.draw2d.AbstractHintLayout |
calculateMinimumSize, getMinimumSize, getPreferredSize, invalidate |
Methods inherited from class org.eclipse.draw2d.AbstractLayout |
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, 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 fill
protected Transposer transposer
protected int majorAlignment
protected int minorAlignment
protected int minorSpacing
protected int majorSpacing
Constructor Detail |
public FlowLayout()
FlowLayout(boolean)
public FlowLayout(boolean isHorizontal)
isHorizontal
- Whether the layout should be horizontal.Method Detail |
protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
AbstractLayout
calculatePreferredSize
in class AbstractLayout
container
- The figurewHint
- The width hinthHint
- The height hint
AbstractLayout.calculatePreferredSize(IFigure, int, int)
protected Dimension getChildSize(IFigure child, int wHint, int hHint)
child
- The Figure whose preferred size needs to be calculatedwHint
- The width hint to be used when calculating the child's preferred sizehHint
- The height hint to be used when calculating the child's preferred size
public int getMajorAlignment()
Possible values are :
setMajorAlignment(int)
public int getMajorSpacing()
public int getMinorAlignment()
Possible values are :
setMinorAlignment(int)
public int getMinorSpacing()
public boolean isHorizontal()
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 changesprotected boolean isSensitiveVertically(IFigure parent)
AbstractHintLayout
true
.
isSensitiveVertically
in class AbstractHintLayout
parent
- the layout's container
true
if this layout is sensite to vertical hint changesorg.eclipse.draw2d.AbstractHintLayout#isSensitiveVertically()
public void layout(IFigure parent)
LayoutManager
parent
- The figureLayoutManager.layout(IFigure)
protected 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 setStretchMinorAxis(boolean value)
value
- Fill state desired.public void setHorizontal(boolean flag)
flag
- Orientation of the layout.public void setMajorAlignment(int align)
Possible values are :
align
- Major alignment required.getMajorAlignment()
public void setMajorSpacing(int n)
n
- Amount of major space.setMinorSpacing(int)
public void setMinorAlignment(int align)
Possible values are :
align
- Minor alignment required.getMinorAlignment()
public void setMinorSpacing(int n)
n
- Amount of minor space.setMajorSpacing(int)
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |