UIPropertyView.st
changeset 78 a0a00603a8b6
parent 74 dfa8644e0287
child 83 d9377c397262
equal deleted inserted replaced
77:0d3cc25662d6 78:a0a00603a8b6
    40     <resource: #canvas>
    40     <resource: #canvas>
    41 
    41 
    42     ^
    42     ^
    43      
    43      
    44        #(#FullSpec
    44        #(#FullSpec
    45           #'name:' 'uIPainterView'
       
    46           #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
       
    47           #'window:' 
    45           #'window:' 
    48            #(#WindowSpec
    46            #(#WindowSpec
    49               #'name:' 'uIPainterView'
    47               #'name:' 'uIPainterView'
    50               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
    48               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
    51               #'label:' 'unnamed'
    49               #'label:' 'unnamed'
    52               #'bounds:' #(#Rectangle 0 0 356 379)
    50               #'bounds:' #(#Rectangle 0 0 250 365)
    53           )
    51           )
    54           #'component:' 
    52           #'component:' 
    55            #(#SpecCollection
    53            #(#SpecCollection
    56               #'collection:' 
    54               #'collection:' 
    57                #(
    55                #(
    58                  #(#LabelSpec
    56                  #(#LabelSpec
    59                     #'name:' 'label9'
    57                     #'name:' 'label9'
    60                     #'layout:' #(#AlignmentOrigin 76 0 7 0 1 0)
    58                     #'layout:' #(#AlignmentOrigin 76 0 7 0 1 0)
    61                     #'label:' 'Layout:'
    59                     #'label:' 'Layout:'
    62                     #'initiallyInvisible:' false
    60                     #'initiallyInvisible:' false
       
    61                     #'translateLabel:' false
    63                     #'level:' 0
    62                     #'level:' 0
    64                     #'adjust:' #center
    63                     #'adjust:' #center
    65                     #'hasCharacterOrientedLabel:' true
    64                     #'hasCharacterOrientedLabel:' true
    66                 )
    65                 )
    67                  #(#PopUpListSpec
    66                  #(#PopUpListSpec
    68                     #'name:' 'popUpList1'
    67                     #'name:' 'popUpList1'
    69                     #'layout:' #(#LayoutFrame 79 0.0 7 0 -6 1.0 30 0)
    68                     #'layout:' #(#LayoutFrame 79 0.0 7 0 -6 1.0 30 0)
    70                     #'label:' 'popup'
    69                     #'label:' 'popup'
    71                     #'initiallyInvisible:' false
    70                     #'initiallyInvisible:' false
       
    71                     #'translateLabel:' false
    72                     #'model:' #layoutType
    72                     #'model:' #layoutType
    73                     #'menu:' #layoutTypeList
    73                     #'menu:' #layoutTypeList
    74                 )
    74                 )
    75                  #(#LabelSpec
    75                  #(#LabelSpec
    76                     #'name:' 'label2'
    76                     #'name:' 'label2'
    77                     #'layout:' #(#AlignmentOrigin 49 0 103 0 1 0)
    77                     #'layout:' #(#AlignmentOrigin 49 0 103 0 1 0)
    78                     #'label:' 'top'
    78                     #'label:' 'top'
    79                     #'initiallyInvisible:' false
    79                     #'initiallyInvisible:' false
       
    80                     #'translateLabel:' false
    80                     #'level:' 0
    81                     #'level:' 0
    81                     #'adjust:' #right
    82                     #'adjust:' #right
    82                     #'hasCharacterOrientedLabel:' true
    83                     #'hasCharacterOrientedLabel:' true
    83                 )
    84                 )
    84                  #(#LabelSpec
    85                  #(#LabelSpec
    85                     #'name:' 'label3'
    86                     #'name:' 'label3'
    86                     #'layout:' #(#Point 58 48)
    87                     #'layout:' #(#Point 58 48)
    87                     #'label:' 'relative'
    88                     #'label:' 'relative'
    88                     #'initiallyInvisible:' false
    89                     #'initiallyInvisible:' false
       
    90                     #'translateLabel:' false
    89                     #'level:' 0
    91                     #'level:' 0
    90                     #'adjust:' #center
    92                     #'adjust:' #center
    91                     #'hasCharacterOrientedLabel:' true
    93                     #'hasCharacterOrientedLabel:' true
    92                 )
    94                 )
    93                  #(#LabelSpec
    95                  #(#LabelSpec
    94                     #'name:' 'label4'
    96                     #'name:' 'label4'
    95                     #'layout:' #(#Point 154 49)
    97                     #'layout:' #(#Point 154 49)
    96                     #'label:' 'offset'
    98                     #'label:' 'offset'
    97                     #'initiallyInvisible:' false
    99                     #'initiallyInvisible:' false
       
   100                     #'translateLabel:' false
    98                     #'level:' 0
   101                     #'level:' 0
    99                     #'adjust:' #center
   102                     #'adjust:' #center
   100                     #'hasCharacterOrientedLabel:' true
   103                     #'hasCharacterOrientedLabel:' true
   101                 )
   104                 )
   102                  #(#LabelSpec
   105                  #(#LabelSpec
   103                     #'name:' 'label5'
   106                     #'name:' 'label5'
   104                     #'layout:' #(#AlignmentOrigin 63 0 175 0 1 0)
   107                     #'layout:' #(#AlignmentOrigin 63 0 175 0 1 0)
   105                     #'label:' 'align H'
   108                     #'label:' 'align H'
   106                     #'initiallyInvisible:' false
   109                     #'initiallyInvisible:' false
       
   110                     #'translateLabel:' false
   107                     #'level:' 0
   111                     #'level:' 0
   108                     #'adjust:' #right
   112                     #'adjust:' #right
   109                     #'hasCharacterOrientedLabel:' true
   113                     #'hasCharacterOrientedLabel:' true
   110                 )
   114                 )
   111                  #(#LabelSpec
   115                  #(#LabelSpec
   112                     #'name:' 'label6'
   116                     #'name:' 'label6'
   113                     #'layout:' #(#AlignmentOrigin 63 0 201 0 1 0)
   117                     #'layout:' #(#AlignmentOrigin 63 0 201 0 1 0)
   114                     #'label:' 'align V'
   118                     #'label:' 'align V'
   115                     #'initiallyInvisible:' false
   119                     #'initiallyInvisible:' false
       
   120                     #'translateLabel:' false
   116                     #'level:' 0
   121                     #'level:' 0
   117                     #'adjust:' #right
   122                     #'adjust:' #right
   118                     #'hasCharacterOrientedLabel:' true
   123                     #'hasCharacterOrientedLabel:' true
   119                 )
   124                 )
   120                  #(#InputFieldSpec
   125                  #(#InputFieldSpec
   197                 )
   202                 )
   198                  #(#ActionButtonSpec
   203                  #(#ActionButtonSpec
   199                     #'name:' 'button1'
   204                     #'name:' 'button1'
   200                     #'layout:' #(#LayoutFrame 119 0 76 0 138 0 94 0)
   205                     #'layout:' #(#LayoutFrame 119 0 76 0 138 0 94 0)
   201                     #'label:' ''
   206                     #'label:' ''
       
   207                     #'translateLabel:' false
   202                     #'tabable:' false
   208                     #'tabable:' false
   203                     #'model:' #makeRelativeLeft
   209                     #'model:' #makeRelativeLeft
   204                 )
   210                 )
   205                  #(#ActionButtonSpec
   211                  #(#ActionButtonSpec
   206                     #'name:' 'button2'
   212                     #'name:' 'button2'
   207                     #'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
   213                     #'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
   208                     #'label:' ''
   214                     #'label:' ''
       
   215                     #'translateLabel:' false
   209                     #'tabable:' false
   216                     #'tabable:' false
   210                     #'model:' #makeRelativeTop
   217                     #'model:' #makeRelativeTop
   211                 )
   218                 )
   212                  #(#ActionButtonSpec
   219                  #(#ActionButtonSpec
   213                     #'name:' 'button3'
   220                     #'name:' 'button3'
   214                     #'layout:' #(#LayoutFrame 217 0 76 0 236 0 94 0)
   221                     #'layout:' #(#LayoutFrame 217 0 76 0 236 0 94 0)
   215                     #'label:' ''
   222                     #'label:' ''
       
   223                     #'translateLabel:' false
   216                     #'tabable:' false
   224                     #'tabable:' false
   217                     #'model:' #makeOffsetLeft
   225                     #'model:' #makeOffsetLeft
   218                 )
   226                 )
   219                  #(#ActionButtonSpec
   227                  #(#ActionButtonSpec
   220                     #'name:' 'button4'
   228                     #'name:' 'button4'
   221                     #'layout:' #(#LayoutFrame 217 0 103 0 236 0 121 0)
   229                     #'layout:' #(#LayoutFrame 217 0 103 0 236 0 121 0)
   222                     #'label:' ''
   230                     #'label:' ''
       
   231                     #'translateLabel:' false
   223                     #'tabable:' false
   232                     #'tabable:' false
   224                     #'model:' #makeOffsetTop
   233                     #'model:' #makeOffsetTop
   225                 )
   234                 )
   226                  #(#ActionButtonSpec
   235                  #(#ActionButtonSpec
   227                     #'name:' 'button8'
   236                     #'name:' 'button8'
   228                     #'layout:' #(#LayoutFrame 119 0 137 0 138 0 155 0)
   237                     #'layout:' #(#LayoutFrame 119 0 137 0 138 0 155 0)
   229                     #'label:' ''
   238                     #'label:' ''
       
   239                     #'translateLabel:' false
   230                     #'tabable:' false
   240                     #'tabable:' false
   231                     #'model:' #makeRelativeLeftTop
   241                     #'model:' #makeRelativeLeftTop
   232                 )
   242                 )
   233                  #(#ActionButtonSpec
   243                  #(#ActionButtonSpec
   234                     #'name:' 'button9'
   244                     #'name:' 'button9'
   235                     #'layout:' #(#LayoutFrame 217 0 137 0 236 0 155 0)
   245                     #'layout:' #(#LayoutFrame 217 0 137 0 236 0 155 0)
   236                     #'label:' ''
   246                     #'label:' ''
       
   247                     #'translateLabel:' false
   237                     #'tabable:' false
   248                     #'tabable:' false
   238                     #'model:' #makeOffsetLeftTop
   249                     #'model:' #makeOffsetLeftTop
   239                 )
   250                 )
   240                  #(#LabelSpec
   251                  #(#LabelSpec
   241                     #'name:' 'label7'
   252                     #'name:' 'label7'
   242                     #'layout:' #(#AlignmentOrigin 49 0 137 0 1 0)
   253                     #'layout:' #(#AlignmentOrigin 49 0 137 0 1 0)
   243                     #'label:' 'all'
   254                     #'label:' 'all'
   244                     #'initiallyInvisible:' false
   255                     #'initiallyInvisible:' false
       
   256                     #'translateLabel:' false
   245                     #'level:' 0
   257                     #'level:' 0
   246                     #'adjust:' #right
   258                     #'adjust:' #right
   247                     #'hasCharacterOrientedLabel:' true
   259                     #'hasCharacterOrientedLabel:' true
   248                 )
   260                 )
   249                  #(#LabelSpec
   261                  #(#LabelSpec
   250                     #'name:' 'label1'
   262                     #'name:' 'label1'
   251                     #'layout:' #(#AlignmentOrigin 49 0 76 0 1 0)
   263                     #'layout:' #(#AlignmentOrigin 49 0 76 0 1 0)
   252                     #'label:' 'left'
   264                     #'label:' 'left'
   253                     #'initiallyInvisible:' false
   265                     #'initiallyInvisible:' false
       
   266                     #'translateLabel:' false
   254                     #'level:' 0
   267                     #'level:' 0
   255                     #'adjust:' #right
   268                     #'adjust:' #right
   256                     #'hasCharacterOrientedLabel:' true
   269                     #'hasCharacterOrientedLabel:' true
   257                 )
   270                 )
   258                  #(#DividerSpec
   271                  #(#DividerSpec
   259                     #'name:' 'separator1'
   272                     #'name:' 'separator1'
   260                     #'layout:' #(#Rectangle 154 177 203 188)
   273                     #'layout:' #(#Rectangle 154 177 203 188)
       
   274                     #'orientation:' #horizontal
   261                 )
   275                 )
   262                  #(#DividerSpec
   276                  #(#DividerSpec
   263                     #'name:' 'separator2'
   277                     #'name:' 'separator2'
   264                     #'layout:' #(#Rectangle 154 208 203 219)
   278                     #'layout:' #(#Rectangle 154 208 203 219)
       
   279                     #'orientation:' #horizontal
   265                 )
   280                 )
   266                  #(#DividerSpec
   281                  #(#DividerSpec
   267                     #'name:' 'separator3'
   282                     #'name:' 'separator3'
   268                     #'layout:' #(#Rectangle 145 187 155 208)
   283                     #'layout:' #(#Rectangle 145 187 155 208)
   269                     #'orientation:' #vertical
   284                     #'orientation:' #vertical
   275                 )
   290                 )
   276                  #(#ActionButtonSpec
   291                  #(#ActionButtonSpec
   277                     #'name:' 'alignBR'
   292                     #'name:' 'alignBR'
   278                     #'layout:' #(#Rectangle 201 207 213 219)
   293                     #'layout:' #(#Rectangle 201 207 213 219)
   279                     #'label:' ''
   294                     #'label:' ''
       
   295                     #'translateLabel:' false
   280                     #'tabable:' false
   296                     #'tabable:' false
   281                     #'model:' #makeAlignBottomRight
   297                     #'model:' #makeAlignBottomRight
   282                 )
   298                 )
   283                  #(#ActionButtonSpec
   299                  #(#ActionButtonSpec
   284                     #'name:' 'alignTL'
   300                     #'name:' 'alignTL'
   285                     #'layout:' #(#Rectangle 145 176 157 188)
   301                     #'layout:' #(#Rectangle 145 176 157 188)
   286                     #'label:' ''
   302                     #'label:' ''
       
   303                     #'translateLabel:' false
   287                     #'tabable:' false
   304                     #'tabable:' false
   288                     #'model:' #makeAlignTopLeft
   305                     #'model:' #makeAlignTopLeft
   289                 )
   306                 )
   290                  #(#ActionButtonSpec
   307                  #(#ActionButtonSpec
   291                     #'name:' 'alignTR'
   308                     #'name:' 'alignTR'
   292                     #'layout:' #(#Rectangle 201 176 213 188)
   309                     #'layout:' #(#Rectangle 201 176 213 188)
   293                     #'label:' ''
   310                     #'label:' ''
       
   311                     #'translateLabel:' false
   294                     #'tabable:' false
   312                     #'tabable:' false
   295                     #'model:' #makeAlignTopRight
   313                     #'model:' #makeAlignTopRight
   296                 )
   314                 )
   297                  #(#ActionButtonSpec
   315                  #(#ActionButtonSpec
   298                     #'name:' 'alignBL'
   316                     #'name:' 'alignBL'
   299                     #'layout:' #(#Rectangle 145 206 157 218)
   317                     #'layout:' #(#Rectangle 145 206 157 218)
   300                     #'label:' ''
   318                     #'label:' ''
       
   319                     #'translateLabel:' false
   301                     #'tabable:' false
   320                     #'tabable:' false
   302                     #'model:' #makeAlignBottomLeft
   321                     #'model:' #makeAlignBottomLeft
   303                 )
   322                 )
   304                  #(#ActionButtonSpec
   323                  #(#ActionButtonSpec
   305                     #'name:' 'alignTC'
   324                     #'name:' 'alignTC'
   306                     #'layout:' #(#Rectangle 173 176 185 188)
   325                     #'layout:' #(#Rectangle 173 176 185 188)
   307                     #'label:' ''
   326                     #'label:' ''
       
   327                     #'translateLabel:' false
   308                     #'tabable:' false
   328                     #'tabable:' false
   309                     #'model:' #makeAlignTopCenter
   329                     #'model:' #makeAlignTopCenter
   310                 )
   330                 )
   311                  #(#ActionButtonSpec
   331                  #(#ActionButtonSpec
   312                     #'name:' 'alignBC'
   332                     #'name:' 'alignBC'
   313                     #'layout:' #(#Rectangle 173 207 185 219)
   333                     #'layout:' #(#Rectangle 173 207 185 219)
   314                     #'label:' ''
   334                     #'label:' ''
       
   335                     #'translateLabel:' false
   315                     #'tabable:' false
   336                     #'tabable:' false
   316                     #'model:' #makeAlignBottomCenter
   337                     #'model:' #makeAlignBottomCenter
   317                 )
   338                 )
   318                  #(#ActionButtonSpec
   339                  #(#ActionButtonSpec
   319                     #'name:' 'alignLC'
   340                     #'name:' 'alignLC'
   320                     #'layout:' #(#Rectangle 145 191 157 203)
   341                     #'layout:' #(#Rectangle 145 191 157 203)
   321                     #'label:' ''
   342                     #'label:' ''
       
   343                     #'translateLabel:' false
   322                     #'tabable:' false
   344                     #'tabable:' false
   323                     #'model:' #makeAlignLeftCenter
   345                     #'model:' #makeAlignLeftCenter
   324                 )
   346                 )
   325                  #(#ActionButtonSpec
   347                  #(#ActionButtonSpec
   326                     #'name:' 'alignRC'
   348                     #'name:' 'alignRC'
   327                     #'layout:' #(#Rectangle 201 191 213 203)
   349                     #'layout:' #(#Rectangle 201 191 213 203)
   328                     #'label:' ''
   350                     #'label:' ''
       
   351                     #'translateLabel:' false
   329                     #'tabable:' false
   352                     #'tabable:' false
   330                     #'model:' #makeAlignRightCenter
   353                     #'model:' #makeAlignRightCenter
   331                 )
   354                 )
   332                  #(#ActionButtonSpec
   355                  #(#ActionButtonSpec
   333                     #'name:' 'alignC'
   356                     #'name:' 'alignC'
   334                     #'layout:' #(#Rectangle 173 191 185 203)
   357                     #'layout:' #(#Rectangle 173 191 185 203)
   335                     #'label:' ''
   358                     #'label:' ''
       
   359                     #'translateLabel:' false
   336                     #'tabable:' false
   360                     #'tabable:' false
   337                     #'model:' #makeAlignCenter
   361                     #'model:' #makeAlignCenter
   338                 )
   362                 )
   339               )
   363               )
   340           )
   364           )
  1213         specChannel := nil.
  1237         specChannel := nil.
  1214       ^ self propertyList:nil
  1238       ^ self propertyList:nil
  1215     ].
  1239     ].
  1216 
  1240 
  1217     prevSpecClass   := specBeingEdited class.
  1241     prevSpecClass   := specBeingEdited class.
  1218     specBeingEdited := (builderView generateSpecFor:currentView) first.
  1242     specBeingEdited := builderView specFor:currentView.
  1219 
  1243 
  1220     (    (specBeingEdited class == prevSpecClass)
  1244     (    (specBeingEdited class == prevSpecClass)
  1221      and:[specChannel notNil]
  1245      and:[specChannel notNil]
  1222     ) ifTrue:[
  1246     ) ifTrue:[
  1223         "can keep current specifications plus current property selection
  1247         "can keep current specifications plus current property selection
  1814 
  1838 
  1815 cancel
  1839 cancel
  1816     "cancel all changes and read back attributes from current view
  1840     "cancel all changes and read back attributes from current view
  1817     "
  1841     "
  1818     modified ifTrue:[
  1842     modified ifTrue:[
  1819         specBeingEdited := (builderView generateSpecFor:currentView) first.
  1843         specBeingEdited := builderView specFor:currentView.
  1820         self reload
  1844         self reload
  1821     ].
  1845     ].
  1822 !
  1846 !
  1823 
  1847 
  1824 propertyList
  1848 propertyList