class: HierarchicalListView
authorStefan Vogel <sv@exept.de>
Tue, 18 Feb 2014 15:44:07 +0100
changeset 4505 8b2a3ebaeb25
parent 4504 9ac5a87f55dc
child 4506 39867e0ef24f
class: HierarchicalListView changed: #fetchResources #iconFor: #lineColor: access device via message send
HierarchicalListView.st
--- a/HierarchicalListView.st	Tue Feb 18 15:37:07 2014 +0100
+++ b/HierarchicalListView.st	Tue Feb 18 15:44:07 2014 +0100
@@ -389,12 +389,12 @@
     "set the color of the horizontal and vertical lines
     "
     (aColor notNil and:[aColor ~= lineColor]) ifTrue:[
-	lineColor := aColor.
+        lineColor := aColor.
 
-	shown ifTrue:[
-	    lineColor := lineColor onDevice:device.
-	    showLines ifTrue:[ self invalidate ]
-	]
+        shown ifTrue:[
+            lineColor := lineColor onDevice:self graphicsDevice.
+            showLines ifTrue:[ self invalidate ]
+        ]
     ].
 ! !
 
@@ -1257,19 +1257,19 @@
 
     super fetchResources.
 
-    lineColor      := lineColor onDevice:device.
+    lineColor      := lineColor onDevice:self graphicsDevice.
     openIndicator  := self imageOnMyDevice:openIndicator.
     closeIndicator := self imageOnMyDevice:closeIndicator.
     defaultWidth   := imageWidth.
 
     icons keysAndValuesDo:[:aKey :anImage|
-	anImage isNil ifTrue:[
-	    ('HierachicalListView [warning]: missing image: ' , aKey) errorPrintCR.
-	] ifFalse:[
-	    image := self imageOnMyDevice:anImage.
-	    icons at:aKey put:image.
-	    imageWidth := image width max:imageWidth.
-	]
+        anImage isNil ifTrue:[
+            ('HierachicalListView [warning]: missing image: ' , aKey) errorPrintCR.
+        ] ifFalse:[
+            image := self imageOnMyDevice:anImage.
+            icons at:aKey put:image.
+            imageWidth := image width max:imageWidth.
+        ]
     ].
     imageWidth      := (imageWidth + 1 // 2 * 2) max:defaultWidth.
     alignTextRightX := imageWidth + 20 max:alignTextRightX.
@@ -1340,7 +1340,7 @@
         iconOrKey isImageOrForm ifTrue:[
             "/ got an image; have to register the image on my device
 
-            iconOrKey device == device ifTrue:[
+            iconOrKey device == self graphicsDevice ifTrue:[
                 ^ iconOrKey
             ].
             ^ icons at:iconOrKey ifAbsentPut:[ self imageOnMyDevice:iconOrKey ].
@@ -1680,10 +1680,10 @@
 !HierarchicalListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.130 2014-02-13 18:44:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.131 2014-02-18 14:44:07 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.130 2014-02-13 18:44:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.131 2014-02-18 14:44:07 stefan Exp $'
 ! !