Home » Eclipse Projects » GEF » Connections clipping and "re-anchoring"
Connections clipping and "re-anchoring" [message #79277] |
Wed, 14 May 2003 12:04  |
Eclipse User |
|
|
|
Originally posted by: bgrieder.nospam.thanks
Hi,
I have connections going from nodes inside a container to nodes inside
the same container and inside a different container.
When a container is resized, and an inside node is hidden (not in the
clipping region), connections are still visible outside the clipping
region.I understand the basic issue: connections are children of the
ConnectionLayer which is attached to the root element, not the container.
Still, I wish to change the behaviour and wonders what is the best
approach (reparenting the connection, moving anchors, etc....). I have
browsed thru this group and found a note from Randy Hudson saying:
QUOTE
This is by design. If you want to change the figure which parents the
connection to be some layer in your container, see
AbstractConnectionEditPart#activateFigure(). This determines the
connection's parent, and therefore its clipping.
UNQUOTE
I have two issues with this note:
1- I do not fully understand "and therefore its clipping"; can someone
elaborate on the inner workings
2- I believe the "reparenting" approach solves the issue for two nodes
connected inside the same container, but not accross containers.
Thanks for you help.
bruno
|
|
|
Re: Connections clipping and "re-anchoring" [message #79366 is a reply to message #79277] |
Wed, 14 May 2003 10:40   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
What behavior do you want for:
1) Connection within a container where only one of the two nodes is visible
2) Connection accross 2 containers, where one node is not visible.
I assume your containers allow for scrolling, otherwise the children would
always be visible. What type of application are you writing?
"Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
news:b9tic3$mqr$2@rogue.oti.com...
> Hi,
>
> I have connections going from nodes inside a container to nodes inside
> the same container and inside a different container.
>
> When a container is resized, and an inside node is hidden (not in the
> clipping region), connections are still visible outside the clipping
> region.I understand the basic issue: connections are children of the
> ConnectionLayer which is attached to the root element, not the container.
>
> Still, I wish to change the behaviour and wonders what is the best
> approach (reparenting the connection, moving anchors, etc....). I have
> browsed thru this group and found a note from Randy Hudson saying:
>
> QUOTE
> This is by design. If you want to change the figure which parents the
> connection to be some layer in your container, see
> AbstractConnectionEditPart#activateFigure(). This determines the
> connection's parent, and therefore its clipping.
> UNQUOTE
>
> I have two issues with this note:
> 1- I do not fully understand "and therefore its clipping"; can someone
> elaborate on the inner workings
> 2- I believe the "reparenting" approach solves the issue for two nodes
> connected inside the same container, but not accross containers.
>
> Thanks for you help.
>
> bruno
>
|
|
|
Re: Connections clipping and "re-anchoring" [message #79411 is a reply to message #79366] |
Wed, 14 May 2003 13:26   |
Eclipse User |
|
|
|
Originally posted by: bgrieder.nospam.thanks
Hi Randy,
(my answers are inline)
Thnks for your help
Randy Hudson wrote:
> What behavior do you want for:
>
> 1) Connection within a container where only one of the two nodes is visible
The connection should only be visible in the "clipping region" of the
container, i.e, the connection should "stop" at the container border
which is the closest to the hidden anchor.
> 2) Connection accross 2 containers, where one node is not visible.
Same thing: the connection should stop at the border of the container
parent to the "hidden node", which is the closest border to the anchor
of the "hidden node".
>
> I assume your containers allow for scrolling, otherwise the children would
> always be visible.
Yes - the containers implement a ScrollPane
What type of application are you writing?
Some sort of process modeling tool
>
> "Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
> news:b9tic3$mqr$2@rogue.oti.com...
>
>>Hi,
>>
>>I have connections going from nodes inside a container to nodes inside
>>the same container and inside a different container.
>>
>>When a container is resized, and an inside node is hidden (not in the
>>clipping region), connections are still visible outside the clipping
>>region.I understand the basic issue: connections are children of the
>>ConnectionLayer which is attached to the root element, not the container.
>>
>>Still, I wish to change the behaviour and wonders what is the best
>>approach (reparenting the connection, moving anchors, etc....). I have
>>browsed thru this group and found a note from Randy Hudson saying:
>>
>>QUOTE
>>This is by design. If you want to change the figure which parents the
>>connection to be some layer in your container, see
>>AbstractConnectionEditPart#activateFigure(). This determines the
>>connection's parent, and therefore its clipping.
>>UNQUOTE
>>
>>I have two issues with this note:
>>1- I do not fully understand "and therefore its clipping"; can someone
>>elaborate on the inner workings
>>2- I believe the "reparenting" approach solves the issue for two nodes
>>connected inside the same container, but not accross containers.
>>
>>Thanks for you help.
>>
>>bruno
>>
>
>
>
|
|
|
Re: Connections clipping and "re-anchoring" [message #79425 is a reply to message #79411] |
Wed, 14 May 2003 13:11   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
news:b9tn60$mqr$3@rogue.oti.com...
> Hi Randy,
>
> (my answers are inline)
>
> Thnks for your help
>
> Randy Hudson wrote:
> > What behavior do you want for:
> >
> > 1) Connection within a container where only one of the two nodes is
visible
> The connection should only be visible in the "clipping region" of the
> container, i.e, the connection should "stop" at the container border
> which is the closest to the hidden anchor.
This could be done by having a layer local to the container, and parenting
the connection in that layer. It could also be done by cheating in the
connection anchor. the location of the anchor could be clipped to the
container's client area.
> > 2) Connection accross 2 containers, where one node is not visible.
> Same thing: the connection should stop at the border of the container
> parent to the "hidden node", which is the closest border to the anchor
> of the "hidden node".
This could not be done at the layer. The only way to do this would be
having the connection anchor clip to the node's container. Some mockups
might help describe what you want better.
> >
> > I assume your containers allow for scrolling, otherwise the children
would
> > always be visible.
> Yes - the containers implement a ScrollPane
>
> What type of application are you writing?
> Some sort of process modeling tool
>
> >
> > "Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
> > news:b9tic3$mqr$2@rogue.oti.com...
> >
> >>Hi,
> >>
> >>I have connections going from nodes inside a container to nodes inside
> >>the same container and inside a different container.
> >>
> >>When a container is resized, and an inside node is hidden (not in the
> >>clipping region), connections are still visible outside the clipping
> >>region.I understand the basic issue: connections are children of the
> >>ConnectionLayer which is attached to the root element, not the
container.
> >>
> >>Still, I wish to change the behaviour and wonders what is the best
> >>approach (reparenting the connection, moving anchors, etc....). I have
> >>browsed thru this group and found a note from Randy Hudson saying:
> >>
> >>QUOTE
> >>This is by design. If you want to change the figure which parents the
> >>connection to be some layer in your container, see
> >>AbstractConnectionEditPart#activateFigure(). This determines the
> >>connection's parent, and therefore its clipping.
> >>UNQUOTE
> >>
> >>I have two issues with this note:
> >>1- I do not fully understand "and therefore its clipping"; can someone
> >>elaborate on the inner workings
> >>2- I believe the "reparenting" approach solves the issue for two nodes
> >>connected inside the same container, but not accross containers.
> >>
> >>Thanks for you help.
> >>
> >>bruno
> >>
> >
> >
> >
>
|
|
|
Re: Connections clipping and "re-anchoring" [message #79441 is a reply to message #79425] |
Wed, 14 May 2003 15:49  |
Eclipse User |
|
|
|
Originally posted by: bgrieder.nospam.thanks
This is a multi-part message in MIME format.
--------------070803080106030704060900
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Randy,
I have attached drawings of the "current" and "expected" behaviours. The
container on the right holds one "visible" node and two "hidden" nodes,
one at the top, one on the right.
In the "expected" drawing, we could even have some decoration at the end
of the truncated connections to precisely indicate that: they are truncated.
I was thinking to go the route you mentioned i.e. tricking the router by
moving the "hidden" anchor location of the node to the border of the
container.
This is a bit tricky, as calls on the getLocation method of these
anchors should be distinguished between calls to find and anchor and
calls to actually draw the connection. This does not worry me too much
however.
My biggest problem now, is actually getting the Rectangle representing
the actual clipping area of the content pane of the container starting
from its Figure. The method getBounds return as expected the Smallest
Rectangle that holds all of the children, including the hidden ones.
However getClientArea returns the same Rectangle.
How do I get the clipping Rectangle?
I will then try to implement the behaviour and publish code snippets.
rgds
bruno
Randy Hudson wrote:
> "Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
> news:b9tn60$mqr$3@rogue.oti.com...
>
>>Hi Randy,
>>
>>(my answers are inline)
>>
>>Thnks for your help
>>
>>Randy Hudson wrote:
>>
>>>What behavior do you want for:
>>>
>>>1) Connection within a container where only one of the two nodes is
>
> visible
>
>>The connection should only be visible in the "clipping region" of the
>>container, i.e, the connection should "stop" at the container border
>>which is the closest to the hidden anchor.
>
>
> This could be done by having a layer local to the container, and parenting
> the connection in that layer. It could also be done by cheating in the
> connection anchor. the location of the anchor could be clipped to the
> container's client area.
>
>
>>>2) Connection accross 2 containers, where one node is not visible.
>>
>>Same thing: the connection should stop at the border of the container
>>parent to the "hidden node", which is the closest border to the anchor
>>of the "hidden node".
>
>
> This could not be done at the layer. The only way to do this would be
> having the connection anchor clip to the node's container. Some mockups
> might help describe what you want better.
>
>
>>>I assume your containers allow for scrolling, otherwise the children
>
> would
>
>>>always be visible.
>>
>>Yes - the containers implement a ScrollPane
>>
>> What type of application are you writing?
>>Some sort of process modeling tool
>>
>>
>>>"Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
>>>news:b9tic3$mqr$2@rogue.oti.com...
>>>
>>>
>>>>Hi,
>>>>
>>>>I have connections going from nodes inside a container to nodes inside
>>>>the same container and inside a different container.
>>>>
>>>>When a container is resized, and an inside node is hidden (not in the
>>>>clipping region), connections are still visible outside the clipping
>>>>region.I understand the basic issue: connections are children of the
>>>>ConnectionLayer which is attached to the root element, not the
>
> container.
>
>>>>Still, I wish to change the behaviour and wonders what is the best
>>>>approach (reparenting the connection, moving anchors, etc....). I have
>>>>browsed thru this group and found a note from Randy Hudson saying:
>>>>
>>>>QUOTE
>>>>This is by design. If you want to change the figure which parents the
>>>>connection to be some layer in your container, see
>>>>AbstractConnectionEditPart#activateFigure(). This determines the
>>>>connection's parent, and therefore its clipping.
>>>>UNQUOTE
>>>>
>>>>I have two issues with this note:
>>>>1- I do not fully understand "and therefore its clipping"; can someone
>>>>elaborate on the inner workings
>>>>2- I believe the "reparenting" approach solves the issue for two nodes
>>>>connected inside the same container, but not accross containers.
>>>>
>>>>Thanks for you help.
>>>>
>>>>bruno
>>>>
>>>
>>>
>>>
>
>
--------------070803080106030704060900
Content-Type: image/png;
name="current.png"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="current.png"
iVBORw0KGgoAAAANSUhEUgAAAfQAAAExCAYAAACK81CNAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH0wUOEyACFatkxQAACWFJREFU eJzt3eFx27ga
hlHxTppIF5E62BTudGC5C7kL7o8d7c2aVkxRhIjv5Tm/MlHsQWxaj0GCxDCO 43gAAEr739YD
AAAeJ+gAEEDQASCAoANAAEEHgACCDgABBB0AAgg6AAT4tvUAlhqGYesh8BvP JwLYlhk6AAQo
O0O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3TdAB
IIDd1gA+ceue6682cNnL6/RH0AE+8VW49v46/XHKHQACCDoABBB0AAgg6AAQ QNABIICgA0AA
QQeAAIIOAAEEHQACCDoABBB0AAgg6AAQQNCBJm7t1tW7quMGQQdW99UWnL26 jtdOY1Rk+1Sg
iYpRF3IqE3SgKZGE53DKHQACCDoABBB0AAgg6AAQQNABIICgA0AAQQeAAIIO AAEEHQACCDoA
BBB0AAgg6AAQQNABWM357bz1EHar/G5rlbZmBEj38uvl7o/5+dfPBiPZn2Es urehkPel6GFU
0vXY9zWnN4+8L7+eXw+n4+lwODi2lyo7Q/cNB+jL6/l18cdeY85yZYMOQH+O P453/fvz23nR
aXqmBB2AVVkYtw2r3AEggKADQACn3AFo4k8L3R5ZQMfnzNABaOJWtMW8DUEH oJmP8RbzdgQd
gKauERfztgQdgObEvD1BB4AAgg4AAQQdAAIIOgCr8djX7XiwDACrsR/6dsru hw57ZT90emU/
9G2ZoUNRj5zaPB1PbiNq4HQ8HS6Xy9bDWOzyvnzsp+NJiDcm6FDYo3tP3/vx fC5pT2/7mdcl
6FDco4uQLGLiI8dETVa5A0AAQYdQf9q6EuZyHNUh6BDImzBrcjzVIOgQxpsv LTiu+ifoEMSb
Li05vvom6BDEveW05Pjqm6BDGG+6tOC46p+gQyBvvqzJ8VSDoEMob8KswXFU h6ADQABBh8I8
9pW1OSbq8ix3KOzRvadtqrGelD297Wdel6BDUY/cE/z73tOsp/r15kePKbY1 jDawhVKGYdh6
CNCULC3jGjoABHDKHYoxewE+Y4YOAAEEHQACCDoABBB0AAgg6AAQQNABIICg A0AAQQeAAIIO
AAEEHQACCDoABPgbpYfjSCtrOs4AAAAASUVORK5CYII=
--------------070803080106030704060900
Content-Type: image/png;
name="expected.png"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="expected.png"
iVBORw0KGgoAAAANSUhEUgAAAfQAAAExCAYAAACK81CNAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAAsSAAALEgHS3X78AAAA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ALO5D75tHvwJNtYpAi3/XrJ/KBB1oYgxupUhW HDOMnHIHVlc1
jON4nVqmIkEHmqgW81HVcYOgA0AAQQdgFmcv+iboABBA0AGYxWLBvgk6AAQQ dAAIIOgAEEDQ
ASCAoANAAEEHYBb3ofdN0AEggN3WAN5x657rjzZw2cvr9EfQAd7xUbj2/jr9 ccodAAIIOgAE
EHQACCDoABBA0AEggKADQABBB4AAgg4AAQQdAAIIOgAEEHQACCDoABBA0IEm bu3W1buq4wZB
B1b30RacvRrHa6cxKrJ9KtBExagLOZUJOtCUSMLncModAAIIOgAEEHQACCDo ABBA0AEggKAD
QABBB4AAgg4AAQQdAAIIOgAEEHQACCDoABBA0AFYzfnlvPUQdqv8bmuVtmYE SPf082nx5/z4
/qPBSPZnuBbd21DI+1L0MCppPPZ9zenNI+/Lz+fnw+l4OhwOju17lZ2h+4YD 9OX5/Hz3544x
535lgw5Af47fjos+/vxyvus0PVOCDsCqLIzbhlXuABBA0AEggFPuADTxt4Vu jyyg431m6AA0
cSvaYt6GoAPQzNt4i3k7gg5AU2PExbwtQQegOTFvT9ABIICgA0AAQQeAAIIO wGo89nU7HiwD
wGrsh76dsvuhw17ZD51e2Q99W2boUNQjpzZPx5PbiBo4HU+Hy+Wy9TDudnm9 f+yn40mINybo
UNije08v/Xzel7Snt/3M6xJ0KO7RRUgWMfGWY6Imq9wBIICgQ6i/bV0JczmO 6hB0CORNmDU5
nmoQdAjjzZcWHFf9E3QI4k2XlhxffRN0COLeclpyfPVN0CGMN11acFz1T9Ah kDdf1uR4qkHQ
IZQ3YdbgOKpD0AEggKBDYR77ytocE3V5ljsU9uje0zbVWE/Knt72M69L0KGo R+4J/nPvadZT
/Xrzo8cU2xquNrCFUoZh2HoI0JQs3cc1dAAI4JQ7FGP2ArzHDB0AAgg6AAQQ dAAIIOgAEEDQ
ASCAoANAAEEHgACCDgABBB0AAgg6AAQQdAAI8C9FS7ZxXvJzpwAAAABJRU5E rkJggg==
--------------070803080106030704060900--
|
|
|
Re: Connections clipping and "re-anchoring" [message #79470 is a reply to message #79441] |
Wed, 14 May 2003 15:26  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This could be done with connection anchors which clip to the parent
container. However, the arrowtip would always appear.
"Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
news:b9tvh6$mqr$4@rogue.oti.com...
> Randy,
>
> I have attached drawings of the "current" and "expected" behaviours. The
> container on the right holds one "visible" node and two "hidden" nodes,
> one at the top, one on the right.
>
> In the "expected" drawing, we could even have some decoration at the end
> of the truncated connections to precisely indicate that: they are
truncated.
>
> I was thinking to go the route you mentioned i.e. tricking the router by
> moving the "hidden" anchor location of the node to the border of the
> container.
> This is a bit tricky, as calls on the getLocation method of these
> anchors should be distinguished between calls to find and anchor and
> calls to actually draw the connection. This does not worry me too much
> however.
>
> My biggest problem now, is actually getting the Rectangle representing
> the actual clipping area of the content pane of the container starting
> from its Figure. The method getBounds return as expected the Smallest
> Rectangle that holds all of the children, including the hidden ones.
> However getClientArea returns the same Rectangle.
>
> How do I get the clipping Rectangle?
>
> I will then try to implement the behaviour and publish code snippets.
>
> rgds
>
> bruno
>
> Randy Hudson wrote:
> > "Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
> > news:b9tn60$mqr$3@rogue.oti.com...
> >
> >>Hi Randy,
> >>
> >>(my answers are inline)
> >>
> >>Thnks for your help
> >>
> >>Randy Hudson wrote:
> >>
> >>>What behavior do you want for:
> >>>
> >>>1) Connection within a container where only one of the two nodes is
> >
> > visible
> >
> >>The connection should only be visible in the "clipping region" of the
> >>container, i.e, the connection should "stop" at the container border
> >>which is the closest to the hidden anchor.
> >
> >
> > This could be done by having a layer local to the container, and
parenting
> > the connection in that layer. It could also be done by cheating in the
> > connection anchor. the location of the anchor could be clipped to the
> > container's client area.
> >
> >
> >>>2) Connection accross 2 containers, where one node is not visible.
> >>
> >>Same thing: the connection should stop at the border of the container
> >>parent to the "hidden node", which is the closest border to the anchor
> >>of the "hidden node".
> >
> >
> > This could not be done at the layer. The only way to do this would be
> > having the connection anchor clip to the node's container. Some mockups
> > might help describe what you want better.
> >
> >
> >>>I assume your containers allow for scrolling, otherwise the children
> >
> > would
> >
> >>>always be visible.
> >>
> >>Yes - the containers implement a ScrollPane
> >>
> >> What type of application are you writing?
> >>Some sort of process modeling tool
> >>
> >>
> >>>"Bruno Grieder" <bgrieder@nospam.thanks> wrote in message
> >>>news:b9tic3$mqr$2@rogue.oti.com...
> >>>
> >>>
> >>>>Hi,
> >>>>
> >>>>I have connections going from nodes inside a container to nodes inside
> >>>>the same container and inside a different container.
> >>>>
> >>>>When a container is resized, and an inside node is hidden (not in the
> >>>>clipping region), connections are still visible outside the clipping
> >>>>region.I understand the basic issue: connections are children of the
> >>>>ConnectionLayer which is attached to the root element, not the
> >
> > container.
> >
> >>>>Still, I wish to change the behaviour and wonders what is the best
> >>>>approach (reparenting the connection, moving anchors, etc....). I have
> >>>>browsed thru this group and found a note from Randy Hudson saying:
> >>>>
> >>>>QUOTE
> >>>>This is by design. If you want to change the figure which parents the
> >>>>connection to be some layer in your container, see
> >>>>AbstractConnectionEditPart#activateFigure(). This determines the
> >>>>connection's parent, and therefore its clipping.
> >>>>UNQUOTE
> >>>>
> >>>>I have two issues with this note:
> >>>>1- I do not fully understand "and therefore its clipping"; can someone
> >>>>elaborate on the inner workings
> >>>>2- I believe the "reparenting" approach solves the issue for two nodes
> >>>>connected inside the same container, but not accross containers.
> >>>>
> >>>>Thanks for you help.
> >>>>
> >>>>bruno
> >>>>
> >>>
> >>>
> >>>
> >
> >
>
>
------------------------------------------------------------ ----------------
----
------------------------------------------------------------ ----------------
----
|
|
|
Goto Forum:
Current Time: Sun Jun 08 17:13:28 EDT 2025
Powered by FUDForum. Page generated in 0.03938 seconds
|