'From Pharo3.0 of 18 March 2013 [Latest update: #30862] on 12 February 2015 at 10:13:28.243708 am'! LineMorph subclass: #FollowerLineMoprh instanceVariableNames: 'morphA morphB' classVariableNames: '' poolDictionaries: '' category: '_UnpackagedPackage'! !FollowerLineMoprh commentStamp: 'HilaireFernandes 2/12/2015 10:13' prior: 0! I draw a connected line to two morphs.! !FollowerLineMoprh methodsFor: 'initialization' stamp: 'HilaireFernandes 2/12/2015 09:56'! initialize super initialize. Transcript show: 'initialized';cr.! ! !FollowerLineMoprh methodsFor: 'accessing' stamp: 'HilaireFernandes 2/12/2015 09:51'! morphB: aMorph morphB := aMorph! ! !FollowerLineMoprh methodsFor: 'accessing' stamp: 'HilaireFernandes 2/12/2015 09:51'! morphA: aMorph morphA := aMorph! ! !FollowerLineMoprh methodsFor: 'submorphs-add/remove' stamp: 'HilaireFernandes 2/12/2015 10:07'! delete super delete. ActiveHand removeMouseListener: self! ! !FollowerLineMoprh methodsFor: 'events-processing' stamp: 'HilaireFernandes 2/12/2015 10:11'! handleListenEvent: anEvent anEvent isMouseMove ifFalse: [ ^ self ]. Transcript show: 'Mouse mouve event'; cr. morphA center = self firstVertex ifFalse: [ self verticesAt: 1 put: morphA center ]. morphB center = self lastVertex ifFalse: [ self verticesAt: 2 put: morphB center ] ! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! FollowerLineMoprh class instanceVariableNames: ''! !FollowerLineMoprh class methodsFor: 'instance creation' stamp: 'HilaireFernandes 2/12/2015 10:05'! from: morphA to: morphB | line | line := super from: morphA center to: morphB center color: Color red width: 2. line morphA: morphA; morphB: morphB. ActiveHand addMouseListener: line. ^ line! !