[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] draw2d.text indent strategy
|
It is my desire to add various indenting strategies to a FlowFigure. I
started off with the standard techniques (i.e. MarginBorder) but it seems
that IFigure.getInsets() is only accounted for in FlowPage (and not in
BlockFlow, InlineFlow or TextFlow).
After a bit of research it seems that there are two points during which
"layout" (as it is needed for indenting) for a TextFlow occurs:
ParagraphTextLayout.layout (where a line is split into multiple lines as
necessary) and LineBox.commit (where a line's children are positioned).
Shrinking the available space that a line has based on getInsets() seems to
be trivial in ParagraphTextLayout. The problem comes in when laying out the
children fragments (FlowBoxes) in LineBox; LineBox knows nothing about the
FlowFigure from which it is derived so it cannot know about any indenting
strategy (e.g. getInsets()).
I am interested in the following:
o Is there already work going on for indenting strategies?
o Am I on the right track (i.e. do the locations that I've identified
represent the whole of the problem that I am attempting to solve)?
Thanks!
--
Rob Grzywinski