[squeak-dev] Jacarandá + Connectors

Stéphane Rollandin lecteur at zogotounga.net
Thu Nov 12 22:47:15 UTC 2009


The method is attached. I don't know when it was removed from the trunk...

Stef

-------------- next part --------------
'From Squeak3.8.2a of ''26 Oct 2007'' [latest update: #6779] on 12 November 2009 at 11:45:26 pm'!

!PartsBin methodsFor: 'initialization' stamp: 'nk 9/1/2004 20:09'!
listDirection: aListDirection quadList: quadList buttonClass: buttonClass
	"Initialize the receiver to run horizontally or vertically, obtaining its elements from the list of tuples of the form:
		(<receiver> <selector> <label> <balloonHelp>)"

	| aButton aClass |
	self layoutPolicy: TableLayout new.
	self listDirection: aListDirection.
	self wrapCentering: #topLeft.
	self layoutInset: 2.
	self cellPositioning: #bottomCenter.

	aListDirection == #leftToRight
		ifTrue:
			[self vResizing: #rigid.
			self hResizing: #spaceFill.
			self wrapDirection: #topToBottom]
		ifFalse:
			[self hResizing: #rigid.
			self vResizing: #spaceFill.
			self wrapDirection: #leftToRight].
	quadList do:
		[:tuple |
			aClass _ Smalltalk at: tuple first.
			aButton _ buttonClass new initializeWithThumbnail: (self class thumbnailForQuad: tuple color: self color) withLabel: tuple third andColor: self color andSend: tuple second to: aClass.
			(tuple size > 3 and: [tuple fourth isEmptyOrNil not]) ifTrue:
				[aButton setBalloonText: tuple fourth].
 			self addMorphBack: aButton]! !


More information about the Squeak-dev mailing list