Moveable Connection anchors [message #206726] |
Thu, 05 January 2006 18:34 |
Eclipse User |
|
|
|
Originally posted by: harsh.ti.com
All,
Is it possible to creat movable connection anchors within a figure? What
I want to do is allow the user to move the anchor along the path of the
outline border of the figure?
Thank you,
Harsh
|
|
|
Re: Moveable Connection anchors [message #206805 is a reply to message #206726] |
Fri, 06 January 2006 17:22 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
Hi,
all I can say right now is: yes, it is! However, as I did not implement
this myself, I cannot give you the details. My best advice is to look
around for some (open source) example plugin that has this feature.
christian
harsh wrote:
> All,
>
> Is it possible to creat movable connection anchors within a figure?
> What I want to do is allow the user to move the anchor along the path of
> the outline border of the figure?
>
> Thank you,
> Harsh
>
|
|
|
|
Re: Moveable Connection anchors [message #206824 is a reply to message #206814] |
Fri, 06 January 2006 21:02 |
Eclipse User |
|
|
|
Originally posted by: harsh.ti.com
Thank you Hannes.
As for the orientation, it is based on a static pointlist. The graphics
then uses this to fill and draw the polygon. Here is a code snippet..
static {
topConnector.addPoint(-2, 0);
topConnector.addPoint(1, 0);
topConnector.addPoint(2, 1);
topConnector.addPoint(2, 5);
topConnector.addPoint(-1, 5);
topConnector.addPoint(-1, 1);
bottomConnector.addPoint(-2, -1);
bottomConnector.addPoint(1, -1);
bottomConnector.addPoint(2, -2);
bottomConnector.addPoint(2, -6);
bottomConnector.addPoint(-1, -6);
bottomConnector.addPoint(-1, -2);
}
|
|
|
Re: Moveable Connection anchors [message #206829 is a reply to message #206814] |
Fri, 06 January 2006 22:11 |
Eclipse User |
|
|
|
Originally posted by: harsh.ti.com
Hannes,
Have you implemented something similar? If so, do you mind sending me a
code snippet? Also, don't you have to extend the AbstractConnectionAnchor
and in your connection anchor have a setLocation method?
Also, ConnectionAnchors must have a figure as their owner. I am assuming
the figure then will also have to do the HitTest to see if the new
location region matches the outline of your figure correct? Also, do your
figures have a border?
Thank you,
Harsh
|
|
|
|
Re: Moveable Connection anchors [message #206909 is a reply to message #206845] |
Sun, 08 January 2006 19:38 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
I am quite sure Hannes can post the code, if you just wait a little..
el_bosso@gmx.de wrote:
> Hi,
>
> Look at the ChopBoxAnchor (that's what I did) and try to understand how this
> Anchor works. I added a setLocation method to the anchor and checked the
> given position with the figure border.
>
> Sorry can't give you any code, 'cause I wrote that for a non Open source
> project.
>
> Hannes
>
> Harsh wrote:
>
>> Hannes,
>>
>> Have you implemented something similar? If so, do you mind sending me a
>> code snippet? Also, don't you have to extend the AbstractConnectionAnchor
>> and in your connection anchor have a setLocation method?
>>
>> Also, ConnectionAnchors must have a figure as their owner. I am assuming
>> the figure then will also have to do the HitTest to see if the new
>> location region matches the outline of your figure correct? Also, do your
>> figures have a border?
>>
>> Thank you,
>> Harsh
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03525 seconds