CViews.st


ModelValueViewContainer subclass: #CountViewContainer
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Count Views'!

!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!

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!

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!

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 methodsFor: 'view opening'!

buildViewOn: aCount self addDisplayBoxOn: aCount. self addIncrementButtonOn: aCount. self addDecrementButtonOn: aCount. self addResetButtonOn: aCount! !


News Page | CS2390 Sum'97 Home Page | MMC-CaMILE | STABLE
Questions/comments/concerns to guzdial@cc.gatech.edu
Page last updated 7/16/97; 10:15:35 AM