ModelValueViewContainer subclass: #CountViewContainer instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Count Views'! !CountViewContainer methodsFor: 'view opening'! buildViewOn: aCount self addDisplayBoxOn: aCount. self addIncrementButtonOn: aCount. self addDecrementButtonOn: aCount. self addResetButtonOn: aCount! ! !CountViewContainer methodsFor: 'view creation'! addDecrementButtonOn: aCount | button buttonArea | button := self makeButton: 'decrement' on: aCount for: #decrement. buttonArea := self constraintFrame: 1 /3 @ 0 corner: 2 / 3 @ (1 / 3). self addView: button in: buttonArea! ! !CountViewContainer methodsFor: 'view creation'! addDisplayBoxOn: aCount | itemView itemArea | itemView := self makeDisplayBoxOn: aCount for: #value. itemArea := self constraintFrame: 1 / 3 @ (1 / 2) corner: 2 / 3 @ 1. self addView: itemView in: itemArea! ! !CountViewContainer methodsFor: 'view creation'! addIncrementButtonOn: aCount | button buttonArea | button := self makeButton: 'increment' on: aCount for: #increment. buttonArea := self constraintFrame: 0 @ 0 corner: 1 / 3 @ (1 / 3). self addView: button in: buttonArea! ! !CountViewContainer methodsFor: 'view creation'! addResetButtonOn: aCount | button buttonArea | button := self makeButton: 'reset' on: aCount for: #reset. buttonArea := self constraintFrame: 2 /3 @ 0 corner: 1 @ (1 / 3). self addView: button in: buttonArea! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! CountViewContainer class instanceVariableNames: ''! !CountViewContainer class methodsFor: 'examples' stamp: 'mjg 10/1/97 09:31'! dateCountView | count | count _ DateCount new. CountViewContainer new openOn: count. ! ! !CountViewContainer class methodsFor: 'examples' stamp: 'JRB 8/7/97 01:54'! integerCountView | count | count _ IntegerCount new. CountViewContainer new openOn: count. ! !