UIPainter.st
changeset 808 4e2ab5e77344
parent 807 b6f229e2ef70
child 819 b48899f22b61
equal deleted inserted replaced
807:b6f229e2ef70 808:4e2ab5e77344
  1826     "opens a Table Column Editor on current widget"
  1826     "opens a Table Column Editor on current widget"
  1827 
  1827 
  1828     |editor|
  1828     |editor|
  1829 
  1829 
  1830     (self resolveName:specClass) isNil ifTrue:[
  1830     (self resolveName:specClass) isNil ifTrue:[
  1831         ^ self information:'No application class defined yet!!'
  1831         self askForSaving ifFalse: [^self]
  1832     ].
  1832     ].
  1833 
  1833 
  1834     editor := DataSetBuilder new.
  1834     editor := DataSetBuilder new.
  1835     editor masterApplication:self.
  1835     editor masterApplication:self.
  1836     editor columns:self specTool specification columns fromView:(self layoutTool layoutView).
  1836     editor columns:self specTool specification columns fromView:(self layoutTool layoutView).
  1848     "opens a Menu Editor on current widget"
  1848     "opens a Menu Editor on current widget"
  1849 
  1849 
  1850     |cls selectorOrMenu editor selectedSpec|
  1850     |cls selectorOrMenu editor selectedSpec|
  1851 
  1851 
  1852     (cls := self resolveName:specClass) isNil ifTrue:[
  1852     (cls := self resolveName:specClass) isNil ifTrue:[
  1853         ^ self warn:'No application class defined yet!!'
  1853         self askForSaving ifFalse: [^self]
  1854     ].
  1854     ].
  1855 
  1855 
  1856     cls notNil ifTrue:[
  1856     cls notNil ifTrue:[
  1857         (selectorOrMenu := self specTool specification menuSelector) notNil ifTrue:[
  1857         (selectorOrMenu := self specTool specification menuSelector) notNil ifTrue:[
  1858             selectorOrMenu := selectorOrMenu asSymbol
  1858             selectorOrMenu := selectorOrMenu asSymbol
  1893     "opens a Hierarchical List Editor on current widget"
  1893     "opens a Hierarchical List Editor on current widget"
  1894 
  1894 
  1895     |selector editor|
  1895     |selector editor|
  1896 
  1896 
  1897     (self resolveName:specClass) isNil ifTrue:[
  1897     (self resolveName:specClass) isNil ifTrue:[
  1898         ^ self information:'No application class defined yet!!'
  1898         self askForSaving ifFalse: [^self]
  1899     ].
  1899     ].
  1900 
  1900 
  1901     (selector := self specTool specification hierarchicalList) notNil ifTrue:[
  1901     (selector := self specTool specification hierarchicalList) notNil ifTrue:[
  1902         selector := selector asSymbol
  1902         selector := selector asSymbol
  1903     ].
  1903     ].
  1945     "opens a Tab List Editor on current widget"
  1945     "opens a Tab List Editor on current widget"
  1946 
  1946 
  1947     |selector editor|
  1947     |selector editor|
  1948 
  1948 
  1949     (self resolveName:specClass) isNil ifTrue:[
  1949     (self resolveName:specClass) isNil ifTrue:[
  1950         ^ self information:'No application class defined yet!!'
  1950         self askForSaving ifFalse: [^self]
  1951     ].
  1951     ].
  1952 
  1952 
  1953     (selector := self specTool specification listSelector) isArray 
  1953     (selector := self specTool specification listSelector) isArray 
  1954         ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!'].
  1954         ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!'].
  1955 
  1955 
  2067             showAtPointer;
  2067             showAtPointer;
  2068             accepted) ifFalse: [^false].
  2068             accepted) ifFalse: [^false].
  2069         modified := false.
  2069         modified := false.
  2070         self painter resetModification
  2070         self painter resetModification
  2071     ].
  2071     ].
       
  2072     ^true
       
  2073 !
       
  2074 
       
  2075 askForSaving
       
  2076     "asks for defining an application class"
       
  2077 
       
  2078     self askForSectionModification.    
       
  2079 
       
  2080     ((YesNoBox title:'No application class defined yet!!')        
       
  2081         noText:'Cancel';
       
  2082         yesText:'Define';
       
  2083         showAtPointer;
       
  2084         accepted) ifFalse: [^false].
       
  2085 
       
  2086     self doSave.
       
  2087 
  2072     ^true
  2088     ^true
  2073 !
  2089 !
  2074 
  2090 
  2075 askForSectionModification
  2091 askForSectionModification
  2076     "asks for section modification in the notebook"
  2092     "asks for section modification in the notebook"
  3567                           y:"/ yCenter + 2 - (fontHeight // 2) 
  3583                           y:"/ yCenter + 2 - (fontHeight // 2) 
  3568                             yCenter - (dX//2)
  3584                             yCenter - (dX//2)
  3569                       width:dX
  3585                       width:dX
  3570                      height:dX
  3586                      height:dX
  3571     ]
  3587     ]
  3572 
       
  3573     "Modified: / 23.4.1998 / 09:08:50 / cg"
       
  3574 ! !
  3588 ! !
  3575 
  3589 
  3576 !UIPainter::TreeView methodsFor:'initialization'!
  3590 !UIPainter::TreeView methodsFor:'initialization'!
  3577 
  3591 
  3578 initialize
  3592 initialize