To create a user interface using ModelValueViewContainer from Coad and Nicola:
ModelValueViewContainer subclass: #CountWindow instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Count Views'
buildView: method to create the View.
buildViewOn: aCount self addDisplayBoxOn: aCount. self addIncrementButtonOn: aCount. self addDecrementButtonOn: aCount. self addResetButtonOn: aCount.
makeDisplayBoxOn:for: to create display box views.
constraintFrame:corner: to layout the views.
addView:in: to compose the views.
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.
makeButton:on:for: to create buttons.
constraintFrame:corner: to layout the views.
addView:in: to compose the views.
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. 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.
changed: message to update text views.