"Happy Squeaking Sample(13)" "Copyright (C) 1999 OGIS-RI" StandardSystemView subclass: #CounterLineView instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'MVC tutorial'! !CounterLineView methodsFor: 'controller access'! defaultControllerClass ^CounterKeyboardController! ! !CounterLineView methodsFor: 'updating'! update: anAspect anAspect == #data ifTrue: [Transcript cr; show: 'now update'. self displayView].! ! !CounterLineView methodsFor: 'displaying'! displayView | count box max min line | super displayView. count := self model data. box := self insetDisplayBox. max := box width. min := 0. (count > max) ifTrue: [count := max]. (count < min) ifTrue:[count := min]. self clearInside. line := Line new. line beginPoint: (box topLeft + (Point x: count y:0)). line endPoint: (box bottomLeft + (Point x: count y:0)). line displayOn: Display. ! !