ColorEditDialog.st
author Claus Gittinger <cg@exept.de>
Wed, 29 Jul 2009 20:02:02 +0200
changeset 2570 4e663bc64364
parent 2521 5cfd5fcd7bd3
child 2574 ae2448675efb
permissions -rw-r--r--
changed #requestPackage
     1 "
     2  COPYRIGHT (c) 1995 by eXept Software AG
     3               All Rights Reserved
     4 
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    11 "
    12 "{ Package: 'stx:libtool2' }"
    13 
    14 SimpleDialog subclass:#ColorEditDialog
    15 	instanceVariableNames:'red green blue hue light saturation colorNameHolder
    16 		htmlColorNameHolder previewBox'
    17 	classVariableNames:''
    18 	poolDictionaries:''
    19 	category:'Interface-UIPainter'
    20 !
    21 
    22 !ColorEditDialog class methodsFor:'documentation'!
    23 
    24 copyright
    25 "
    26  COPYRIGHT (c) 1995 by eXept Software AG
    27               All Rights Reserved
    28 
    29  This software is furnished under a license and may be used
    30  only in accordance with the terms of that license and with the
    31  inclusion of the above copyright notice.   This software may not
    32  be provided or otherwise made available to, or used by, any
    33  other person.  No title to or ownership of the software is
    34  hereby transferred.
    35 "
    36 !
    37 
    38 documentation
    39 "
    40     An edit-dialog for colors.
    41 "
    42 !
    43 
    44 examples
    45 "
    46                                                                                 [exBegin]                                      
    47     |editor color|
    48 
    49     editor := ColorEditDialog new.
    50     editor color:(Color green).
    51     editor open.
    52     editor accepted ifTrue:[
    53         editor color inspect.
    54     ]
    55                                                                                 [exEnd]
    56 "
    57 ! !
    58 
    59 !ColorEditDialog class methodsFor:'help specs'!
    60 
    61 flyByHelpSpec
    62     "This resource specification was automatically generated
    63      by the UIHelpTool of ST/X."
    64 
    65     "Do not manually edit this!! If it is corrupted,
    66      the UIHelpTool may not be able to read the specification."
    67 
    68     "
    69      UIHelpTool openOnClass:ColorEditDialog    
    70     "
    71 
    72     <resource: #help>
    73 
    74     ^ super flyByHelpSpec addPairsFrom:#(
    75 
    76 #pickColor
    77 'Pick a Color from the Screen'
    78 
    79 )
    80 !
    81 
    82 helpSpec
    83     "This resource specification was automatically generated
    84      by the UIHelpTool of ST/X."
    85 
    86     "Do not manually edit this!! If it is corrupted,
    87      the UIHelpTool may not be able to read the specification."
    88 
    89     "
    90      UIHelpTool openOnClass:ColorEditDialog    
    91     "
    92 
    93     <resource: #help>
    94 
    95     ^ super helpSpec addPairsFrom:#(
    96 
    97 #copyToClipboard
    98 'Copy the color to the clipboard'
    99 
   100 #hlsMixer
   101 'Mix color from hls (hue-light-saturation) components'
   102 
   103 #pasteFromClipboard
   104 'Paste color from the Clipboard'
   105 
   106 #rgbMixer
   107 'Mix color from rgb (red-green-blue) components'
   108 
   109 )
   110 ! !
   111 
   112 !ColorEditDialog class methodsFor:'image specs'!
   113 
   114 pickColorIcon
   115     ^ ToolbarIconLibrary pipette16x16Icon
   116 ! !
   117 
   118 !ColorEditDialog class methodsFor:'interface specs'!
   119 
   120 windowSpec
   121     "This resource specification was automatically generated
   122      by the UIPainter of ST/X."
   123 
   124     "Do not manually edit this!! If it is corrupted,
   125      the UIPainter may not be able to read the specification."
   126 
   127     "
   128      UIPainter new openOnClass:ColorEditDialog andSelector:#windowSpec
   129      ColorEditDialog new openInterface:#windowSpec
   130      ColorEditDialog open
   131     "
   132 
   133     <resource: #canvas>
   134 
   135     ^ 
   136      #(FullSpec
   137         name: windowSpec
   138         window: 
   139        (WindowSpec
   140           label: 'Define Color'
   141           name: 'Define Color'
   142           min: (Point 440 300)
   143           max: (Point 440 300)
   144           bounds: (Rectangle 0 0 440 300)
   145         )
   146         component: 
   147        (SpecCollection
   148           collection: (
   149            (VerticalPanelViewSpec
   150               name: 'RGBLabelPanel'
   151               layout: (LayoutFrame 0 0 0 0 70 0 76 0)
   152               horizontalLayout: fit
   153               verticalLayout: spreadSpace
   154               horizontalSpace: 3
   155               verticalSpace: 3
   156               component: 
   157              (SpecCollection
   158                 collection: (
   159                  (LabelSpec
   160                     label: 'Red:'
   161                     name: 'RedLabel'
   162                     translateLabel: true
   163                     adjust: right
   164                     useDefaultExtent: true
   165                   )
   166                  (LabelSpec
   167                     label: 'Green:'
   168                     name: 'GreenLabel'
   169                     translateLabel: true
   170                     adjust: right
   171                     useDefaultExtent: true
   172                   )
   173                  (LabelSpec
   174                     label: 'Blue:'
   175                     name: 'BlueLabel'
   176                     translateLabel: true
   177                     adjust: right
   178                     useDefaultExtent: true
   179                   )
   180                  )
   181                
   182               )
   183             )
   184            (VerticalPanelViewSpec
   185               name: 'RGBSliderPanel'
   186               layout: (LayoutFrame 70 0 0 0 -177 1 76 0)
   187               horizontalLayout: fit
   188               verticalLayout: spreadSpace
   189               horizontalSpace: 3
   190               verticalSpace: 3
   191               component: 
   192              (SpecCollection
   193                 collection: (
   194                  (SliderSpec
   195                     name: 'RedSlider'
   196                     tabable: false
   197                     model: red
   198                     orientation: horizontal
   199                     stop: 255
   200                     step: 1
   201                     backgroundColor: (Color 100.0 0.0 0.0)
   202                     extent: (Point 193 16)
   203                   )
   204                  (SliderSpec
   205                     name: 'GreenSlider'
   206                     tabable: false
   207                     model: green
   208                     orientation: horizontal
   209                     stop: 255
   210                     step: 1
   211                     backgroundColor: (Color 0.0 100.0 0.0)
   212                     extent: (Point 193 16)
   213                   )
   214                  (SliderSpec
   215                     name: 'BlueSlider'
   216                     tabable: false
   217                     model: blue
   218                     orientation: horizontal
   219                     stop: 255
   220                     step: 1
   221                     backgroundColor: (Color 0.0 0.0 100.0)
   222                     extent: (Point 193 16)
   223                   )
   224                  )
   225                
   226               )
   227             )
   228            (VerticalPanelViewSpec
   229               name: 'RGBFieldPanel'
   230               layout: (LayoutFrame -173 1 0 0 -143 1 76 0)
   231               horizontalLayout: fit
   232               verticalLayout: spreadSpace
   233               horizontalSpace: 3
   234               verticalSpace: 3
   235               component: 
   236              (SpecCollection
   237                 collection: (
   238                  (InputFieldSpec
   239                     name: 'RedField'
   240                     model: red
   241                     type: numberInRange
   242                     numChars: 3
   243                     minValue: 0
   244                     maxValue: 255
   245                     acceptOnPointerLeave: false
   246                     extent: (Point 30 20)
   247                   )
   248                  (InputFieldSpec
   249                     name: 'GreenField'
   250                     model: green
   251                     type: numberInRange
   252                     numChars: 3
   253                     minValue: 0
   254                     maxValue: 255
   255                     acceptOnPointerLeave: false
   256                     extent: (Point 30 20)
   257                   )
   258                  (InputFieldSpec
   259                     name: 'BlueField'
   260                     model: blue
   261                     type: numberInRange
   262                     numChars: 3
   263                     minValue: 0
   264                     maxValue: 255
   265                     acceptOnPointerLeave: false
   266                     extent: (Point 30 20)
   267                   )
   268                  )
   269                
   270               )
   271             )
   272            (VerticalPanelViewSpec
   273               name: 'RGBFieldPanelHex'
   274               layout: (LayoutFrame -141 1 0 0 -119 1 76 0)
   275               horizontalLayout: fit
   276               verticalLayout: spreadSpace
   277               horizontalSpace: 3
   278               verticalSpace: 3
   279               component: 
   280              (SpecCollection
   281                 collection: (
   282                  (InputFieldSpec
   283                     name: 'EntryField4'
   284                     model: red
   285                     type: hexIntegerInRange
   286                     numChars: 3
   287                     minValue: 0
   288                     maxValue: 255
   289                     acceptOnPointerLeave: false
   290                     extent: (Point 22 20)
   291                   )
   292                  (InputFieldSpec
   293                     name: 'EntryField5'
   294                     model: green
   295                     type: hexIntegerInRange
   296                     numChars: 3
   297                     minValue: 0
   298                     maxValue: 255
   299                     acceptOnPointerLeave: false
   300                     extent: (Point 22 20)
   301                   )
   302                  (InputFieldSpec
   303                     name: 'EntryField6'
   304                     model: blue
   305                     type: hexIntegerInRange
   306                     numChars: 3
   307                     minValue: 0
   308                     maxValue: 255
   309                     acceptOnPointerLeave: false
   310                     extent: (Point 22 20)
   311                   )
   312                  )
   313                
   314               )
   315             )
   316            (VerticalPanelViewSpec
   317               name: 'HLSLabelPanel'
   318               layout: (LayoutFrame 0 0 86 0 70 0 163 0)
   319               horizontalLayout: fit
   320               verticalLayout: spreadSpace
   321               horizontalSpace: 3
   322               verticalSpace: 3
   323               component: 
   324              (SpecCollection
   325                 collection: (
   326                  (LabelSpec
   327                     label: 'Hue:'
   328                     name: 'Label1'
   329                     translateLabel: true
   330                     adjust: right
   331                     useDefaultExtent: true
   332                   )
   333                  (LabelSpec
   334                     label: 'Light:'
   335                     name: 'Label2'
   336                     translateLabel: true
   337                     adjust: right
   338                     useDefaultExtent: true
   339                   )
   340                  (LabelSpec
   341                     label: 'Saturation:'
   342                     name: 'Label3'
   343                     translateLabel: true
   344                     adjust: right
   345                     useDefaultExtent: true
   346                   )
   347                  )
   348                
   349               )
   350             )
   351            (VerticalPanelViewSpec
   352               name: 'HLSSliderPanel'
   353               layout: (LayoutFrame 70 0 86 0 -177 1 163 0)
   354               horizontalLayout: fit
   355               verticalLayout: spreadSpace
   356               horizontalSpace: 3
   357               verticalSpace: 3
   358               component: 
   359              (SpecCollection
   360                 collection: (
   361                  (SliderSpec
   362                     name: 'Slider1'
   363                     tabable: false
   364                     model: hue
   365                     orientation: horizontal
   366                     stop: 359
   367                     step: 1
   368                     keyboardStep: 1
   369                     extent: (Point 193 16)
   370                   )
   371                  (SliderSpec
   372                     name: 'Slider2'
   373                     tabable: false
   374                     model: light
   375                     orientation: horizontal
   376                     step: 1
   377                     backgroundColor: (Color 66.999313344015 66.999313344015 66.999313344015)
   378                     keyboardStep: 1
   379                     extent: (Point 193 16)
   380                   )
   381                  (SliderSpec
   382                     name: 'Slider3'
   383                     tabable: false
   384                     model: saturation
   385                     orientation: horizontal
   386                     step: 1
   387                     backgroundColor: (Color 66.999313344015 66.999313344015 66.999313344015)
   388                     keyboardStep: 1
   389                     extent: (Point 193 16)
   390                   )
   391                  )
   392                
   393               )
   394             )
   395            (VerticalPanelViewSpec
   396               name: 'HLSFieldPanel'
   397               layout: (LayoutFrame -173 1 86 0 -143 1 163 0)
   398               horizontalLayout: fit
   399               verticalLayout: spreadSpace
   400               horizontalSpace: 3
   401               verticalSpace: 3
   402               component: 
   403              (SpecCollection
   404                 collection: (
   405                  (InputFieldSpec
   406                     name: 'EntryField1'
   407                     model: hue
   408                     type: numberInRange
   409                     numChars: 3
   410                     minValue: 0
   411                     maxValue: 359
   412                     acceptOnPointerLeave: false
   413                     extent: (Point 30 20)
   414                   )
   415                  (InputFieldSpec
   416                     name: 'EntryField2'
   417                     model: light
   418                     type: numberInRange
   419                     numChars: 3
   420                     minValue: 0
   421                     maxValue: 100
   422                     acceptOnPointerLeave: false
   423                     extent: (Point 30 20)
   424                   )
   425                  (InputFieldSpec
   426                     name: 'EntryField3'
   427                     model: saturation
   428                     type: numberInRange
   429                     numChars: 3
   430                     minValue: 0
   431                     maxValue: 100
   432                     acceptOnPointerLeave: false
   433                     extent: (Point 30 20)
   434                   )
   435                  )
   436                
   437               )
   438             )
   439            (ViewSpec
   440               name: 'PreviewBoxFrame'
   441               layout: (LayoutFrame -117 1 4 0.0 -3 1.0 -39 1.0)
   442               level: 1
   443               component: 
   444              (SpecCollection
   445                 collection: (
   446                  (LabelSpec
   447                     label: 'Preview'
   448                     name: 'PreviewBox'
   449                     layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -2 1.0)
   450                     level: -1
   451                     translateLabel: true
   452                     postBuildCallback: postBuildPreviewBox:
   453                   )
   454                  )
   455                
   456               )
   457             )
   458            (LabelSpec
   459               label: 'Color Name:'
   460               name: 'ColorNameLabel'
   461               layout: (LayoutFrame 0 0 176 0 106 0 198 0)
   462               translateLabel: true
   463               adjust: right
   464             )
   465            (InputFieldSpec
   466               name: 'ColorNameField'
   467               layout: (LayoutFrame 108 0 176 0 -162 1 198 0)
   468               model: colorNameHolder
   469               immediateAccept: false
   470               acceptOnReturn: true
   471               acceptOnTab: true
   472               acceptOnLostFocus: true
   473               acceptOnPointerLeave: true
   474             )
   475            (LabelSpec
   476               label: 'HTML Color Name:'
   477               name: 'HTMLColorNameLabel'
   478               layout: (LayoutFrame 4 0 204 0 110 0 226 0)
   479               translateLabel: true
   480               adjust: right
   481             )
   482            (InputFieldSpec
   483               name: 'MLHTColorNameFieldField'
   484               layout: (LayoutFrame 108 0 204 0 -162 1 226 0)
   485               model: htmlColorNameHolder
   486               immediateAccept: false
   487               acceptOnReturn: true
   488               acceptOnTab: true
   489               acceptOnLostFocus: true
   490               acceptOnPointerLeave: true
   491             )
   492            (ActionButtonSpec
   493               label: 'Copy Color'
   494               name: 'CopyColor'
   495               layout: (LayoutFrame 12 0 236 0 100 0 258 0)
   496               activeHelpKey: hlsMixer
   497               translateLabel: true
   498               resizeForLabel: true
   499               tabable: true
   500               model: copyColor
   501             )
   502            (ActionButtonSpec
   503               label: 'Paste Color'
   504               name: 'PasteColor'
   505               layout: (LayoutFrame 108 0 236 0 196 0 258 0)
   506               translateLabel: true
   507               resizeForLabel: true
   508               tabable: true
   509               model: pasteColor
   510             )
   511            (ActionButtonSpec
   512               label: 'pickColorIcon'
   513               name: 'Button1'
   514               layout: (LayoutFrame 285 0 236 0 312 0 263 0)
   515               activeHelpKey: pickColor
   516               hasCharacterOrientedLabel: false
   517               translateLabel: true
   518               resizeForLabel: true
   519               tabable: true
   520               model: pickColor
   521             )
   522            (HorizontalPanelViewSpec
   523               name: 'HorizontalPanel1'
   524               layout: (LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
   525               horizontalLayout: fitSpace
   526               verticalLayout: centerMax
   527               horizontalSpace: 3
   528               verticalSpace: 3
   529               reverseOrderIfOKAtLeft: true
   530               component: 
   531              (SpecCollection
   532                 collection: (
   533                  (ActionButtonSpec
   534                     label: 'Cancel'
   535                     name: 'CancelButton'
   536                     translateLabel: true
   537                     resizeForLabel: false
   538                     tabable: true
   539                     model: cancel
   540                     useDefaultExtent: true
   541                   )
   542                  (ActionButtonSpec
   543                     label: 'OK'
   544                     name: 'OKButton'
   545                     translateLabel: true
   546                     resizeForLabel: false
   547                     tabable: true
   548                     model: accept
   549                     isDefault: true
   550                     defaultable: true
   551                     useDefaultExtent: true
   552                   )
   553                  )
   554                
   555               )
   556             )
   557            )
   558          
   559         )
   560       )
   561 ! !
   562 
   563 !ColorEditDialog class methodsFor:'startup'!
   564 
   565 openOn:aColor
   566     ^ self new
   567         color:aColor;
   568         open;
   569         yourself
   570 
   571     "
   572      self openOn:Color red
   573     "
   574 ! !
   575 
   576 !ColorEditDialog methodsFor:'accessing'!
   577 
   578 color
   579     |colorName|
   580 
   581     colorName := self colorName.
   582     colorName notEmptyOrNil ifTrue:[
   583         "/ ^ Color name:(colorName asSymbol)
   584         ^ colorName asSymbol
   585     ].
   586     ^ Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
   587 !
   588 
   589 color:aColor
   590     aColor isNil ifTrue:[
   591         ^ self
   592     ].
   593 
   594     aColor isSymbol ifTrue:[
   595         self colorNameHolder value:aColor
   596     ] ifFalse:[
   597         self red value:aColor redByte.
   598         self green value:aColor greenByte.
   599         self blue value:aColor blueByte.
   600     ]
   601 !
   602 
   603 colorName
   604     ^ colorNameHolder value
   605 !
   606 
   607 htmlColorName
   608     ^ htmlColorNameHolder value
   609 ! !
   610 
   611 !ColorEditDialog methodsFor:'actions'!
   612 
   613 colorChanged
   614     |clr|
   615 
   616     clr := self color.
   617     clr isColor ifTrue:[
   618         "not a symbol"
   619         self setPreview:clr.
   620         self htmlColorNameHolder value:(clr htmlPrintString) withoutNotifying:self.
   621     ].
   622 !
   623 
   624 colorChangedTo:clr
   625     "compute rgb and hls (if possible)"
   626 
   627     |h|
   628 
   629     self red   value:clr redByte withoutNotifying:self.
   630     self green value:clr greenByte withoutNotifying:self.
   631     self blue  value:clr blueByte withoutNotifying:self.
   632 
   633     h := clr hue.
   634     h notNil ifTrue:[
   635         self hue        value:(h rounded) withoutNotifying:self.
   636     ].
   637     self light      value:(clr light rounded) withoutNotifying:self.
   638     self saturation value:(clr saturation rounded) withoutNotifying:self.
   639 
   640     self colorChanged
   641 !
   642 
   643 colorNameChanged
   644     "compute rgb and hls (if possible)"
   645 
   646     |clr|
   647 
   648     clr := Color name:colorNameHolder value ifIllegal:nil.
   649     clr isNil ifTrue:[
   650         ^ self
   651     ].
   652     self colorChangedTo:clr.
   653 !
   654 
   655 copyColor
   656     self window setClipboardObject:self color
   657 !
   658 
   659 copyColorName
   660     self window setClipboardText:self htmlColorName
   661 !
   662 
   663 hlsSliderChanged
   664     "compute rgb"
   665 
   666     Color withRGBFromHue:hue value light:light value saturation:saturation value do:[:r :g :b |
   667         red    value:(r * 255 / 100) rounded withoutNotifying:self.
   668         green  value:(g * 255 / 100) rounded withoutNotifying:self.
   669         blue   value:(b * 255 / 100) rounded withoutNotifying:self.
   670     ].
   671     colorNameHolder value:'' withoutNotifying:self.
   672     self colorChanged
   673 !
   674 
   675 htmlColorNameChanged
   676     "compute rgb and hls (if possible)"
   677 
   678     |clr|
   679 
   680     htmlColorNameHolder value isEmptyOrNil ifTrue:[
   681         ^ self.
   682     ].
   683 
   684     clr := Color rgbValue:(Integer 
   685                                 readFrom:(htmlColorNameHolder value copyFrom:2)
   686                                 radix:16
   687                                 onError:nil).
   688     clr isNil ifTrue:[
   689         ^ self
   690     ].
   691     self colorNameHolder value:'' withoutNotifying:self.
   692     self colorChangedTo:clr.
   693 !
   694 
   695 pasteColor
   696     |copyBufferColor|
   697 
   698     copyBufferColor := self window getClipboardObject.
   699     copyBufferColor isColor ifFalse:[
   700         UserPreferences current beepInEditor ifTrue:[                
   701             self window beep.
   702         ].
   703         ^ self
   704     ].
   705     self color:copyBufferColor
   706 !
   707 
   708 pickColor
   709     |color|
   710 
   711     color := Color fromUserWithFeedBack:[:clr | self setPreview:clr].
   712     color notNil ifTrue:[
   713         self color:color.
   714     ]
   715 !
   716 
   717 rgbSliderChanged
   718     "compute hls"
   719 
   720     |r g b|
   721 
   722     r := self red value.
   723     g := self green value.
   724     b := self blue value.
   725 
   726     Color withHLSFromRed:(r * 100 / 255) green:(g * 100 / 255) blue:(b * 100 / 255) do:[:h :l :s |
   727         h isNil ifTrue:[
   728             "/ achromatic
   729         ] ifFalse:[
   730             self hue    value:(h rounded) withoutNotifying:self.
   731         ].
   732         self light      value:(l rounded) withoutNotifying:self.
   733         self saturation value:(s rounded) withoutNotifying:self.
   734     ].
   735     self colorNameHolder value:'' withoutNotifying:self.
   736     self colorChanged
   737 !
   738 
   739 setPreview:color
   740     previewBox isNil ifTrue:[^ self "called before setup"].
   741 
   742     previewBox backgroundColor:color.
   743     previewBox foregroundColor:(color brightness < 0.5 
   744                             ifTrue:[Color white] 
   745                             ifFalse:[Color black]).
   746 ! !
   747 
   748 !ColorEditDialog methodsFor:'aspects'!
   749 
   750 blue
   751     blue isNil ifTrue:[
   752         blue := 0 asValue.
   753         blue addDependent:self.
   754     ].
   755     ^blue
   756 !
   757 
   758 colorNameHolder
   759     colorNameHolder isNil ifTrue:[
   760         colorNameHolder := '' asValue.
   761         colorNameHolder addDependent:self.
   762     ].
   763     ^colorNameHolder
   764 !
   765 
   766 green
   767     green isNil ifTrue:[
   768         green := 0 asValue.
   769         green addDependent:self.
   770     ].
   771     ^green
   772 !
   773 
   774 htmlColorNameHolder
   775     htmlColorNameHolder isNil ifTrue:[
   776         htmlColorNameHolder := '' asValue.
   777         htmlColorNameHolder addDependent:self.
   778     ].
   779     ^htmlColorNameHolder
   780 !
   781 
   782 hue
   783     hue isNil ifTrue:[
   784         hue := 0 asValue.
   785         hue addDependent:self.
   786     ].
   787     ^hue
   788 !
   789 
   790 light
   791     light isNil ifTrue:[
   792         light := 0 asValue.
   793         light addDependent:self.
   794     ].
   795     ^light
   796 !
   797 
   798 red
   799     red isNil ifTrue:[
   800         red := 0 asValue.
   801         red addDependent:self.
   802     ].
   803     ^red
   804 !
   805 
   806 saturation
   807     saturation isNil ifTrue:[
   808         saturation := 0 asValue.
   809         saturation addDependent:self.
   810     ].
   811     ^saturation
   812 ! !
   813 
   814 !ColorEditDialog methodsFor:'change & update'!
   815 
   816 update:something with:aParameter from:changedObject
   817     (changedObject == red
   818     or:[changedObject == green
   819     or:[changedObject == blue]]) ifTrue:[
   820         self rgbSliderChanged.
   821         ^ self
   822     ].
   823 
   824     (changedObject == hue
   825     or:[changedObject == light
   826     or:[changedObject == saturation]]) ifTrue:[
   827         self hlsSliderChanged.
   828         ^ self
   829     ].
   830 
   831     (changedObject == colorNameHolder) ifTrue:[
   832         self colorNameChanged.
   833         ^ self
   834     ].
   835     (changedObject == htmlColorNameHolder) ifTrue:[
   836         self htmlColorNameChanged.
   837         ^ self
   838     ].
   839 
   840     super update:something with:aParameter from:changedObject
   841 ! !
   842 
   843 !ColorEditDialog methodsFor:'startup & release'!
   844 
   845 postBuildPreviewBox:aView
   846     previewBox := aView
   847 !
   848 
   849 postBuildWith:aBuilder
   850     super postBuildWith:aBuilder.
   851     self colorChanged.
   852 
   853     "Modified: / 6.9.1998 / 22:55:25 / cg"
   854 ! !
   855 
   856 !ColorEditDialog class methodsFor:'documentation'!
   857 
   858 version
   859     ^ '$Header$'
   860 ! !