[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

EditableClock

inherits from Stamp
inherits from ClockFace
inherits interface from EditsTarget

Object <- Viewable <- Stamp <- EditableClock



Operations

Get list of all operations

AboutToShow
Draw
DrawClockHand
Idle
IndexedTime
OpeningTinkerWindow
RedrawFace
SetIndexedTime
SetMyTime
Touch


Attributes

Get list of all attributes

Editable
HasSecondHand
Target
TargetTime


Fields

Field Type
Viewable: superview: Viewable
relativeOrigin: Dot
contentSize: Dot
viewFlags: Flags
labelStyle: TextStyle
color: Unsigned
altColor: Unsigned
shadow: Shadow
sound: Playable
Stamp: image: Image
EditableClock: target: Object
displayedTime: Unsigned
draggingHand: UnsignedByte
editable: Boolean
hasSecondHand: Boolean
dragInterval: Unsigned


Instance template

instance EditableClock tag;
 relativeOrigin: <0.0,0.0>;
    contentSize: <0.0,0.0>;
      viewFlags: 0x00000000;
     labelStyle: nilObject;
          color: 0;
       altColor: 0;
         shadow: nilObject;
          sound: nilObject;
          image: nilObject;
         target: nilObject;
  displayedTime: 0;
   draggingHand: 0;
       editable: false;
  hasSecondHand: false;
   dragInterval: 0;
end instance;

Class definition

Define Class EditableClock;
    inherits from Stamp;
    inherits from ClockFace;
    inherits interface from EditsTarget;

    field target:           Object, getter;
        // source of clock's time; use iSystem to affect and reflect current time
    field displayedTime:    Unsigned;
        // time currently displayed on clock
    field draggingHand:     UnsignedByte;
        // which hand is being dragged
    field editable:         Boolean, getter;
    field hasSecondHand:    Boolean, getter;
    field dragInterval:     Unsigned;
        // interval (in minutes) to which dragging the minute hand is gridded

    // getting and setting the time

    operation IndexedTime(index: Unsigned): Unsigned;
    operation SetIndexedTime(newTime: Unsigned; index: Unsigned);

    // getting and setting the target

    overrides SetTarget;
    attribute TargetTime: Unsigned, safe;
        // gets/sets target's start time

    // clock drawing and manipulation

    overrides DrawClockHand;
        // draws hand that's being dragged thicker; draws second hand lighter if unlocked
                                                        
    attribute HasSecondHand: Boolean, safe, common;
        // returns true if clock has a second hand (tests clock flag)
    attribute Editable: Boolean, safe;

    // basic viewable stuff

    overrides AboutToShow;
        // synchronizes displayed time with target time
    overrides Draw;
        // draws clock hands inside image's content rect
    overrides Idle;
        // synchronizes displayed time with target time
    overrides OpeningTinkerWindow;
        // adds time locked and second hand switches to tinker window
    overrides Touch;
        // locks and unlocks the time; moves hands if time unlocked

    operation RedrawFace(), intrinsic;
    operation SetMyTime(newTime: Unsigned), intrinsic;
    
end class;