start connection on mouse click [message #242220] |
Tue, 08 April 2008 12:36 |
Eclipse User |
|
|
|
Originally posted by: christianstre.gmx.de
Hello,
I'm trying to start a connection when clicking a node. The problem is
that selection and dragging of nodes must be available too. So it should
only happen when clicking a special part of the node (for example some
small rectangles on the edges).
I don't know how to start. I could paint the "start connection
rectangles" on the figures, but then I would have to check the
coordinates of the click by myself. There must be a better way.
Somebody has an idea or an example?
(Drag'n'drop instead of clicking source and target separately would be
okay too.)
Thanks.
|
|
|
|
Re: start connection on mouse click [message #242244 is a reply to message #242238] |
Tue, 08 April 2008 19:42 |
Eclipse User |
|
|
|
Originally posted by: christianstre.gmx.de
Hello Anthony,
in the Shapes Editor it could be something like this:
I create two rectangles. This rectangles should have a (visible) spot in
their center. When I click this spot a "dashed connection" will be
started. A second click on the second shape will complete the connection.
This should also work if I have selected the selection tool instead
of the connection tool.
My intention is to keep the control simple and have only one tool
instead of two (one for selections and one for connections).
My questions are:
How should I implement the spots in the center of the shapes?
How can I notice a click on the spot (not on the shape)?
And how can I switch to the connection tool and back to the selection
tool afterwards?
Thanks.
Christian.
Anthony Hunter wrote:
> Hi Christian,
>
> Can you describe the problem comparing to what is demonstrated in the GEF
> Shapes example?
>
> Cheers...
> Anthony
>
> "Christian Strempfer" <christianstre@gmx.de> wrote in message
> news:ftfouc$oi7$1@build.eclipse.org...
>> Hello,
>> I'm trying to start a connection when clicking a node. The problem is that
>> selection and dragging of nodes must be available too. So it should only
>> happen when clicking a special part of the node (for example some small
>> rectangles on the edges).
>>
>> I don't know how to start. I could paint the "start connection rectangles"
>> on the figures, but then I would have to check the coordinates of the
>> click by myself. There must be a better way.
>>
>> Somebody has an idea or an example?
>>
>> (Drag'n'drop instead of clicking source and target separately would be
>> okay too.)
>>
>> Thanks.
>
>
|
|
|
|
Re: start connection on mouse click [message #242280 is a reply to message #242256] |
Wed, 09 April 2008 07:29 |
Eclipse User |
|
|
|
Originally posted by: christianstre.gmx.de
I could use that, but the edit parts must be movable. So I still have to
differ between clicks on the special spots and clicks on the edit part
itself.
Prakash G.R. wrote:
> ConnectionDragCreationTool is what you looking for?
>
|
|
|
|
Re: start connection on mouse click [message #242306 is a reply to message #242220] |
Wed, 09 April 2008 17:44 |
Eclipse User |
|
|
|
Originally posted by: shady_86.sify.com
did you see the logic example? they have small props on the edge of the figure on which only the connection would start or terminate, well that will not solve the whole thing you are searching for but will solve some of the parts of your doubt..,
|
|
|
Powered by
FUDForum. Page generated in 0.04304 seconds