LabelAndIcon.st
changeset 5202 e5be9c22174c
parent 5020 6dd1826b889c
child 5209 173846bc5b93
equal deleted inserted replaced
5201:537777c0a6ad 5202:e5be9c22174c
   413     "Modified: / 21.6.1998 / 03:52:12 / cg"
   413     "Modified: / 21.6.1998 / 03:52:12 / cg"
   414 !
   414 !
   415 
   415 
   416 on:aDevice
   416 on:aDevice
   417     <resource: #obsolete>
   417     <resource: #obsolete>
   418     "return a new image on a device
   418 
   419     "
   419     self obsoleteFeatureWarning:'use onDevice:'.
   420     ^ self onDevice:aDevice
   420     ^ self onDevice:aDevice
   421 
       
   422 !
   421 !
   423 
   422 
   424 onDevice:aDevice
   423 onDevice:aDevice
   425     "return a new image on a device
   424     "return with both icon and image onDevice:aDevice"
   426     "
   425 
   427     |form img|
   426     |form img|
   428 
   427 
   429     aDevice isNil ifTrue:[^ self].
   428     aDevice isNil ifTrue:[^ self].
   430     icon  notNil ifTrue:[form := icon  onDevice:aDevice].
   429     icon  notNil ifTrue:[form := icon  onDevice:aDevice].
   431     image notNil ifTrue:[img  := image onDevice:aDevice].
   430     image notNil ifTrue:[img  := image onDevice:aDevice].
       
   431     (icon == form and:[image == img]) ifTrue:[
       
   432         "nothing changed"
       
   433         ^ self.
       
   434     ].
   432 
   435 
   433     ^ LabelAndIcon form:form image:img string:string
   436     ^ LabelAndIcon form:form image:img string:string
   434 
       
   435 
       
   436 
       
   437 ! !
   437 ! !
   438 
   438 
   439 !LabelAndIcon methodsFor:'initialization'!
   439 !LabelAndIcon methodsFor:'initialization'!
   440 
   440 
   441 initialize
   441 initialize