Squeak Class Documentation category index | class index  
 
WatchMorph
  category: Morphic-Demo
  superclass: EllipseMorph
  subclasses: PDAClockMorph

This class is a representation of a watch.
The labels' font is changeble. Labels' font size increase or decrease when resizing me.

WatchMorph new openInWorld
(WatchMorph fontName: 'ComicPlain') openInWorld " transparent "
(WatchMorph fontName: 'ComicBold' bgColor: Color white centerColor: Color black) openInWorld

Structure:
fontName String -- the labels' font name
cColor Color -- center color
handsColor Color
romanNumerals Boolean
antialias Boolean

instance methods
  accessing
  antialias:
centerColor:
fontName:
handsColor:

  drawing
  drawOn:

  initialization
  extent:
initialize

  labels
  createLabels

  menus
  addCustomMenuItems:hand:
changeCenterColor
changeFont
changeHandsColor
toggleAntialias
toggleRoman

  private
  radius:hourAngle:

  stepping
  step

class methods
  as yet unclassified
  fontName:
fontName:bgColor:centerColor:

  parts bin
  descriptionForPartsBin

instance methods
  accessing top  
 

antialias:


 

centerColor:


 

fontName:


 

handsColor:


  drawing top  
 

drawOn:


  initialization top  
 

extent:


 

initialize

Establish all default parameters...


  labels top  
 

createLabels


  menus top  
 

addCustomMenuItems:hand:

Add morph-specific items to the given menu which was invoked by the given hand.


 

changeCenterColor

Let the user change the color of the center of the watch


 

changeFont


 

changeHandsColor

Let the user change the color of the hands of the watch.


 

toggleAntialias


 

toggleRoman


  private top  
 

radius:hourAngle:

unitRadius goes from 0.0 at the center to 1.0 on the circumference.
hourAngle runs from 0.0 clockwise around to 12.0 with wrapping.


  stepping top  
 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


class methods
  as yet unclassified top  
 

fontName:


 

fontName:bgColor:centerColor:


  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!