'From Pharo6.0 of 13 May 2016 [Latest update: #60513] on 21 March 2018 at 6:28:13.790017 pm'! ComposableModel subclass: #CustomerSatisfaction instanceVariableNames: 'buttonHappy buttonNeutral buttonBad screen' classVariableNames: '' poolDictionaries: '' category: 'Spec-BuildUIWithSpec'! !CustomerSatisfaction methodsFor: 'initialization' stamp: 'BrettHallett 3/19/2018 15:40'! title ^ 'Customer Satisfaction Survey'. ! ! !CustomerSatisfaction methodsFor: 'initialization' stamp: 'BrettHallett 3/21/2018 18:26'! defaultSpec ^ SpecLayout composed newRow: [ :row | row add: #buttonHappy; add: #buttonNeutral; add: #buttonBad ] origin: 0 @ 0 corner: 1 @ 0.7; newRow: [ :row | row add: #screen ] origin: 0 @ 0.7 corner: 1 @ 1; yourself ! ! !CustomerSatisfaction methodsFor: 'initialization' stamp: 'BrettHallett 3/21/2018 17:18'! initializePresenter buttonHappy action: [ screen label: buttonHappy label ]. buttonNeutral action: [ screen label: buttonNeutral label ]. buttonBad action: [ screen label: buttonBad label ].! ! !CustomerSatisfaction methodsFor: 'initialization' stamp: 'BrettHallett 3/19/2018 16:14'! initializeWidgets " set up Widgets" screen := self newLabel. buttonHappy := self newButton. buttonNeutral := self newButton. buttonBad := self newButton. " widget config " screen label: 'Please give us your feedback.'. buttonHappy label: 'Happy'; icon: ( self iconNamed: #thumbsUp). buttonNeutral label: 'Neutral' ; icon: ( self iconNamed: #user). buttonBad label: 'Bad' ; icon: ( self iconNamed: #thumbsDown) . " specification of order of focus " self focusOrder add: buttonHappy; add: buttonNeutral; add: buttonBad ! ! !CustomerSatisfaction methodsFor: 'initialization' stamp: 'BrettHallett 3/19/2018 15:40'! extent ^ 400@100 ! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonBad ^ buttonBad! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonNeutral ^ buttonNeutral! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonHappy: anObject buttonHappy := anObject! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! screen ^ screen! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! screen: anObject screen := anObject! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonNeutral: anObject buttonNeutral := anObject! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonBad: anObject buttonBad := anObject! ! !CustomerSatisfaction methodsFor: 'accessing' stamp: 'BrettHallett 3/19/2018 16:04'! buttonHappy ^ buttonHappy! !