From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:49:03 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>ArbitraryViewExample</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none dsvList selectedRow <imports></imports> <category>Examples-Help</category> <attributes> <package>ArbitraryViewExample</package> </attributes> </class> <comment> Examples.ArbitraryViewExample
ArbitraryViewExample demonstrates adding a graphic as a column label. Expands on Dataset3Example. Instance Variables: dsvList - List of rows selectedRow - Employee instance of the selected row
</comment> <methods> Examples.ArbitraryViewExample <category>aspects</category>
columnOneSpec ^(ArbitraryViewSpec new) source: #source:; flags: 0
dsvList "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^dsvList isNil ifTrue: [dsvList := SelectionInList new. dsvList selectionIndexHolder compute: [:v | self selectedRow value: dsvList selection]. dsvList] ifFalse: [dsvList]
selectedRow "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^selectedRow isNil ifTrue: [selectedRow := nil asValue] ifFalse: [selectedRow]
source: aValue ^(ExtendedLabelAndIcon with: aValue) networkDrive
</methods> <methods> Examples.ArbitraryViewExample <category>initialize-release</category>
initialize | aList anEmp | aList := List new. "The aspect for the dataset should be a list of Employee instances. Create an employee to put in the list." anEmp := Employee new initialize. anEmp name: 'Tami Hayes'; empNo: '341-2'; citizen: true. aList add: anEmp. "Create an employee to put in the list." anEmp := Employee new initialize. anEmp name: 'Leo Mazon'; empNo: '786-9'; citizen: false. aList add: anEmp. "Set the list for the dataset aspect. This list appears when you start." self dsvList list: aList. super initialize.
</methods> <methods> Examples.ArbitraryViewExample <category>interface opening</category>
postBuildWith: aBuilder | descriptors | descriptors := (aBuilder componentAt:#Dataset1) widget columnDescriptors. descriptors first rendererSpec: self columnOneSpec.
</methods> <methods> Examples.ArbitraryViewExample class <category>resources</category>
number ^('Employee Number' asText emphasizeAllWith: (Array with: #bold with: #color->ColorValue red)) asComposedText
</methods> <methods> Examples.ArbitraryViewExample class <category>interface specs</category>
windowSpec "Tools.UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Dataset with arbitrary view' #bounds: #(#{Graphics.Rectangle} 800 600 1136 834 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.DataSetSpec} #properties: #(#{UI.PropertyListDictionary} #showHorizontalLines true #allowColumnResizing true #showVerticalLines true #allowColumnReordering false #allowSorting false ) #layout: #(#{Graphics.Rectangle} 11 18 314 196 ) #name: #Dataset1 #model: #dsvList #columns: #( #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'selectedRow name' #label: 'Name' #labelIsImage: false #width: 80 #rendererType: #Text #editorType: #InputField #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'selectedRow empNo' #label: 'number' #labelIsImage: true #width: 114 #rendererType: #Text #editorType: #InputField #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'selectedRow citizen' #label: 'U.S. Citizen' #labelIsImage: false #width: 80 #rendererType: #CheckBox #editorType: #CheckBox #noScroll: false ) ) ) ) ) )
</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>