Re: HelloGef1 on Wiki [message #100647] |
Sat, 18 October 2003 23:56  |
Eclipse User |
|
|
|
Originally posted by: chhil.hotmail.com
Hello,
[Apologies if this gets posted twice...]
I am using 2.1.2 GEF 2.1.1
I was going through the example and had a couple of questions.
These are very helpful for beginners like me...thank you.
1.In the HelloTopEditpart.createfigure method has a comment ...
// Don't know why, but if you don't setOpaque(true), you cannot move
by drag&drop!
f.setOpaque(true);
If I comment the above line I am can still drag and drop was this a bug
that has been fixed?
2. HelloGefEditor.configureGraphicalViewer has a comment
// If you don't put this line, then moving figures by drag & drop
// above the left or top limit of the editor window will lead to
// an infinite loop!
((FigureCanvas)viewer.getControl()).setScrollBarVisibility(F igureCanvas.ALWAYS);
If I comment the above line I don't see the effect of an infinite loop
as I see scrollbars scrolling and eventually stop if I drop it outside
the top of the editor.
Is this also fixed.
I also had to change the plugin.xml to add the class="" attribute for
the plugin tag.
If these changes are valid can these be updated on the wiki.
Regards Chhil
|
|
|
Re: HelloGef1 on Wiki [message #102185 is a reply to message #100647] |
Mon, 27 October 2003 08:06   |
Eclipse User |
|
|
|
That's very interesting. I used the HelloGef examples to introduce myself
to GEF too and updated them to work with GEF 2.1+. (I still haven't
figured out how to get HelloGEF6 to work - the palette api seems to have
changed considerably).
I find that often (not always), regardless of the scrollbarVisibility
setting - an infinite loop will still occur when dragging items off ANY
edge of the canvas. This is evident in the Omondo UML plugin (which uses
GEF) too. However, the logic example seems fine.
I'm not really sure what setOpaque is really supposed to do...I think the
idea is that the FreeformLayer becomes concrete rather than letting the
layer below handle the mouse events etc...
If you can find out anymore, please post your findings.
The wiki is open, if you want to update it, you can.
I'm working simultaneously in Eclipse 2.0.2+GEF 2.1.0, 3.0M3+GEF 2.1.1,
Linux and Solaris motif.
Thanks
Chris
Chhil wrote:
> Hello,
> [Apologies if this gets posted twice...]
> I am using 2.1.2 GEF 2.1.1
> I was going through the example and had a couple of questions.
> These are very helpful for beginners like me...thank you.
> 1.In the HelloTopEditpart.createfigure method has a comment ...
> // Don't know why, but if you don't setOpaque(true), you cannot move
> by drag&drop!
> f.setOpaque(true);
> If I comment the above line I am can still drag and drop was this a bug
> that has been fixed?
> 2. HelloGefEditor.configureGraphicalViewer has a comment
> // If you don't put this line, then moving figures by drag & drop
> // above the left or top limit of the editor window will lead to
> // an infinite loop!
>
((FigureCanvas)viewer.getControl()).setScrollBarVisibility(F igureCanvas.ALWAYS);
> If I comment the above line I don't see the effect of an infinite loop
> as I see scrollbars scrolling and eventually stop if I drop it outside
> the top of the editor.
> Is this also fixed.
> I also had to change the plugin.xml to add the class="" attribute for
> the plugin tag.
> If these changes are valid can these be updated on the wiki.
> Regards Chhil
|
|
|
|
|
Re: HelloGef1 on Wiki [message #102379 is a reply to message #102185] |
Mon, 27 October 2003 20:17   |
Eclipse User |
|
|
|
Originally posted by: chhil_._hotmail.com
I have not had much time to try the other examples yet. I will
definitely post my findings.
Chhil
Chris Heald wrote:
> That's very interesting. I used the HelloGef examples to introduce myself
> to GEF too and updated them to work with GEF 2.1+. (I still haven't
> figured out how to get HelloGEF6 to work - the palette api seems to have
> changed considerably).
> I find that often (not always), regardless of the scrollbarVisibility
> setting - an infinite loop will still occur when dragging items off ANY
> edge of the canvas. This is evident in the Omondo UML plugin (which uses
> GEF) too. However, the logic example seems fine.
>
> I'm not really sure what setOpaque is really supposed to do...I think the
> idea is that the FreeformLayer becomes concrete rather than letting the
> layer below handle the mouse events etc...
>
> If you can find out anymore, please post your findings.
>
> The wiki is open, if you want to update it, you can.
>
> I'm working simultaneously in Eclipse 2.0.2+GEF 2.1.0, 3.0M3+GEF 2.1.1,
> Linux and Solaris motif.
>
> Thanks
> Chris
>
> Chhil wrote:
>
>
>>Hello,
>
>
>> [Apologies if this gets posted twice...]
>
>
>> I am using 2.1.2 GEF 2.1.1
>> I was going through the example and had a couple of questions.
>> These are very helpful for beginners like me...thank you.
>
>
>> 1.In the HelloTopEditpart.createfigure method has a comment ...
>
>
>> // Don't know why, but if you don't setOpaque(true), you cannot move
>> by drag&drop!
>> f.setOpaque(true);
>> If I comment the above line I am can still drag and drop was this a bug
>> that has been fixed?
>
>
>> 2. HelloGefEditor.configureGraphicalViewer has a comment
>
>
>> // If you don't put this line, then moving figures by drag & drop
>> // above the left or top limit of the editor window will lead to
>> // an infinite loop!
>
>
>
> ((FigureCanvas)viewer.getControl()).setScrollBarVisibility(F igureCanvas.ALWAYS);
>
>
>
>
>> If I comment the above line I don't see the effect of an infinite loop
>> as I see scrollbars scrolling and eventually stop if I drop it outside
>> the top of the editor.
>
>
>> Is this also fixed.
>
>
>> I also had to change the plugin.xml to add the class="" attribute for
>> the plugin tag.
>
>
>> If these changes are valid can these be updated on the wiki.
>
>
>> Regards Chhil
>
>
>
|
|
|
|
Re: HelloGef6 2.1 on Wiki [message #102550 is a reply to message #102522] |
Tue, 28 October 2003 11:22  |
Eclipse User |
|
|
|
Originally posted by: jpl.remotejava.com
Chris Heald wrote:
> Doesn't compile in Eclipse 2.0.2 (Solaris motif) since there's no
> PaletteRoot.setChildren() in GEF 2.1.0.
> In Eclipse 3.0M3 and GEF 2.1.1 (also solaris motif) it compiles and runs
> fine.
I think it is only important that those introductory examples work with
the current version of GEF. I can see no reason why someone introducing
herself or himself to GEF would want to do it using an older version.
> Interestingly, I have noticed the same bug that I have in my own GEF
> applciation. The connect tool (actually the marquee tool is the same in yr
> Hello6) will not deactivate on a right-click. It's necessary to choose a
> new tool. Do you know how to change this?
You don't have to choose a new tool - you can also hit ESC. Or you could
click the left mouse button somewhere on the diagram background.
You can override ConnectionCreationTool.handleButtonUp and add the
following condition:
if (isInState(STATE_CONNECTION_STARTED) && button == 3)
{
setState(STATE_INVALID);
handleInvalidInput();
}
It seems that the intuitive 'right button cancels connection creation'
behavior is not an official feature, and that it works in the Logic
example only by coincidence because it has a context menu.
-JPL
|
|
|
Powered by
FUDForum. Page generated in 0.04099 seconds