--- a/ImageEditor.st Thu May 27 16:26:08 2004 +0200
+++ b/ImageEditor.st Thu May 27 16:28:35 2004 +0200
@@ -1386,6 +1386,7 @@
dataList: listOfColors
has3Dsepartors: true
has3Dseparators: true
+ columnHolder: tableColumns
verticalSpacing: 1
columns:
(OrderedCollection
@@ -2560,6 +2561,66 @@
)
! !
+!ImageEditor class methodsFor:'tableColumns specs'!
+
+tableColumns
+ "This resource specification was automatically generated
+ by the DataSetBuilder of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the DataSetBuilder may not be able to read the specification."
+
+ "
+ DataSetBuilder new openOnClass:ImageEditor andSelector:#tableColumns
+ "
+
+ <resource: #tableColumns>
+
+ ^#(
+ (DataSetColumnSpec
+ labelButtonType: Button
+ rendererType: rowSelector
+ backgroundSelector: theColorItSelf:
+ selectedBackgroundSelector: theColorItSelf:
+ isResizeable: false
+ )
+ (DataSetColumnSpec
+ label: 'R'
+ labelAlignment: left
+ labelButtonType: Button
+ columnAlignment: right
+ editorType: InputField
+ type: number
+ model: redFromColor:
+ writeSelector: redAtColor:put:
+ selectSelector: canSelectRedInColor:
+ )
+ (DataSetColumnSpec
+ label: 'G'
+ labelAlignment: left
+ labelButtonType: Button
+ columnAlignment: right
+ editorType: InputField
+ type: number
+ model: greenFromColor:
+ writeSelector: greenAtColor:put:
+ selectSelector: canSelectGreenInColor:
+ )
+ (DataSetColumnSpec
+ label: 'B'
+ labelAlignment: left
+ labelButtonType: Button
+ columnAlignment: right
+ editorType: InputField
+ type: number
+ model: blueFromColor:
+ writeSelector: blueAtColor:put:
+ selectSelector: canSelectBlueInColor:
+ )
+ )
+
+! !
+
!ImageEditor methodsFor:'accessing'!
image
@@ -2857,10 +2918,13 @@
^ self.
].
something == #selectedColor ifTrue:[
- (aParameter = (Color colorId:0)) ifTrue:[
- self halt.
+ (aParameter isNil or:[aParameter = (Color colorId:0)]) ifTrue:[
+ "/ no color/mask */
+ "/ self halt.
+ clrIndex := self hasMask ifTrue:[1] ifFalse:[0].
+ ] ifFalse:[
+ clrIndex := self listOfColors indexOf:aParameter.
].
- clrIndex := self listOfColors indexOf:aParameter.
self selectionOfColor value:clrIndex.
^ self.
].