TransformationMorph subclass: #BoxMorph2 instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'CS520-MorphicBoxes'! !BoxMorph2 methodsFor: 'player commands' stamp: 'apb 1/6/2007 20:45'! grow: increment self extent: (self extent + increment)! ! !BoxMorph2 methodsFor: 'player commands' stamp: 'apb 1/6/2007 20:45'! move: aPointIncrement self position: self position + aPointIncrement! ! !BoxMorph2 methodsFor: 'player commands' stamp: 'apb 1/6/2007 20:45'! moveTo: aPoint self position: aPoint! ! !BoxMorph2 methodsFor: 'player commands' stamp: 'apb 1/6/2007 20:45'! turn: degrees self rotationDegrees: (self rotationDegrees + degrees)! ! !BoxMorph2 methodsFor: 'player commands' stamp: 'apb 1/6/2007 20:45'! undraw self delete! ! !BoxMorph2 methodsFor: 'initialization' stamp: 'AndrewBlack 9/25/2009 14:17'! initialize "initialize this PolygonMorph so that it looks like a Box in BoxWorld" | rectangle b | super initialize. smoothing := 3. b := Rectangle origin: 85 @ 200 extent: 80 @ 80. rectangle := RectangleMorph new. rectangle bounds: b. rectangle color: Color transparent. rectangle borderWidth: 1. self addMorphCentered: rectangle. self bounds: b.! ! BoxMorph2 subclass: #NamedBoxMorph2 instanceVariableNames: 'name' classVariableNames: '' poolDictionaries: '' category: 'CS520-MorphicBoxes'! !NamedBoxMorph2 methodsFor: 'accessing' stamp: 'apb 1/6/2007 23:40'! name: aName name := aName. (self findA: RectangleMorph) addMorphCentered: (TextMorph new contents: aName asText allBold). ^ aName ! !