Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF or Draw2D
GEF or Draw2D [message #200281] Fri, 21 October 2005 10:43 Go to next message
Eclipse UserFriend
Originally posted by: yulian.crimsonlogic.com

Hi,All

I am new to GEF and now I am considering about whether I should use GEF in
my application.

Here is my scenario: I have a tree listing some concepts and relations. A
relation my have several concepts involved. A concept have several
relations that use it. I want to display this kind of relation in a
canvas. That is, when I select a concept, I want to the canvas to disply
the concept node in the center, and all the relation nodes that use it
will be displayed around it. Similar when the relation is selected. And
also, I want to add concepts dynamically. When I drag a concept from the
tree to the diagram, I want to the concept to be added in the diagram
around the relation node. Furture, if I double click to click some part of
the concept, I want the concept node to expand, all the relations it used
will come out.

Is it too far for Draw2D? I am not sure whether I can detect "double
click" or "selection" in draw2D objects. But it seems for me that the GEF
is more for moving shapes in the diagram around, and connect them and
disconnect them.

Any opinions will be very much appreciated.

Yulian
Re: GEF or Draw2D [message #200297 is a reply to message #200281] Fri, 21 October 2005 12:06 Go to previous message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
Hi,
> Is it too far for Draw2D? I am not sure whether I can detect "double
> click" or "selection" in draw2D objects. But it seems for me that the GEF
> is more for moving shapes in the diagram around, and connect them and
> disconnect them.

If you need to check if user clicked at your figuer you can add mouse
listener to your figure (see org.eclipse.draw2d.IFigure)
addMouseListener(MouseListener listener) method.

If you need to keep the selection you need to implement some selection like
listener which you create entirely from the scratch. And GEF has already
support for it, because Draw2D has no direct support for it.

If you in future need to add some additional features I recommend you to use
GEF.

Thanks,
John Cage
Previous Topic:DND Problem: What is being dragged?
Next Topic:Connections stop one pixel short of node
Goto Forum:
  


Current Time: Fri Apr 26 16:19:05 GMT 2024

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

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

Back to the top