StringMorph subclass: #DisplayBoxMorph instanceVariableNames: 'model modelAction aspect ' classVariableNames: '' poolDictionaries: '' category: 'Morphic-UI'! !DisplayBoxMorph methodsFor: 'accessing' stamp: 'JRB 8/30/97 12:41'! aspect ^aspect.! ! !DisplayBoxMorph methodsFor: 'accessing' stamp: 'JRB 8/30/97 12:41'! aspect: anAspect aspect _ anAspect.! ! !DisplayBoxMorph methodsFor: 'accessing' stamp: 'JRB 8/21/97 02:33'! model ^model! ! !DisplayBoxMorph methodsFor: 'accessing' stamp: 'JRB 8/30/97 12:40'! model: aModel model _ aModel.! ! !DisplayBoxMorph methodsFor: 'stepping' stamp: 'JRB 8/30/97 12:42'! step self contents: (model perform: aspect) printString.! ! !DisplayBoxMorph methodsFor: 'stepping' stamp: 'JRB 8/30/97 13:30'! stepTime ^100.! ! LayoutMorph subclass: #ModelValueViewMorph instanceVariableNames: 'windowLabel ' classVariableNames: '' poolDictionaries: '' category: 'Morphic-UI'! !ModelValueViewMorph methodsFor: 'view creation' stamp: 'JRB 8/30/97 12:48'! makeButton: buttonLabel on: aModel for: action ^SimpleButtonMorph new label: buttonLabel; target: aModel; actionSelector: action; borderColor: Color black.! ! !ModelValueViewMorph methodsFor: 'view creation' stamp: 'JRB 8/30/97 12:52'! makeDisplayBoxOn: aModel for: aspect ^DisplayBoxMorph new model: aModel; aspect: aspect.! ! !ModelValueViewMorph methodsFor: 'initialization' stamp: 'JRB 8/30/97 12:59'! initialize super initialize. orientation _ #vertical. centering _ #center. hResizing _ #shrinkWrap. vResizing _ #shrinkWrap. inset _ 5. color _ Color white. self borderWidth: 2. openToDragNDrop _ false. ! ! !ModelValueViewMorph methodsFor: 'window opening' stamp: 'JRB 8/30/97 13:43'! openOn: aModel self buildViewOn: aModel.! ! ModelValueViewMorph subclass: #CountValueViewMorph instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Morphic-UI'! !CountValueViewMorph methodsFor: 'view opening' stamp: 'JRB 8/30/97 13:34'! buildViewOn: aCount self addControlButtons: aCount. self addMorphBack: (Morph new color: color; extent: 10@10). "spacer" self addDisplayBoxOn: aCount.! ! !CountValueViewMorph methodsFor: 'view creation' stamp: 'JRB 8/30/97 13:34'! addControlButtons: aCount | row | row _ LayoutMorph newRow borderWidth: 0; inset: 0; hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. row addMorphBack: (self makeButton: 'Increment' on: aCount for: #increment). row addMorphBack: (self makeButton: 'Decrement' on: aCount for: #decrement). row addMorphBack: (self makeButton: 'Reset' on: aCount for: #reset). self addMorphBack: row. ! ! !CountValueViewMorph methodsFor: 'view creation' stamp: 'JRB 8/30/97 13:30'! addDisplayBoxOn: aCount self addMorphBack: (self makeDisplayBoxOn: aCount for: #value).! ! !CountValueViewMorph methodsFor: 'initialization' stamp: 'JRB 8/30/97 13:43'! initialize super initialize. self openOn: IntegerCount new.! !