ListView.st
changeset 1234 9c7d9fb08c3f
parent 1222 0770bb87d44e
child 1240 1b3611a8e972
equal deleted inserted replaced
1233:c9cd0547db29 1234:9c7d9fb08c3f
   364 
   364 
   365 font:aFont
   365 font:aFont
   366     "set the font for all shown text.
   366     "set the font for all shown text.
   367      Redraws everything.
   367      Redraws everything.
   368      CAVEAT: with the addition of Text objects,
   368      CAVEAT: with the addition of Text objects,
   369 	     this method is going to be obsoleted by a textStyle
   369              this method is going to be obsoleted by a textStyle
   370 	     method, which allows specific control over
   370              method, which allows specific control over
   371 	     normalFont/boldFont/italicFont parameters."
   371              normalFont/boldFont/italicFont parameters."
   372 
   372 
   373     aFont isNil ifTrue:[
   373     aFont isNil ifTrue:[
   374 	^ self error:'nil font'
   374         ^ self error:'nil font'
   375     ].
   375     ].
   376     font ~~ aFont ifTrue:[
   376     font ~~ aFont ifTrue:[
   377 	super font:aFont.
   377         super font:(aFont on:device).
   378 	realized ifTrue:[
   378         preferredExtent := nil.
   379 	    widthOfWidestLine := nil. "/ i.e. unknown
   379         widthOfWidestLine := nil. "/ i.e. unknown
   380 	    (font graphicsDevice == device) ifTrue:[
   380         self getFontParameters.
   381 		self getFontParameters.
   381         realized ifTrue:[
   382 		self computeNumberOfLinesShown.
   382             (font graphicsDevice == device) ifTrue:[
   383 		shown ifTrue:[
   383                 self getFontParameters.
   384 		    self redrawFromVisibleLine:1 to:nLinesShown
   384                 self computeNumberOfLinesShown.
   385 		]
   385                 shown ifTrue:[
   386 	    ].
   386                     self redrawFromVisibleLine:1 to:nLinesShown
   387 	    self contentsChanged
   387                 ]
   388 	]
   388             ].
       
   389             self contentsChanged
       
   390         ]
   389     ]
   391     ]
   390 
   392 
   391     "Modified: 5.7.1996 / 17:55:34 / cg"
   393     "Modified: 5.7.1996 / 17:55:34 / cg"
   392 !
   394 !
   393 
   395 
  3619 ! !
  3621 ! !
  3620 
  3622 
  3621 !ListView class methodsFor:'documentation'!
  3623 !ListView class methodsFor:'documentation'!
  3622 
  3624 
  3623 version
  3625 version
  3624     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.131 1997-05-12 17:02:02 cg Exp $'
  3626     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.132 1997-06-04 11:22:12 ca Exp $'
  3625 ! !
  3627 ! !