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).
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).
Alex Kravets Messages: 340 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.
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....