Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Live drawing
Live drawing [message #229821] Thu, 25 January 2007 15:11 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
This may be simply an issue with GMF, but I'm wondering wether and if
so how GEF supports live drawing? That is, when I drag or resize a
node, I want to see the paint updated continuosly as opposed to simply
an outline.
Re: Live drawing [message #229829 is a reply to message #229821] Thu, 25 January 2007 16:55 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
From looking at the examples, I think you have to do the drawing by
yourself if you want such an effect.

Nhu

Miles Parker wrote:
>
> This may be simply an issue with GMF, but I'm wondering wether and if so
> how GEF supports live drawing? That is, when I drag or resize a node, I
> want to see the paint updated continuosly as opposed to simply an outline.
>
Re: Live drawing [message #229854 is a reply to message #229829] Thu, 25 January 2007 17:58 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Yeah, that's what I thought. :( Not having this makes the user
experience feel really outdated I think.. Do you mean that there are
examples of supporting live updates? If so I couldn't find anything,
would you mind posting a link?

On 2007-01-25 11:55:08 -0500, Nhu Le <nle.misc@gmail.com> said:

> From looking at the examples, I think you have to do the drawing by
> yourself if you want such an effect.
>
> Nhu
>
> Miles Parker wrote:
>>
>> This may be simply an issue with GMF, but I'm wondering wether and if
>> so how GEF supports live drawing? That is, when I drag or resize a
>> node, I want to see the paint updated continuosly as opposed to simply
>> an outline.
Re: Live drawing [message #229867 is a reply to message #229854] Thu, 25 January 2007 19:47 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
In my application, I only implemented full object drawing drag. I
basically use the original figure as a delegate object and draw on the
feedback graphics object. As far as resizing, I think it's more
difficult because you would have to actually modify the original figure
(unlike asking it to draw on another graphics object). I couldn't find
a good way to copy a figure.

Nhu

Miles Parker wrote:
>
> Yeah, that's what I thought. :( Not having this makes the user
> experience feel really outdated I think.. Do you mean that there are
> examples of supporting live updates? If so I couldn't find anything,
> would you mind posting a link?
>
> On 2007-01-25 11:55:08 -0500, Nhu Le <nle.misc@gmail.com> said:
>
>> From looking at the examples, I think you have to do the drawing by
>> yourself if you want such an effect.
>>
>> Nhu
>>
>> Miles Parker wrote:
>>>
>>> This may be simply an issue with GMF, but I'm wondering wether and if
>>> so how GEF supports live drawing? That is, when I drag or resize a
>>> node, I want to see the paint updated continuosly as opposed to
>>> simply an outline.
>
>
Re: Live drawing [message #229877 is a reply to message #229867] Thu, 25 January 2007 20:07 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Thanks, that's a good idea and very helpful. I'm guessing that it is
the way that editing command's are implemented that makes this
non-trivial.. I'm assuming that you made these changes in generated
class(es) and not templates. For resize it might work to clone the
figure..I'll take a look.

Perhaps I'll put in a feature request for this in bugzilla, as I'd
argue that its a _really_ important distinguishing feature for L&F
though I can understand that for a lot of folks it woudln't be high on
the list.

On 2007-01-25 14:47:00 -0500, Nhu Le <nle.misc@gmail.com> said:

> In my application, I only implemented full object drawing drag. I
> basically use the original figure as a delegate object and draw on the
> feedback graphics object. As far as resizing, I think it's more
> difficult because you would have to actually modify the original figure
> (unlike asking it to draw on another graphics object). I couldn't find
> a good way to copy a figure.
>
> Nhu
>
> Miles Parker wrote:
>>
>> Yeah, that's what I thought. :( Not having this makes the user
>> experience feel really outdated I think.. Do you mean that there are
>> examples of supporting live updates? If so I couldn't find anything,
>> would you mind posting a link?
>>
>> On 2007-01-25 11:55:08 -0500, Nhu Le <nle.misc@gmail.com> said:
>>
>>> From looking at the examples, I think you have to do the drawing by
>>> yourself if you want such an effect.
>>>
>>> Nhu
>>>
>>> Miles Parker wrote:
>>>>
>>>> This may be simply an issue with GMF, but I'm wondering wether and if
>>>> so how GEF supports live drawing? That is, when I drag or resize a
>>>> node, I want to see the paint updated continuosly as opposed to simply
>>>> an outline.
Re: Live drawing [message #229882 is a reply to message #229877] Thu, 25 January 2007 20:28 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
Cloning a figure is non-trivial. Someone asked on the newsgroup before
but I couldn't find anything useful on that topic.

I am using GEF directly so I don't know of any generated
class/templates. In my policies (createDragSourceFeedbackFigure method)

ArtifactFeedbackFigure artifactFeedbackFigure = new
ArtifactFeedbackFigure(referenceFigure);

Then in the paintFigure(Graphics g) of ArtifactFeedbackFigure, I call
referenceFigure.paint(g);

Nhu

Miles Parker wrote:
>
> Thanks, that's a good idea and very helpful. I'm guessing that it is the
> way that editing command's are implemented that makes this non-trivial..
> I'm assuming that you made these changes in generated class(es) and not
> templates. For resize it might work to clone the figure..I'll take a look.
>
> Perhaps I'll put in a feature request for this in bugzilla, as I'd argue
> that its a _really_ important distinguishing feature for L&F though I
> can understand that for a lot of folks it woudln't be high on the list.
>
> On 2007-01-25 14:47:00 -0500, Nhu Le <nle.misc@gmail.com> said:
>
>> In my application, I only implemented full object drawing drag. I
>> basically use the original figure as a delegate object and draw on the
>> feedback graphics object. As far as resizing, I think it's more
>> difficult because you would have to actually modify the original
>> figure (unlike asking it to draw on another graphics object). I
>> couldn't find a good way to copy a figure.
>>
>> Nhu
>>
>> Miles Parker wrote:
>>>
>>> Yeah, that's what I thought. :( Not having this makes the user
>>> experience feel really outdated I think.. Do you mean that there are
>>> examples of supporting live updates? If so I couldn't find anything,
>>> would you mind posting a link?
>>>
>>> On 2007-01-25 11:55:08 -0500, Nhu Le <nle.misc@gmail.com> said:
>>>
>>>> From looking at the examples, I think you have to do the drawing by
>>>> yourself if you want such an effect.
>>>>
>>>> Nhu
>>>>
>>>> Miles Parker wrote:
>>>>>
>>>>> This may be simply an issue with GMF, but I'm wondering wether and
>>>>> if so how GEF supports live drawing? That is, when I drag or resize
>>>>> a node, I want to see the paint updated continuosly as opposed to
>>>>> simply an outline.
>
>
Re: Live drawing [message #229933 is a reply to message #229821] Fri, 26 January 2007 18:23 Go to previous message
Eclipse UserFriend
Originally posted by: none.ibm.com

Implementing live drawing is as simple as just changing the figure's
constraint when asked to show feedback, instead of adding the XOR rectangle
to the feedback layer. However, this only works for a subset of GEF
applications. If you need to support reparenting, then the "live" figure
can not paint outside of its current parent. Also, live feedback doesn't
make sense when cloning something by holding down the CTRL key. In that
case, the user is creating a copy of what is being dragged, and the original
should not disappear. Live feedback can also cause problems with certain
layouts.

"Miles Parker" <milesparker@gmail.com> wrote in message
news:epahar$2on$1@utils.eclipse.org...
>
> This may be simply an issue with GMF, but I'm wondering wether and if so
> how GEF supports live drawing? That is, when I drag or resize a node, I
> want to see the paint updated continuosly as opposed to simply an outline.
>
Previous Topic:Sophisticated LayoutManager
Next Topic:What do bendpoints numbers mean in the XML
Goto Forum:
  


Current Time: Fri Apr 19 09:08:30 GMT 2024

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

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

Back to the top