Connections [message #83276] |
Wed, 11 June 2003 12:02  |
Eclipse User |
|
|
|
Originally posted by: joe999.walla.co.il
How can i prevent a Connection EditPart to be on-top of other edit part
which connected with that connection?
|
|
|
|
|
|
|
|
Re: Connections [message #83465 is a reply to message #83451] |
Wed, 11 June 2003 14:55   |
Eclipse User |
|
|
|
Jan,
I just read your other post. I see you've addressed these problems already.
Eric Bordeau wrote:
> This has its own set of problems, though, which may not matter to
> certain applications. The primary layer must be transparent in order to
> see the connections behind it. Then if you have containers with nodes
> inside of them, the connections won't draw on top of the container to
> the node inside it. I'm specifically thinking of a circuit in the logic
> example -- if it contains an LED for example, and there's a connection
> to that LED, the connection will be behind the container circuit.
>
> Jan Ploski wrote:
>
>> Eric Bordeau wrote:
>>
>>
>>> The connection layer is on top of the main layer where the edit parts'
>>
>>
>> figures
>>
>>> reside. This causes all connections to be on top of other edit parts in
>>
>>
>> this
>>
>>> situation. The only alternative I can think of is to use a better
>>
>>
>> connection
>>
>>> router that include collision avoidance algorithms to route connections
>>
>>
>> around
>>
>>> edit parts that are in the way. This is not a trivial task.
>>
>>
>>
>> The other solution is to reorder the layers. Define your own root
>> EditPart
>> subclass and install it in the viewer. In my application, I am
>> subclassing
>> ScalableFreeformRootEditPart. There I can override createPrintableLayers
>> to swap the order in which layers are created:
>>
>> protected LayeredPane createPrintableLayers()
>> {
>> FreeformLayeredPane layeredPane = new
>> FreeformLayeredPane();
>> layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
>> layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
>> return layeredPane;
>> }
>>
>> -JPL
>>
>
|
|
|
Re: Connections [message #83480 is a reply to message #83465] |
Wed, 11 June 2003 15:58  |
Eclipse User |
|
|
|
Originally posted by: jpl.remotejava.com
Eric Bordeau wrote:
> Jan,
> I just read your other post. I see you've addressed these problems already.
Only sort of... your remarks definitely weren't a waste of keystrokes ;-)
Much can be achieved easily if the set and organization of layers is left
open-ended. So far I have only run into that one problem with
deactivateFigure described in the other thread (maybe let's move the
discussion there). But seeing layer name constants around GEF code makes
me feel somewhat uneasy, like maybe my proposed solution works around
the official API.
Best regards -
Jan Ploski
|
|
|
Powered by
FUDForum. Page generated in 0.30877 seconds