"{ Package: 'stx:libwidg2' }"
ListEntry subclass:#ModelListEntry
instanceVariableNames:'string model'
classVariableNames:''
poolDictionaries:''
category:'Views-Support'
!
!ModelListEntry class methodsFor:'documentation'!
documentation
"
Use this class, if you provide some SelectionInListView, ComboBox, etc. with
both a display string, and you want to store some model specific information, too.
You can store a class, a selector to perform, a factory object or anything else
in model.
[author:]
Stefan Vogel (stefan@zwerg)
[instance variables:]
string String string to display
model Object anything you want to store
[class variables:]
[see also:]
"
! !
!ModelListEntry class methodsFor:'instance creation'!
string:stringArg model:modelArg
^ self new string:stringArg model:modelArg
! !
!ModelListEntry methodsFor:'accessing'!
model
"return the value of the instance variable 'model' (automatically generated)"
^ model
!
model:something
"set the value of the instance variable 'model' (automatically generated)"
model := something.
!
string:something
"set the value of the instance variable 'string' (automatically generated)"
string := something.
!
string:stringArg model:modelArg
"set instance variables (automatically generated)"
string := stringArg.
model := modelArg.
! !
!ModelListEntry methodsFor:'required protocol'!
asString
^ string
!
displayOn:arg1 x:arg2 y:arg3 opaque:arg4
^ string displayOn:arg1 x:arg2 y:arg3 opaque:arg4
!
sameStringAndEmphasisAs:aStringOrText
aStringOrText class == self class ifTrue:[
^ string sameStringAndEmphasisAs:aStringOrText string
].
^ string sameStringAndEmphasisAs:aStringOrText
!
widthOn:arg
^ string widthOn:arg
! !
!ModelListEntry class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libwidg2/ModelListEntry.st,v 1.1 2002-09-18 19:28:38 stefan Exp $'
! !