Connectors Features

Ned Konz ned at bike-nomad.com
Mon Mar 5 03:37:46 UTC 2001


On Sunday 04 March 2001 19:50, Sebastian Wain wrote:
> Ned,
> How can I access the text attached in the connector morph?

conn _ NCConnectorMorph new position: 100 at 100; openInWorld.

"These will give you a label that lies on the line:"
conn addLabel: 'start label' at: conn firstVertex.
conn addLabel: 'end label' at: conn lastVertex.
conn addLabel: 'midpoint label' at: conn midpoint.

"These will give you a label that does not overlap the line:"
conn addLabel: 'start label' near: conn firstVertex.
conn addLabel: 'end label' near: conn lastVertex.
conn addLabel: 'midpoint label' near: conn midpoint.

Also look at NCLabelMorph>>attachTo: aMorph at: aPoint
and NCLabelMorph>>attachUnobnoxiouslyTo: aMorph at: aPoint

> I am "migrating" my own classes about Automatas to the connectors, because
> I can draw the automatas with the connectors and run it (The Automata class
> is a subclass of ComponentLayout,  I draw the DFA and execute it within),
> so I am reading all the submorphs from the Automata to construct the
> internal representation of the automata and I am searching for the 
> relation between the connector and the label to build the transitions.

Great! Get my newest stuff to start with.

Coming soon:
* make morphs work in scrolled pasteups
* add direct dragging of vertices
* add orthogonal line mode

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list