[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: draw2d.text indent strategy
|
> Having this inlined BlockFlow would allow me to do:
>
> +--------+
> Before text | Inline | After text
> | Block |
> | Flow |
> | Text |
> +--------+
By removing context.endLine() in BlockFlowLayout's endBlock() and
setupBlock() I have approximated the above functionality (except that the
vertical alignment is "align bottom" rather than "align top" as it appears
above). So in theory this is all possible.
But I uncovered another "really really want": Once this inline BlockFlow
functionality is realized then one desires control over the width (and
possibly height) of it. Using the above picture as an example, without this
control, the "Inline Block Flow Text" will alway be on one line (if allowed
by the parent FlowPage). You would like to be able to do this as you do
with other Figures (i.e. via fadoodling with getPreferredSize()).
Unfortunately all of the FlowFigures (excluding FlowPage) control their
dimensions via their FlowBox which is not wired to getPreferredSize().
Getting at the necessary goop by subclassing alone is not possible. You can
emulate the desired functionality by setting setRecommendedSize() in
BlockFlowLayout.setupBlock() to the desired width.
All of this rambling is outlining the desire to have Figure-like control
over BlockFlow's dimensions.
--
Rob Grzywinski