From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:48:20 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>Slider2Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none month year dateRange <imports></imports> <category>Examples-Help</category> <attributes> <package>Slider2-Example</package> </attributes> </class> <comment> Examples.Slider2Example
Slider2Example demonstrates a two-dimensional slider widget.
</comment> <methods> Examples.Slider2Example <category>change messages</category>
changedDate "Convert the y-axis value to a month." | y x | y := self dateRange value y. y := (12 - (y * 12) asInteger) max: 1. "12 months" self month value: (Date nameOfMonth: y). "Convert the x-axis value to a year." x := self dateRange value x. x := 1900 + (x * 100) asInteger. "100 years" self year value: x.
</methods> <methods> Examples.Slider2Example <category>aspects</category>
dateRange ^dateRange
month ^month
year ^year
</methods> <methods> Examples.Slider2Example <category>initialize-release</category>
initialize month := (Date nameOfMonth: 1) asValue. year := 1900 asValue. dateRange := (0@1) asValue. dateRange onChangeSend: #changedDate to: self.
</methods> <methods> Examples.Slider2Example <category>interface opening</category>
postBuildWith: aBuilder (aBuilder componentAt: #dateRange) widget beTwoDimensional; setMarkerLength: 10.
</methods> <methods> Examples.Slider2Example class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Slider2Example' #min: #(#Point 464 237 ) #max: #(#Point 464 237 ) #bounds: #(#Rectangle 206 342 670 579 ) ) #component: #(#SpecCollection #collection: #( #(#SliderSpec #layout: #(#Rectangle 94 79 458 174 ) #name: #dateRange #model: #dateRange #orientation: #vertical ) #(#InputFieldSpec #layout: #(#Rectangle 232 192 304 218 ) #model: #year #isReadOnly: true #type: #number ) #(#InputFieldSpec #layout: #(#Rectangle 8 115 84 139 ) #model: #month #isReadOnly: true #type: #string ) #(#LabelSpec #layout: #(#Point 22 92 ) #label: 'Month' #style: #small ) #(#LabelSpec #layout: #(#Point 190 193 ) #label: 'Year' #style: #small ) #(#LabelSpec #layout: #(#Point 138 18 ) #label: 'Two-Dimensional Slider' #style: #large ) ) ) )
</methods> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>ApplicationModel</name> <environment>UI</environment> <super>UI.Model</super> <private>false</private> none builder uiSession eventHandlers savedWindowInformation <imports></imports> <category>UIBuilder-Framework</category> <attributes> <package>UIBuilder-Framework</package> </attributes> </class>