Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Block Text Layout Flow Text Page Flow Block Layout...
Block Text Layout Flow Text Page Flow Block Layout... [message #219308] Tue, 11 July 2006 00:06 Go to next message
Eclipse UserFriend
Originally posted by: Daniel.Rozeboom.cda.canon.com

Hey all,

The title of this post is meant to illustrate how confused I am about
the text handling in GEF. I can't find any documentation of it anywhere,
and the Javadoc comments all seem pretty sparse (or maybe they're just
helpful to someone who is familiar with the architecture). For example, the
comment for "BlockFlow" might be something like "The block flow for text"
(not copied word for word, but hopefully you know what I mean).
What is the general hierarchy for text? What do I need to know about
these structures to efficiently utilize them? How do a FlowPage, BlockFlow,
TextFlow, etc... work together, and how do these correspond to my model? In
which areas of this hierarchy is there room to add customization (i.e.,
special types of 'blocks' or whatever)? In which objects do I need to set a
layout, and what are the purposes of the different layouts? Thanks in
advance.

- Daniel
Re: Block Text Layout Flow Text Page Flow Block Layout... [message #219350 is a reply to message #219308] Tue, 11 July 2006 14:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Containers:
FlowPage == the root figure for containing all other text-related figures
Block ~= <P>
Inline ~= <SPAN>

Leaf node:
TextFlow == the actual text

"Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
news:e8uq21$jea$1@utils.eclipse.org...
> Hey all,
>
> The title of this post is meant to illustrate how confused I am about
> the text handling in GEF. I can't find any documentation of it anywhere,
> and the Javadoc comments all seem pretty sparse (or maybe they're just
> helpful to someone who is familiar with the architecture). For example,
> the comment for "BlockFlow" might be something like "The block flow for
> text" (not copied word for word, but hopefully you know what I mean).
> What is the general hierarchy for text? What do I need to know about
> these structures to efficiently utilize them? How do a FlowPage,
> BlockFlow, TextFlow, etc... work together, and how do these correspond to
> my model? In which areas of this hierarchy is there room to add
> customization (i.e., special types of 'blocks' or whatever)? In which
> objects do I need to set a layout, and what are the purposes of the
> different layouts? Thanks in advance.
>
> - Daniel
>
Re: Block Text Layout Flow Text Page Flow Block Layout... [message #219366 is a reply to message #219350] Tue, 11 July 2006 16:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Daniel.Rozeboom.cda.canon.com

OK, thanks - I think that structure makes some sense. So it seems like
if you want to format a text flow (font, color), you have to nest it inside
an inline, and if you want to center it or whatnot, you have to nest it
inside a block.
What about layouts? Are you required to create and apply a layout for
each flowpage you construct, and/or each block or inline element? Right now
I've created a FlowPage that contains a BlockFlow that contains a few
TextFlows, and when I try to run this in an edit part as part of my editor,
I get the following exception:

Caused by: java.lang.NullPointerException
at
org.eclipse.draw2d.text.BlockFlowLayout.createNewLine(BlockF lowLayout.java:121)
at
org.eclipse.draw2d.text.FlowContainerLayout.getCurrentLine(F lowContainerLayout.java:75)
at
org.eclipse.draw2d.text.FlowContainerLayout.getRemainingLine Width(FlowContainerLayout.java:83)
at
org.eclipse.draw2d.text.BlockFlowLayout.getContextWidth(Bloc kFlowLayout.java:177)
at
org.eclipse.draw2d.text.BlockFlowLayout.setupBlock(BlockFlow Layout.java:222)
at
org.eclipse.draw2d.text.BlockFlowLayout.preLayout(BlockFlowL ayout.java:207)
at
org.eclipse.draw2d.text.FlowContainerLayout.layout(FlowConta inerLayout.java:97)
at
org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
at org.eclipse.draw2d.Figure.layout(Figure.java:1029)
at org.eclipse.draw2d.Figure.validate(Figure.java:1735)
at org.eclipse.draw2d.text.BlockFlow.validate(BlockFlow.java:30 0)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Viewport.validate(Viewport.java:363)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at
org.eclipse.draw2d.DeferredUpdateManager.performValidation(D eferredUpdateManager.java:192)
at
org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager.java:165)
at
org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(D eferredUpdateManager.java:46)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
.... 20 more

Any ideas what could be causing this? Thanks.

- Daniel

"Randy Hudson" <none@us.ibm.com> wrote in message
news:e90d69$f2h$1@utils.eclipse.org...
> Containers:
> FlowPage == the root figure for containing all other text-related figures
> Block ~= <P>
> Inline ~= <SPAN>
>
> Leaf node:
> TextFlow == the actual text
>
> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
> news:e8uq21$jea$1@utils.eclipse.org...
>> Hey all,
>>
>> The title of this post is meant to illustrate how confused I am about
>> the text handling in GEF. I can't find any documentation of it anywhere,
>> and the Javadoc comments all seem pretty sparse (or maybe they're just
>> helpful to someone who is familiar with the architecture). For example,
>> the comment for "BlockFlow" might be something like "The block flow for
>> text" (not copied word for word, but hopefully you know what I mean).
>> What is the general hierarchy for text? What do I need to know about
>> these structures to efficiently utilize them? How do a FlowPage,
>> BlockFlow, TextFlow, etc... work together, and how do these correspond to
>> my model? In which areas of this hierarchy is there room to add
>> customization (i.e., special types of 'blocks' or whatever)? In which
>> objects do I need to set a layout, and what are the purposes of the
>> different layouts? Thanks in advance.
>>
>> - Daniel
>>
>
>
Re: Block Text Layout Flow Text Page Flow Block Layout... [message #219374 is a reply to message #219366] Tue, 11 July 2006 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Everything must be inside a page, which is a special block that doesn't need
a parent block.

"Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
news:e90j6k$pnc$1@utils.eclipse.org...
> OK, thanks - I think that structure makes some sense. So it seems like
> if you want to format a text flow (font, color), you have to nest it
> inside an inline, and if you want to center it or whatnot, you have to
> nest it inside a block.
> What about layouts? Are you required to create and apply a layout for
> each flowpage you construct, and/or each block or inline element? Right
> now I've created a FlowPage that contains a BlockFlow that contains a few
> TextFlows, and when I try to run this in an edit part as part of my
> editor, I get the following exception:
>
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.draw2d.text.BlockFlowLayout.createNewLine(BlockF lowLayout.java:121)
> at
> org.eclipse.draw2d.text.FlowContainerLayout.getCurrentLine(F lowContainerLayout.java:75)
> at
> org.eclipse.draw2d.text.FlowContainerLayout.getRemainingLine Width(FlowContainerLayout.java:83)
> at
> org.eclipse.draw2d.text.BlockFlowLayout.getContextWidth(Bloc kFlowLayout.java:177)
> at
> org.eclipse.draw2d.text.BlockFlowLayout.setupBlock(BlockFlow Layout.java:222)
> at
> org.eclipse.draw2d.text.BlockFlowLayout.preLayout(BlockFlowL ayout.java:207)
> at
> org.eclipse.draw2d.text.FlowContainerLayout.layout(FlowConta inerLayout.java:97)
> at
> org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
> at org.eclipse.draw2d.Figure.layout(Figure.java:1029)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1735)
> at org.eclipse.draw2d.text.BlockFlow.validate(BlockFlow.java:30 0)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at org.eclipse.draw2d.Viewport.validate(Viewport.java:363)
> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
> at
> org.eclipse.draw2d.DeferredUpdateManager.performValidation(D eferredUpdateManager.java:192)
> at
> org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager.java:165)
> at
> org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(D eferredUpdateManager.java:46)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
> ... 20 more
>
> Any ideas what could be causing this? Thanks.
>
> - Daniel
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:e90d69$f2h$1@utils.eclipse.org...
>> Containers:
>> FlowPage == the root figure for containing all other text-related figures
>> Block ~= <P>
>> Inline ~= <SPAN>
>>
>> Leaf node:
>> TextFlow == the actual text
>>
>> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
>> news:e8uq21$jea$1@utils.eclipse.org...
>>> Hey all,
>>>
>>> The title of this post is meant to illustrate how confused I am about
>>> the text handling in GEF. I can't find any documentation of it
>>> anywhere, and the Javadoc comments all seem pretty sparse (or maybe
>>> they're just helpful to someone who is familiar with the architecture).
>>> For example, the comment for "BlockFlow" might be something like "The
>>> block flow for text" (not copied word for word, but hopefully you know
>>> what I mean).
>>> What is the general hierarchy for text? What do I need to know about
>>> these structures to efficiently utilize them? How do a FlowPage,
>>> BlockFlow, TextFlow, etc... work together, and how do these correspond
>>> to my model? In which areas of this hierarchy is there room to add
>>> customization (i.e., special types of 'blocks' or whatever)? In which
>>> objects do I need to set a layout, and what are the purposes of the
>>> different layouts? Thanks in advance.
>>>
>>> - Daniel
>>>
>>
>>
>
>
Re: Block Text Layout Flow Text Page Flow Block Layout... [message #219382 is a reply to message #219374] Tue, 11 July 2006 17:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Daniel.Rozeboom.cda.canon.com

I think that makes sense, I just am still confused on the rest of my issue.

If I create a FlowPage and return it as the figure for my edit part, things
work fine. However, it seems like I should be using a Block here too (maybe
that will give me more control over paragraph alignment and whatnot). So,
if I add a BlockFlow as a child to the FlowPage and then override
getFigure() in my edit part to return this BlockFlow instead of the FlowPage
(so that children will be added to the BlockFlow), I get the exception
below. Do you know why this might be? Thanks in advance.

- Daniel

"Randy Hudson" <none@us.ibm.com> wrote in message
news:e90mgo$cca$1@utils.eclipse.org...
> Everything must be inside a page, which is a special block that doesn't
> need a parent block.
>
> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
> news:e90j6k$pnc$1@utils.eclipse.org...
>> OK, thanks - I think that structure makes some sense. So it seems
>> like if you want to format a text flow (font, color), you have to nest it
>> inside an inline, and if you want to center it or whatnot, you have to
>> nest it inside a block.
>> What about layouts? Are you required to create and apply a layout for
>> each flowpage you construct, and/or each block or inline element? Right
>> now I've created a FlowPage that contains a BlockFlow that contains a few
>> TextFlows, and when I try to run this in an edit part as part of my
>> editor, I get the following exception:
>>
>> Caused by: java.lang.NullPointerException
>> at
>> org.eclipse.draw2d.text.BlockFlowLayout.createNewLine(BlockF lowLayout.java:121)
>> at
>> org.eclipse.draw2d.text.FlowContainerLayout.getCurrentLine(F lowContainerLayout.java:75)
>> at
>> org.eclipse.draw2d.text.FlowContainerLayout.getRemainingLine Width(FlowContainerLayout.java:83)
>> at
>> org.eclipse.draw2d.text.BlockFlowLayout.getContextWidth(Bloc kFlowLayout.java:177)
>> at
>> org.eclipse.draw2d.text.BlockFlowLayout.setupBlock(BlockFlow Layout.java:222)
>> at
>> org.eclipse.draw2d.text.BlockFlowLayout.preLayout(BlockFlowL ayout.java:207)
>> at
>> org.eclipse.draw2d.text.FlowContainerLayout.layout(FlowConta inerLayout.java:97)
>> at
>> org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
>> at org.eclipse.draw2d.Figure.layout(Figure.java:1029)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1735)
>> at org.eclipse.draw2d.text.BlockFlow.validate(BlockFlow.java:30 0)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at org.eclipse.draw2d.Viewport.validate(Viewport.java:363)
>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>> at
>> org.eclipse.draw2d.DeferredUpdateManager.performValidation(D eferredUpdateManager.java:192)
>> at
>> org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager.java:165)
>> at
>> org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(D eferredUpdateManager.java:46)
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>> ... 20 more
>>
>> Any ideas what could be causing this? Thanks.
>>
>> - Daniel
>>
>> "Randy Hudson" <none@us.ibm.com> wrote in message
>> news:e90d69$f2h$1@utils.eclipse.org...
>>> Containers:
>>> FlowPage == the root figure for containing all other text-related
>>> figures
>>> Block ~= <P>
>>> Inline ~= <SPAN>
>>>
>>> Leaf node:
>>> TextFlow == the actual text
>>>
>>> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
>>> news:e8uq21$jea$1@utils.eclipse.org...
>>>> Hey all,
>>>>
>>>> The title of this post is meant to illustrate how confused I am
>>>> about the text handling in GEF. I can't find any documentation of it
>>>> anywhere, and the Javadoc comments all seem pretty sparse (or maybe
>>>> they're just helpful to someone who is familiar with the architecture).
>>>> For example, the comment for "BlockFlow" might be something like "The
>>>> block flow for text" (not copied word for word, but hopefully you know
>>>> what I mean).
>>>> What is the general hierarchy for text? What do I need to know
>>>> about these structures to efficiently utilize them? How do a FlowPage,
>>>> BlockFlow, TextFlow, etc... work together, and how do these correspond
>>>> to my model? In which areas of this hierarchy is there room to add
>>>> customization (i.e., special types of 'blocks' or whatever)? In which
>>>> objects do I need to set a layout, and what are the purposes of the
>>>> different layouts? Thanks in advance.
>>>>
>>>> - Daniel
>>>>
>>>
>>>
>>
>>
>
>
Re: Block Text Layout Flow Text Page Flow Block Layout... [message #219391 is a reply to message #219382] Tue, 11 July 2006 18:43 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

FlowPage should support the same alignment as BlockFlow. But, never override
getFigure(). Override getContentsPane.

"Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
news:e90ogj$o9h$1@utils.eclipse.org...
>I think that makes sense, I just am still confused on the rest of my issue.
>
> If I create a FlowPage and return it as the figure for my edit part,
> things work fine. However, it seems like I should be using a Block here
> too (maybe that will give me more control over paragraph alignment and
> whatnot). So, if I add a BlockFlow as a child to the FlowPage and then
> override getFigure() in my edit part to return this BlockFlow instead of
> the FlowPage (so that children will be added to the BlockFlow), I get the
> exception below. Do you know why this might be? Thanks in advance.
>
> - Daniel
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:e90mgo$cca$1@utils.eclipse.org...
>> Everything must be inside a page, which is a special block that doesn't
>> need a parent block.
>>
>> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
>> news:e90j6k$pnc$1@utils.eclipse.org...
>>> OK, thanks - I think that structure makes some sense. So it seems
>>> like if you want to format a text flow (font, color), you have to nest
>>> it inside an inline, and if you want to center it or whatnot, you have
>>> to nest it inside a block.
>>> What about layouts? Are you required to create and apply a layout
>>> for each flowpage you construct, and/or each block or inline element?
>>> Right now I've created a FlowPage that contains a BlockFlow that
>>> contains a few TextFlows, and when I try to run this in an edit part as
>>> part of my editor, I get the following exception:
>>>
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.eclipse.draw2d.text.BlockFlowLayout.createNewLine(BlockF lowLayout.java:121)
>>> at
>>> org.eclipse.draw2d.text.FlowContainerLayout.getCurrentLine(F lowContainerLayout.java:75)
>>> at
>>> org.eclipse.draw2d.text.FlowContainerLayout.getRemainingLine Width(FlowContainerLayout.java:83)
>>> at
>>> org.eclipse.draw2d.text.BlockFlowLayout.getContextWidth(Bloc kFlowLayout.java:177)
>>> at
>>> org.eclipse.draw2d.text.BlockFlowLayout.setupBlock(BlockFlow Layout.java:222)
>>> at
>>> org.eclipse.draw2d.text.BlockFlowLayout.preLayout(BlockFlowL ayout.java:207)
>>> at
>>> org.eclipse.draw2d.text.FlowContainerLayout.layout(FlowConta inerLayout.java:97)
>>> at
>>> org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
>>> at org.eclipse.draw2d.Figure.layout(Figure.java:1029)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1735)
>>> at org.eclipse.draw2d.text.BlockFlow.validate(BlockFlow.java:30 0)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at org.eclipse.draw2d.Viewport.validate(Viewport.java:363)
>>> at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
>>> at
>>> org.eclipse.draw2d.DeferredUpdateManager.performValidation(D eferredUpdateManager.java:192)
>>> at
>>> org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager.java:165)
>>> at
>>> org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(D eferredUpdateManager.java:46)
>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>> ... 20 more
>>>
>>> Any ideas what could be causing this? Thanks.
>>>
>>> - Daniel
>>>
>>> "Randy Hudson" <none@us.ibm.com> wrote in message
>>> news:e90d69$f2h$1@utils.eclipse.org...
>>>> Containers:
>>>> FlowPage == the root figure for containing all other text-related
>>>> figures
>>>> Block ~= <P>
>>>> Inline ~= <SPAN>
>>>>
>>>> Leaf node:
>>>> TextFlow == the actual text
>>>>
>>>> "Daniel Rozeboom" <Daniel.Rozeboom@cda.canon.com> wrote in message
>>>> news:e8uq21$jea$1@utils.eclipse.org...
>>>>> Hey all,
>>>>>
>>>>> The title of this post is meant to illustrate how confused I am
>>>>> about the text handling in GEF. I can't find any documentation of it
>>>>> anywhere, and the Javadoc comments all seem pretty sparse (or maybe
>>>>> they're just helpful to someone who is familiar with the
>>>>> architecture). For example, the comment for "BlockFlow" might be
>>>>> something like "The block flow for text" (not copied word for word,
>>>>> but hopefully you know what I mean).
>>>>> What is the general hierarchy for text? What do I need to know
>>>>> about these structures to efficiently utilize them? How do a
>>>>> FlowPage, BlockFlow, TextFlow, etc... work together, and how do these
>>>>> correspond to my model? In which areas of this hierarchy is there
>>>>> room to add customization (i.e., special types of 'blocks' or
>>>>> whatever)? In which objects do I need to set a layout, and what are
>>>>> the purposes of the different layouts? Thanks in advance.
>>>>>
>>>>> - Daniel
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Previous Topic:Snap To Grid
Next Topic:Two Diagrams From Single Request
Goto Forum:
  


Current Time: Tue Apr 16 08:36:01 GMT 2024

Powered by FUDForum. Page generated in 0.19679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top