Well, I’m not sure exactly what you mean by “lines”. Certainly if you just mean a “stroke” (a line that goes through two or more points), then of course you can create GoStroke objects that go wherever you want, however you want.
If instead of “lines” you mean “links”, because you want their ends to be connected to other objects that might move around, then:
- This is easy if you want links to be connected at the midpoint of another link: just make the MidLabel of a GoLabeledLink a GoPort, and connect other links to that port. You can make the port have no appearance by setting GoPort.Style to GoPortStyle.None.
If you want links to be connected at arbitrary points along a link, this can be done, but you’ll need to program it, because there are a lot of possibile behaviors when the link path is recalculated because one or both end ports are moved.
Or perhaps you just want some lines to be drawn, without really being links. This is probably slightly easier to implement, but you still have to decide and implement exactly what the appearance and behavior should be.
- Having links point to text is pretty easy, of course–use a GoBasicNode with a LabelSpot of GoObject.Middle, and maybe set the Shape to null, depending on the appearance you want.
Having links point to nothing can be done easier in version 2.1–it was possible but difficult in earlier versions. The difference is that GoLink is now more tolerant of having a null FromPort or a null ToPort.
I don’t know if the GoBalloon comment is of any interest to you.
- Obviously links can cross each other, but maybe the critical point here is your hint “(bridge)”. Do you mean having little arcs where links cross each other, to avoid making it look like electrical wires are connected at the intersection? We call these “jump-overs”, and they are supported in JGo at this time, but not in GoDiagram. It’s high on our list of things to do, but didn’t make it into 2.1. If you are really interested in them, perhaps you could contract with us to get them done “now” in a manner that satisfies your requirements.