Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Connection decoration options
Connection decoration options [message #777009] Mon, 09 January 2012 11:38 Go to next message
Russ Loucks is currently offline Russ Loucks
Messages: 11
Registered: December 2011
Junior Member
I have a model that allows multiple connections to target nodes. Most connections (to a target) have their own connection anchor much like the Logic example.

However, some connection anchors allow multiple connections to it (again, based on the model).

I have labels attached to the target end of the connection. Unfortunately, with complex models these labels become muddled and it is hard to distinguish which label belongs with with connection.

Is it possible to have 'assocation' lines between the connection (PolylineConnection) and the labels? Think of an 'association' class in UML parlance that would be depicted with a dashed line between a connection (line) and a class figure (or label).

thanks!
Re: Connection decoration options [message #777111 is a reply to message #777009] Mon, 09 January 2012 17:36 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
May be you want this?
PolylineConnection.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH)

[Updated on: Mon, 09 January 2012 16:47]

Report message to a moderator

Re: Connection decoration options [message #777143 is a reply to message #777111] Mon, 09 January 2012 18:34 Go to previous messageGo to next message
Russ Loucks is currently offline Russ Loucks
Messages: 11
Registered: December 2011
Junior Member
On 01/09/2012 04:36 PM, Alex Kravets wrote:
> May be you want this?
>
> PolylineConnection.setLinestyle(org.eclipse.draw2d.Graphics.LINE_DASH)
>
>

Sorry, I guess I didn't explain my self very well. I've attached a
figure which shows what I'm talking about. I have a set of figures and
three are connected to one. I would like to annotate (e.g., name) the
connections unambiguously like the attached.

I can definitely add labels to connections, but when I have a large
number of connections with a common target figure, the labels on the
connections are a bit muddled.

The attached figure shows sort of what I would like to do. I would like
to attach a label to a connection but then have some sort of visual
'connection line' between the label and its owner (connection figure).

Hope this makes sense.

r
Re: Connection decoration options [message #777470 is a reply to message #777143] Tue, 10 January 2012 10:09 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Perhaps you can subclass MidpointLocator and offset what getReferencePoint() returns to move your label away from the connection. Then I think you can connect midpoint on main connection to your label figure.

[Updated on: Tue, 10 January 2012 10:10]

Report message to a moderator

Re: Connection decoration options [message #777483 is a reply to message #777470] Tue, 10 January 2012 10:27 Go to previous message
Russ Loucks is currently offline Russ Loucks
Messages: 11
Registered: December 2011
Junior Member
On 01/10/2012 09:09 AM, Alex Kravets wrote:
> Perhaps you can subclass MidpointLocator and offset what
> getReferencePoint() returns to move your label away from the connection.
> Then I think you can connect midpoint on main connection to your label.

Hmm. I'll try that this afternoon. I working on getting 'undo'
commands to work at the moment....
Previous Topic:GEF functionality within other editor window
Next Topic:GEF Collapse or Expand Shape Outline Issue
Goto Forum:
  


Current Time: Sat Aug 30 00:40:36 EDT 2014

Powered by FUDForum. Page generated in 0.01810 seconds