'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 27 January 2009 at 12:34:29 pm'!
!classDefinition: #ListLW category: #'LightWidgets-Kernel'!
CompositeLW subclass: #ListLW
	instanceVariableNames: 'scrollThumbColor scrollBarColor backColor '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'LightWidgets-Kernel'!

!ListLW methodsFor: 'accessing' stamp: 'jmv 1/26/2009 14:10'!
backColor: aColor
	backColor _ aColor! !

!ListLW methodsFor: 'accessing' stamp: 'jmv 1/27/2009 11:31'!
defaultItemClass
	
	^ListItemLW! !

!ListLW methodsFor: 'accessing' stamp: 'jmv 1/26/2009 14:09'!
scrollBarColor: aColor
	scrollBarColor _ aColor! !

!ListLW methodsFor: 'accessing' stamp: 'jmv 1/26/2009 14:09'!
scrollThumbColor: aColor
	scrollThumbColor _ aColor! !

!ListLW methodsFor: 'geometry testing' stamp: 'jmv 1/26/2009 14:06'!
containsPoint: aPoint
	"Just in case backColor happens to be transparent"
	^bounds containsPoint: aPoint! !

!ListLW methodsFor: 'initialization' stamp: 'jmv 1/26/2009 14:09'!
initialize
	super initialize.
	backColor _ Color lightGray.
	scrollBarColor _ backColor darker.
	scrollThumbColor _ scrollBarColor darker! !

!ListLW methodsFor: 'drawing' stamp: 'jmv 1/26/2009 14:10'!
drawOn: aCanvas

	aCanvas fillRectangle: bounds color: backColor.
	self drawScrollbarOn: aCanvas! !

!ListLW methodsFor: 'drawing' stamp: 'jmv 1/26/2009 14:09'!
drawScrollbarOn: aCanvas

	| thumb |
	thumb _ self scrollInterval.
	(thumb first = bounds top and: [thumb last = bounds bottom ]) ifFalse: [
		aCanvas
			fillRectangle: (bounds right - 18 @ bounds top corner: bounds right @ bounds bottom)
			color: scrollBarColor.
		aCanvas
			fillRectangle: (bounds right - 18 @ thumb first corner: bounds right @ thumb last)
			color: scrollThumbColor ]! !

!classDefinition: #ListLW category: #'LightWidgets-Kernel'!
CompositeLW subclass: #ListLW
	instanceVariableNames: 'scrollThumbColor scrollBarColor backColor'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'LightWidgets-Kernel'!
