ImageEditor.st
changeset 688 788fe83ab3c0
parent 679 9cd2115ac627
child 694 88c7004cfb6c
equal deleted inserted replaced
687:363d54091c9e 688:788fe83ab3c0
    59 
    59 
    60 openModalOnClass: aClass andSelector: aSelector
    60 openModalOnClass: aClass andSelector: aSelector
    61 
    61 
    62     "self openModalOnClass: self andSelector: #newImageIcon"
    62     "self openModalOnClass: self andSelector: #newImageIcon"
    63 
    63 
    64     |imageEditor className resourceClassName resourceSelector|                      
    64     |imageEditor imageEditView className resourceClassName resourceSelector|                      
    65     imageEditor := self new.
    65     imageEditor := self new.
    66     aClass isClass ifTrue: [className := aClass name].
    66     aClass isClass ifTrue: [className := aClass name].
    67     aClass isString ifTrue: [className := aClass].      
    67     aClass isString ifTrue: [className := aClass].      
    68 
    68 
    69     imageEditor postOpenAction: [imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
    69     imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
    70     imageEditor openModal.
    70     imageEditor openModal.
    71 
    71 
    72     resourceClassName := imageEditor valueOfResourceClass value.
    72     resourceClassName := imageEditView resourceClass.
    73     resourceSelector := imageEditor valueOfResourceSelector value.
    73     resourceSelector := imageEditView resourceSelector.
    74 
    74 
    75     (className asString ~= resourceClassName) | (aSelector asString ~= resourceSelector)
    75     (className asString ~= resourceClassName) | (aSelector asString ~= resourceSelector)
    76         ifTrue: [^resourceClassName, ' ', resourceSelector]
    76         ifTrue: [^resourceClassName, ' ', resourceSelector]
    77         ifFalse:[^nil]
    77         ifFalse:[^nil]
    78 !
    78 !
   269      
   269      
   270        #(#FullSpec
   270        #(#FullSpec
   271           #window: 
   271           #window: 
   272            #(#WindowSpec
   272            #(#WindowSpec
   273               #name: 'Image Editor'
   273               #name: 'Image Editor'
   274               #layout: #(#LayoutFrame 318 0 314 0 817 0 659 0)
   274               #layout: #(#LayoutFrame 153 0 246 0 652 0 591 0)
   275               #label: 'Image Editor'
   275               #label: 'Image Editor'
   276               #min: #(#Point 400 320)
   276               #min: #(#Point 400 320)
   277               #max: #(#Point 1152 900)
   277               #max: #(#Point 1152 900)
   278               #bounds: #(#Rectangle 318 314 818 660)
   278               #bounds: #(#Rectangle 153 246 653 592)
   279               #menu: #menu
   279               #menu: #menu
   280               #usePreferredExtent: false
   280               #usePreferredExtent: false
   281           )
   281           )
   282           #component: 
   282           #component: 
   283            #(#SpecCollection
   283            #(#SpecCollection
   314                                                   #name: 'View1'
   314                                                   #name: 'View1'
   315                                                   #component: 
   315                                                   #component: 
   316                                                    #(#SpecCollection
   316                                                    #(#SpecCollection
   317                                                       #collection: 
   317                                                       #collection: 
   318                                                        #(
   318                                                        #(
       
   319                                                          #(#MenuPanelSpec
       
   320                                                             #name: 'MenuPanel1'
       
   321                                                             #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
       
   322                                                             #menu: #menuMouseButtonColors
       
   323                                                         )
   319                                                          #(#DataSetSpec
   324                                                          #(#DataSetSpec
   320                                                             #name: 'colorDataSetView'
   325                                                             #name: 'colorDataSetView'
   321                                                             #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -22 1.0)
   326                                                             #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
   322                                                             #activeHelpKey: #colorMapTable
   327                                                             #activeHelpKey: #colorMapTable
   323                                                             #model: #selectionOfColor
   328                                                             #model: #selectionOfColor
   324                                                             #style: #(#FontDescription #helvetica #medium #roman 10)
   329                                                             #style: #(#FontDescription #helvetica #medium #roman 10)
   325                                                             #hasHorizontalScrollBar: true
   330                                                             #hasHorizontalScrollBar: true
   326                                                             #hasVerticalScrollBar: true
   331                                                             #hasVerticalScrollBar: true
   351                                                                   #model: #rowBlueByte
   356                                                                   #model: #rowBlueByte
   352                                                                   #canSelect: false
   357                                                                   #canSelect: false
   353                                                               )
   358                                                               )
   354                                                             )
   359                                                             )
   355                                                         )
   360                                                         )
   356                                                          #(#MenuPanelSpec
       
   357                                                             #name: 'MenuPanel1'
       
   358                                                             #layout: #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
       
   359                                                             #menu: #menuMouseButtonColors
       
   360                                                         )
       
   361                                                       )
   361                                                       )
   362                                                   )
   362                                                   )
   363                                               )
   363                                               )
   364                                                #(#ArbitraryComponentSpec
   364                                                #(#ArbitraryComponentSpec
   365                                                   #name: 'imagePreView'
   365                                                   #name: 'imagePreView'
   367                                                   #hasHorizontalScrollBar: true
   367                                                   #hasHorizontalScrollBar: true
   368                                                   #hasVerticalScrollBar: true
   368                                                   #hasVerticalScrollBar: true
   369                                                   #miniScrollerHorizontal: true
   369                                                   #miniScrollerHorizontal: true
   370                                                   #miniScrollerVertical: true
   370                                                   #miniScrollerVertical: true
   371                                                   #component: #ImageView
   371                                                   #component: #ImageView
   372                                                   #hasBorder: true
   372                                                   #hasBorder: false
   373                                               )
   373                                               )
   374                                             )
   374                                             )
   375                                         )
   375                                         )
   376                                         #handles: #(#Any 0.5 1.0)
   376                                         #handles: #(#Any 0.723776 1.0)
   377                                     )
   377                                     )
   378                                   )
   378                                   )
   379                               )
   379                               )
   380                           )
   380                           )
   381                            #(#ViewSpec
   381                            #(#ViewSpec
   437                 )
   437                 )
   438                  #(#UISubSpecification
   438                  #(#UISubSpecification
   439                     #name: 'infoBarSubSpec'
   439                     #name: 'infoBarSubSpec'
   440                     #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   440                     #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   441                     #majorKey: #ToolApplicationModel
   441                     #majorKey: #ToolApplicationModel
   442                     #minorKey: #windowSpecForInfoBarWithClock
   442                     #minorKey: #windowSpecForInfoBar
   443                 )
   443                 )
   444               )
   444               )
   445           )
   445           )
   446       )
   446       )
   447 !
   447 !