change rowSelector icon;
authorca
Fri, 31 Jul 1998 09:11:25 +0200
changeset 1042 b2b27ac9a550
parent 1041 77b5b5c11744
child 1043 25956296706d
change rowSelector icon;
DSVColumnView.st
--- a/DSVColumnView.st	Fri Jul 31 09:10:26 1998 +0200
+++ b/DSVColumnView.st	Fri Jul 31 09:11:25 1998 +0200
@@ -103,7 +103,7 @@
 
     ^Icon
         constantNamed:#'DSVColumnView rowSelector'
-        ifAbsentPut:[(Depth2Image new) width: 8; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@P@AP@GPUWQ]7W]5W];)^@G @8@B@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 8; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DA \?/????8\FA@b') ; yourself); yourself]! !
+        ifAbsentPut:[(Depth2Image new) width: 8; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@P@AP@GPUWQ]7W]5W]"AX@F@@ @@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 8; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DA \?/????8\FA@b') ; yourself); yourself]! !
 
 !DSVColumnView class methodsFor:'defaults'!
 
@@ -186,6 +186,14 @@
 
 !DSVColumnView methodsFor:'accessing'!
 
+builder
+    ^ builder
+!
+
+builder:aBuilder
+    builder := aBuilder
+!
+
 columnView
     ^ self
 ! !
@@ -929,16 +937,6 @@
     ^ self removeIndex:self size
 ! !
 
-!DSVColumnView methodsFor:'builder'!
-
-builder
-    ^ builder
-!
-
-builder:aBuilder
-    builder := aBuilder
-! !
-
 !DSVColumnView methodsFor:'change & update'!
 
 changed:aParameter with:anArgument
@@ -975,36 +973,6 @@
 
 ! !
 
-!DSVColumnView methodsFor:'defaults'!
-
-updateStyleCache
-    "extract values from the styleSheet and cache them in class variables
-    "
-    <resource: #style (#textForegroundColor #'scrollableView.backgroundColor'
-                       #'selection.hilightForegroundColor'
-                       #'selection.hilightBackgroundColor'   )>
-
-    DefaultForegroundColor        := StyleSheet colorAt:'textForegroundColor' default:(Color black).
-    DefaultBackgroundColor        := StyleSheet at:'scrollableView.backgroundColor' default:DefaultViewBackgroundColor.
-
-    DefaultHilightForegroundColor := StyleSheet colorAt:'selection.hilightForegroundColor' default:DefaultForegroundColor.
-    DefaultHilightBackgroundColor := StyleSheet colorAt:'selection.hilightBackgroundColor' default:(Color veryLightGrey).
-
-    DefaultHilightForegroundColor = DefaultHilightBackgroundColor ifTrue:[
-        DefaultHilightBackgroundColor := Color veryLightGrey
-    ].
-
-    ButtonLightColor  := StyleSheet at:'button.lightColor'.
-    ButtonShadowColor := StyleSheet at:'button.shadowColor'.
-    ButtonEdgeStyle   := StyleSheet at:'button.edgeStyle'.
-
-"
-self updateStyleCache.
-"
-
-    "Modified: / 26.10.1997 / 17:09:07 / cg"
-! !
-
 !DSVColumnView methodsFor:'drag & drop'!
 
 canDrag
@@ -2397,10 +2365,17 @@
     "returns true if cell in a row; a row number, in a column, a column
      number is selected.
     "
-    (self isInSelection:aRowNr) ifTrue:[
-        ^ (selectedColIndex == 0 or:[selectedColIndex == aColNr])
+    multipleSelectOk ifFalse:[
+        aRowNr ~~ selectedRowIndex ifTrue:[
+            ^ false
+        ]
+    ] ifTrue:[
+        (selectedRowIndex size ~~ 0 and:[selectedRowIndex includes:aRowNr]) ifFalse:[
+            ^ false
+        ]
     ].
-    ^ false
+    ^ (selectedColIndex == 0 or:[selectedColIndex == aColNr])
+
 !
 
 lastIndexSelected
@@ -2680,5 +2655,5 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.46 1998-07-30 23:16:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.47 1998-07-31 07:11:25 ca Exp $'
 ! !