Controlling Polyline Connections [message #117041] |
Wed, 11 February 2004 14:20  |
Eclipse User |
|
|
|
Originally posted by: phil.williams.toadmail.com
I am able to make connections between elements within a GEF editor just
fine. But what I want to be able to do is control how the connections
get drawn between them a little more. All of my elements have
connection anchor that act as a source on the right of the figure and
anchors acting as targets on the left. In some instances, when a new
connection is made the connection for the target comes in from the top.
Is there a way to constrain the connection so it always comes in from
the right? I am using the default Manhattan router.
TIA,
Phil
|
|
|
|
|
|
Re: Controlling Polyline Connections [message #117426 is a reply to message #117388] |
Thu, 12 February 2004 13:37   |
Eclipse User |
|
|
|
Originally posted by: phil.williams.toadmail.com
This is a multi-part message in MIME format.
--------------040208080605050309060601
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I have a ConnectionAnchor and it is on the right of the figure. The
problem is that sometimes the connections comes in "at the top of" the
connection anchor rather than the right of the anchor.
something like this ( [] is the anchor)
|
|
\ /
[]
but I always want it to be
--->[]
Does that make sense?
Phil
Randy Hudson wrote:
>If you want something to always be on the right, do this by writing a
>ConnectionAnchor, not a router.
>
>"Phil Williams" <phil.williams@toadmail.com> wrote in message
>news:c0fi0k$vr7$1@eclipse.org...
>
>
>>Thanks for the pointer, but the Manhattan router is final. Can anyone
>>give me a good reason why the router is final?
>>
>>I gather that all I would need to do is override the getEndDirection and
>>getStartDirection to always return RIGHT and LEFT respectively.
>>
>>Thanks,
>>Phil
>>
>>Brian Fernandes wrote:
>>
>>
>>
>>>Use your own Connection router.
>>>If you find minor changes are required to the existing Manhattan router,
>>>then extend it - else write your own router from scratch.
>>>
>>>All the best,
>>>Brian.
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>
>
--------------040208080605050309060601
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body>
I have a ConnectionAnchor and it is on the right of the figure. The
problem is that sometimes the connections comes in "at the top of" the
connection anchor rather than the right of the anchor.<br>
<br>
something like this ( [] is the anchor)<br>
<br>
|<br>
|<br>
\ /<br>
[]<br>
<br>
but I always want it to be<br>
<br>
--->[]<br>
<br>
Does that make sense?<br>
<br>
Phil<br>
<br>
Randy Hudson wrote:<br>
<blockquote cite="midc0gfqs$8r6$1@eclipse.org" type="cite">
<pre wrap="">If you want something to always be on the right, do this by writing a
ConnectionAnchor, not a router.
"Phil Williams" <a class="moz-txt-link-rfc2396E" href="mailto:phil.williams@toadmail.com"><phil.williams@toadmail.com></a> wrote in message
<a class="moz-txt-link-freetext" href="news:c0fi0k$vr7$1@eclipse.org">news:c0fi0k$vr7$1@eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Thanks for the pointer, but the Manhattan router is final. Can anyone
give me a good reason why the router is final?
I gather that all I would need to do is override the getEndDirection and
getStartDirection to always return RIGHT and LEFT respectively.
Thanks,
Phil
Brian Fernandes wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Use your own Connection router.
If you find minor changes are required to the existing Manhattan router,
then extend it - else write your own router from scratch.
All the best,
Brian.
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
--------------040208080605050309060601--
|
|
|
Re: Controlling Polyline Connections [message #117464 is a reply to message #117426] |
Thu, 12 February 2004 14:38  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This is a multi-part message in MIME format.
------=_NextPart_000_009F_01C3F175.E931D290
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This is either a bug in the router, or your anchor is off by one pixel, =
and the router doesn't realize which side of the figure the point is on.
"Phil Williams" <phil.williams@toadmail.com> wrote in message =
news:c0ggvn$9vb$1@eclipse.org...
I have a ConnectionAnchor and it is on the right of the figure. The =
problem is that sometimes the connections comes in "at the top of" the =
connection anchor rather than the right of the anchor.
something like this ( [] is the anchor)
|
|
\ /
[]
but I always want it to be
--->[]
Does that make sense?
Phil
Randy Hudson wrote:
If you want something to always be on the right, do this by writing a
ConnectionAnchor, not a router.
"Phil Williams" <phil.williams@toadmail.com> wrote in message
news:c0fi0k$vr7$1@eclipse.org...
Thanks for the pointer, but the Manhattan router is final. Can anyone
give me a good reason why the router is final?
I gather that all I would need to do is override the getEndDirection and
getStartDirection to always return RIGHT and LEFT respectively.
Thanks,
Phil
Brian Fernandes wrote:
Use your own Connection router.
If you find minor changes are required to the existing Manhattan router,
then extend it - else write your own router from scratch.
All the best,
Brian.
=20
------=_NextPart_000_009F_01C3F175.E931D290
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This is either a bug in the router, or =
your anchor=20
is off by one pixel, and the router doesn't realize which side of the =
figure the=20
point is on.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Phil Williams" <<A=20
=
href=3D"mailto:phil.williams@toadmail.com">phil.williams@toadmail.com</A>=
>=20
wrote in message <A=20
=
href=3D"news:c0ggvn$9vb$1@eclipse.org">news:c0ggvn$9vb$1@eclipse.org</A>.=
...</DIV>I=20
have a ConnectionAnchor and it is on the right of the figure. =
The=20
problem is that sometimes the connections comes in "at the top of" the =
connection anchor rather than the right of the =
anchor.<BR><BR>something like=20
this ( [] is the anchor)<BR><BR> |<BR> =
|<BR> \=20
/<BR> []<BR><BR>but I always want it to =
be<BR><BR>--->[]<BR><BR>Does=20
that make sense?<BR><BR>Phil<BR><BR>Randy Hudson wrote:<BR>
<BLOCKQUOTE cite=3Dmidc0gfqs$8r6$1@eclipse.org type=3D"cite"><PRE =
wrap=3D"">If you want something to always be on the right, do this by =
writing a
ConnectionAnchor, not a router.
"Phil Williams" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:phil.williams@toadmail.com"><phil.williams@toadmail.com=
></A> wrote in message
<A class=3Dmoz-txt-link-freetext =
href=3D"news:c0fi0k$vr7$1@eclipse.org">news:c0fi0k$vr7$1@eclipse.org</A>.=
...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Thanks for the pointer, but =
the Manhattan router is final. Can anyone
give me a good reason why the router is final?
I gather that all I would need to do is override the getEndDirection and
getStartDirection to always return RIGHT and LEFT respectively.
Thanks,
Phil
Brian Fernandes wrote:
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Use your own Connection =
router.
If you find minor changes are required to the existing Manhattan router,
then extend it - else write your own router from scratch.
All the best,
Brian.
</PRE></BLOCKQUOTE></BLOCKQUOTE><PRE wrap=3D""><!---->
</PRE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_009F_01C3F175.E931D290--
|
|
|
Powered by
FUDForum. Page generated in 0.33451 seconds