UIPainterView.st
changeset 2526 29b49d1b4d53
parent 2515 d77b8df4f65a
child 2537 12e3b32befe4
equal deleted inserted replaced
2525:16c3872003d7 2526:29b49d1b4d53
  1974     |spec builder specWindow|
  1974     |spec builder specWindow|
  1975 
  1975 
  1976     Cursor wait showWhile: [
  1976     Cursor wait showWhile: [
  1977         self removeAll.
  1977         self removeAll.
  1978         specOrSpecArray notNil ifTrue:[
  1978         specOrSpecArray notNil ifTrue:[
  1979             spec    := UISpecification from:specOrSpecArray.
  1979             spec := UISpecification from:specOrSpecArray.
  1980         ].
  1980         ].
  1981         builder := UIBuilder new isEditing:true.
  1981         builder := UIBuilder new isEditing:true.
  1982         "set applicationClass, in order that subspecifications may be resolved"
  1982         "set applicationClass, in order that subspecifications may be resolved"
  1983         className notNil ifTrue:[
  1983         className notNil ifTrue:[
  1984             builder applicationClass:(self resolveName:className).
  1984             builder applicationClass:(self resolveName:className).
  2206      nil is returned.
  2206      nil is returned.
  2207     "
  2207     "
  2208     |item|
  2208     |item|
  2209 
  2209 
  2210     item := treeView detectItemCorespondingToView:aView.
  2210     item := treeView detectItemCorespondingToView:aView.
  2211 
       
  2212     (item notNil and:[item parent notNil]) ifTrue:[
  2211     (item notNil and:[item parent notNil]) ifTrue:[
  2213         ^ item contents
  2212         ^ item contents
  2214     ].
  2213     ].
  2215     ^ nil
  2214     ^ nil
  2216 !
  2215 !
  2434 
  2433 
  2435     "Modified: 4.7.1997 / 23:48:55 / cg"
  2434     "Modified: 4.7.1997 / 23:48:55 / cg"
  2436 !
  2435 !
  2437 
  2436 
  2438 fullSpecFor:aView
  2437 fullSpecFor:aView
  2439     "generate a full spec for an object
  2438     "generate a full spec for an aView (or component)"
  2440     "
  2439 
  2441     |mySpec subSpecs|
  2440     |mySpec subSpecs|
  2442 
  2441 
  2443     mySpec := self specFor:aView.
  2442     mySpec := self specFor:aView.
  2444     (mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[
  2443     (mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[
  2445         subSpecs isNil ifTrue:[
  2444         subSpecs isNil ifTrue:[
  2546     spec layoutFromView:aView.
  2545     spec layoutFromView:aView.
  2547     ^ spec
  2546     ^ spec
  2548 !
  2547 !
  2549 
  2548 
  2550 specForSelection
  2549 specForSelection
  2551     "returns spec assigned to current single selection or nil
  2550     "returns the spec assigned to current single selection or nil.
  2552     "
  2551      Nil is also returned for multiple selections (sigh)"
  2553     ^ self specFor:(self singleSelection)
  2552 
  2554 
  2553     |theSpec|
  2555 
  2554 
       
  2555     theSpec := self specFor:(self singleSelection).
       
  2556     theSpec isNil ifTrue:[
       
  2557         treeView isCanvasSelected ifTrue:[
       
  2558             theSpec := treeView canvasSpec.
       
  2559         ]
       
  2560     ].
       
  2561     ^ theSpec
  2556 !
  2562 !
  2557 
  2563 
  2558 updateFromSpec:aSpec
  2564 updateFromSpec:aSpec
  2559     "update current selected view from specification
  2565     "update current selected view from specification
  2560     "
  2566     "