'From Squeak2.8alpha of 19 January 2000 [latest update: #1899] on 18 March 2000 at 1:26:39 am'! AlignmentMorph subclass: #LaunchAlignmentMorph instanceVariableNames: 'window world ' classVariableNames: '' poolDictionaries: '' category: 'Morphic Documentation example'! !LaunchAlignmentMorph commentStamp: '' prior: 0! I hold a group of buttons that are used to launch an application.! !LaunchAlignmentMorph reorganize! ('anime2' animateWindowOpening:inWorld: doneAnimation openInWindowLabeled:inWorld:) ('anime1' animateWindowOpen: openInWindowLabeled1:inWorld:) ('initialization' initialize) ! !LaunchAlignmentMorph methodsFor: 'anime2' stamp: 'jlb 3/15/2000 16:18'! animateWindowOpening: theWindow inWorld: theWorld | topWindow anime | topWindow _ theWorld firstSubmorph. topWindow ifNotNil: [ anime _ PathRectangleMorph beginPoint: ( topWindow bounds center ) finishRectangle: ( theWindow bounds). anime setProperty: #sender toValue: self. anime startStepping. ] ifNil: [ self doneAnimation ]. ! ! !LaunchAlignmentMorph methodsFor: 'anime2' stamp: 'jlb 3/15/2000 16:18'! doneAnimation " add the world to the window " world addMorph: window. " and make the window the frontmost one " window activate. " Make sure that the submorphs are happening " world startSteppingSubmorphsOf: window. ^window ! ! !LaunchAlignmentMorph methodsFor: 'anime2' stamp: 'jlb 3/15/2000 16:18'! openInWindowLabeled: aString inWorld: theWorld | extent | inset _ 0. world _ theWorld. window _ (SystemWindow labelled: aString) model: nil. window " guess at initial extent" bounds: (RealEstateAgent initialFrameFor: window initialExtent: self fullBounds extent); addMorph: self frame: (0@0 extent: 1@1); updatePaneColors. " calculate extent after adding in case any size related attributes were changed. Use fullBounds in order to trigger re-layout of layout morphs" extent _ self fullBounds extent + (window borderWidth@window labelHeight) + window borderWidth. window extent: extent. self animateWindowOpening: window inWorld: theWorld. ! !