Java Reference
In-Depth Information
Figure 11-3
Flow layout
When changing the Force Single Line property to true , the generated
org.eclipse.draw2d.ToolbarLayout causes the elements to shrink as more
are added so that they fit on a single row. Note that they will not shrink below
their Minimum Size property, if set.
Setting the Major Alignment property to CENTER instead of the default
BEGINNING (top/left) for Major Alignment centers the inner elements either
horizontally or vertically, depending on the Vertical setting. No difference
exists between CENTER and FILL ; both generate code that uses FlowLayout.
ALIGN_CENTER .
Stack Layout
A Stack Layout causes elements to be added on top of one another, in the
order they are added. This works well with one element to center it in another,
as was the case with our Topic and Task labels in the mindmap and scenario
diagrams, respectively.
XY Layout
XY Layout enables you to place an element wherever you want. A diagram can-
vas typically has an XY Layout , as does the rectangle in Figure 11-4 where three
inner rectangles are positioned arbitrarily.
Figure 11-4
XY layout
 
Search WWH ::




Custom Search