HierarchicalListEditor.st
changeset 430 fa18d386b936
parent 423 ea6880a0e024
child 433 18af3da84277
equal deleted inserted replaced
429:132c3299631c 430:fa18d386b936
    77      
    77      
    78        #(#FullSpec
    78        #(#FullSpec
    79           #'window:' 
    79           #'window:' 
    80            #(#WindowSpec
    80            #(#WindowSpec
    81               #'name:' 'Painter'
    81               #'name:' 'Painter'
    82               #'layout:' #(#LayoutFrame 202 0 207 0 502 0 335 0)
    82               #'layout:' #(#LayoutFrame 233 0 430 0 533 0 558 0)
    83               #'label:' 'Painter'
    83               #'label:' 'Painter'
    84               #'min:' #(#Point 10 10)
    84               #'min:' #(#Point 10 10)
    85               #'max:' #(#Point 1160 870)
    85               #'max:' #(#Point 1160 870)
    86               #'bounds:' #(#Rectangle 202 207 503 336)
    86               #'bounds:' #(#Rectangle 233 430 534 559)
    87               #'usePreferredExtent:' false
    87               #'usePreferredExtent:' false
    88           )
    88           )
    89           #'component:' 
    89           #'component:' 
    90            #(#SpecCollection
    90            #(#SpecCollection
    91               #'collection:' 
    91               #'collection:' 
   122                     #'layout:' #(#LayoutFrame 47 0.11 64 0 -2 1.0 86 0)
   122                     #'layout:' #(#LayoutFrame 47 0.11 64 0 -2 1.0 86 0)
   123                     #'tabable:' true
   123                     #'tabable:' true
   124                     #'model:' #specSelectorChannel
   124                     #'model:' #specSelectorChannel
   125                     #'type:' #string
   125                     #'type:' #string
   126                 )
   126                 )
   127                  #(#HorizontalPanelViewSpec
   127                  #(#UISubSpecification
   128                     #'name:' 'commitPanel'
   128                     #'name:' 'SubSpecification'
   129                     #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
   129                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
   130                     #'component:' 
   130                     #'majorKey:' #ToolApplicationModel
   131                      #(#SpecCollection
   131                     #'minorKey:' #windowSpecForCommitWithoutChannels
   132                         #'collection:' 
       
   133                          #(
       
   134                            #(#ActionButtonSpec
       
   135                               #'name:' 'cancel'
       
   136                               #'label:' 'Cancel'
       
   137                               #'tabable:' true
       
   138                               #'model:' #cancel
       
   139                               #'extent:' #(#Point 146 24)
       
   140                           )
       
   141                            #(#ActionButtonSpec
       
   142                               #'name:' 'accept'
       
   143                               #'label:' 'OK'
       
   144                               #'tabable:' true
       
   145                               #'model:' #accept
       
   146                               #'isDefault:' true
       
   147                               #'extent:' #(#Point 146 24)
       
   148                           )
       
   149                         )
       
   150                     )
       
   151                     #'horizontalLayout:' #fitSpace
       
   152                     #'verticalLayout:' #fit
       
   153                     #'horizontalSpace:' 3
       
   154                     #'verticalSpace:' 3
       
   155                 )
   132                 )
   156               )
   133               )
   157           )
   134           )
   158       )
   135       )
   159 !
   136 !
   181                 #'labelImage:' #(#ResourceRetriever #UIPainter #icon)
   158                 #'labelImage:' #(#ResourceRetriever #UIPainter #icon)
   182                 #'submenuChannel:' #menuAbout
   159                 #'submenuChannel:' #menuAbout
   183             )
   160             )
   184              #(#MenuItem
   161              #(#MenuItem
   185                 #'label:' 'File'
   162                 #'label:' 'File'
   186                 #'accessCharacterPosition:' 1
       
   187                 #'submenu:' 
   163                 #'submenu:' 
   188                  #(#Menu
   164                  #(#Menu
   189                     
   165                     
   190                      #(
   166                      #(
   191                        #(#MenuItem
   167                        #(#MenuItem
   228                     nil
   204                     nil
   229                 )
   205                 )
   230             )
   206             )
   231              #(#MenuItem
   207              #(#MenuItem
   232                 #'label:' 'Edit'
   208                 #'label:' 'Edit'
   233                 #'accessCharacterPosition:' 1
       
   234                 #'submenuChannel:' #menuEdit
   209                 #'submenuChannel:' #menuEdit
   235             )
   210             )
   236              #(#MenuItem
   211              #(#MenuItem
   237                 #'label:' 'Browse'
   212                 #'label:' 'Browse'
   238                 #'enabled:' #hasValidClass
   213                 #'enabled:' #hasValidClass
   239                 #'accessCharacterPosition:' 1
       
   240                 #'submenu:' 
   214                 #'submenu:' 
   241                  #(#Menu
   215                  #(#Menu
   242                     
   216                     
   243                      #(
   217                      #(
   244                        #(#MenuItem
   218                        #(#MenuItem
   358              #(#MenuItem
   332              #(#MenuItem
   359                 #'label:' 'Create Child'
   333                 #'label:' 'Create Child'
   360                 #'isButton:' true
   334                 #'isButton:' true
   361                 #'value:' #doCreateChild
   335                 #'value:' #doCreateChild
   362                 #'enabled:' #canCreateChildChannel
   336                 #'enabled:' #canCreateChildChannel
   363                 #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage)
   337                 #'labelImage:' #(#ResourceRetriever nil #createChildIcon)
   364             )
   338             )
   365              #(#MenuItem
   339              #(#MenuItem
   366                 #'label:' 'Create Sister'
   340                 #'label:' 'Create Sister'
   367                 #'isButton:' true
   341                 #'isButton:' true
   368                 #'value:' #doCreateSister
   342                 #'value:' #doCreateSister
   369                 #'enabled:' #canCreateSisterChannel
   343                 #'enabled:' #canCreateSisterChannel
   370                 #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage)
   344                 #'labelImage:' #(#ResourceRetriever nil #createSisterIcon)
   371             )
   345             )
   372              #(#MenuItem
   346              #(#MenuItem
   373                 #'label:' ''
   347                 #'label:' ''
   374             )
   348             )
   375              #(#MenuItem
   349              #(#MenuItem
   422      
   396      
   423        #(#FullSpec
   397        #(#FullSpec
   424           #'window:' 
   398           #'window:' 
   425            #(#WindowSpec
   399            #(#WindowSpec
   426               #'name:' 'Painter'
   400               #'name:' 'Painter'
   427               #'layout:' #(#LayoutFrame 153 0 206 0 433 0 284 0)
   401               #'layout:' #(#LayoutFrame 151 0 377 0 431 0 455 0)
   428               #'label:' 'Painter'
   402               #'label:' 'Painter'
   429               #'min:' #(#Point 10 10)
   403               #'min:' #(#Point 10 10)
   430               #'max:' #(#Point 1160 870)
   404               #'max:' #(#Point 1160 870)
   431               #'bounds:' #(#Rectangle 153 206 434 285)
   405               #'bounds:' #(#Rectangle 151 377 432 456)
   432               #'usePreferredExtent:' false
   406               #'usePreferredExtent:' false
   433           )
   407           )
   434           #'component:' 
   408           #'component:' 
   435            #(#SpecCollection
   409            #(#SpecCollection
   436               #'collection:' 
   410               #'collection:' 
   447                     #'layout:' #(#LayoutFrame 0 0.0 22 0 0 1.0 44 0)
   421                     #'layout:' #(#LayoutFrame 0 0.0 22 0 0 1.0 44 0)
   448                     #'tabable:' true
   422                     #'tabable:' true
   449                     #'model:' #specSelectorChannel
   423                     #'model:' #specSelectorChannel
   450                     #'type:' #string
   424                     #'type:' #string
   451                 )
   425                 )
   452                  #(#HorizontalPanelViewSpec
   426                  #(#UISubSpecification
   453                     #'name:' 'commitPanel'
   427                     #'name:' 'SubSpecification'
   454                     #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
   428                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
   455                     #'component:' 
   429                     #'majorKey:' #ToolApplicationModel
   456                      #(#SpecCollection
   430                     #'minorKey:' #windowSpecForCommitWithoutChannels
   457                         #'collection:' 
       
   458                          #(
       
   459                            #(#ActionButtonSpec
       
   460                               #'name:' 'cancel'
       
   461                               #'label:' 'Cancel'
       
   462                               #'tabable:' true
       
   463                               #'model:' #cancel
       
   464                               #'extent:' #(#Point 136 24)
       
   465                           )
       
   466                            #(#ActionButtonSpec
       
   467                               #'name:' 'accept'
       
   468                               #'label:' 'OK'
       
   469                               #'tabable:' true
       
   470                               #'model:' #accept
       
   471                               #'isDefault:' true
       
   472                               #'extent:' #(#Point 136 24)
       
   473                           )
       
   474                         )
       
   475                     )
       
   476                     #'horizontalLayout:' #fitSpace
       
   477                     #'verticalLayout:' #fit
       
   478                     #'horizontalSpace:' 3
       
   479                     #'verticalSpace:' 3
       
   480                 )
   431                 )
   481               )
   432               )
   482           )
   433           )
   483       )
   434       )
   484 !
   435 !
   650     ].
   601     ].
   651     aStream nextPut:$).
   602     aStream nextPut:$).
   652     aStream cr.
   603     aStream cr.
   653 ! !
   604 ! !
   654 
   605 
       
   606 !HierarchicalListEditor class methodsFor:'resources'!
       
   607 
       
   608 createChildIcon
       
   609     "ImageEditor openOnClass:self andSelector:#createChildIcon"
       
   610 
       
   611     <resource: #image>
       
   612     ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 5 85 85 85 0 0 7 255 255 255 32 0 7 255 255 255 40 0 7 255 255 255 0 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 204 204 207 14 0 7 60 204 207 50 0 7 60 12 207 50 0 7 60 204 207 50 0 7 204 204 195 14 0 7 255 255 255 254 0 14 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!
       
   613 
       
   614 createSisterIcon
       
   615     "ImageEditor openOnClass:self andSelector:#createSisterIcon"
       
   616 
       
   617     <resource: #image>
       
   618     ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 5 85 85 85 0 0 7 255 255 255 32 0 7 255 255 255 40 0 7 255 255 255 0 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 195 60 63 254 0 7 63 51 255 254 0 7 207 60 240 62 0 7 243 63 63 254 0 7 15 48 255 254 0 7 255 255 255 254 0 7 3 3 15 254 0 7 207 63 51 254 0 7 207 3 15 254 0 7 207 63 51 254 0 7 207 3 51 254 0 7 255 255 255 254 0 14 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself! !
       
   619 
   655 !HierarchicalListEditor methodsFor:'accessing'!
   620 !HierarchicalListEditor methodsFor:'accessing'!
   656 
   621 
   657 didInstall
   622 didInstall
   658     "returns true if spec was installed by operator"
   623     "returns true if spec was installed by operator"
   659 
   624