[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]

Input

abstract
inherits from Object

Object <- Input



Operations

Get list of all operations

DispatchInput
Done
Finalize
Init
InputTime
NowDone
SetDone
StartTime


Attributes

Get list of all attributes

Class Input defines no new attributes.


Fields

Field Type
Input: startTime: Unsigned
stopTime: Unsigned


Instance template

Class Input cannot be instantiated.


Class definition

// Input objects describe any kind of input; usually key strokes or screen touches
Define Class Input;
    abstract;
    inherits from Object;

    field startTime:        Unsigned;
    field stopTime:         Unsigned;

    // two ways to use an input; ask it to handle itself, or handle it and tell it you did
    operation DispatchInput(), noMethod;
        // call to ask input to handle itself
    operation NowDone();
        // call to say that you are finished with this Input (not needed if Done is returning true)

    // timing of inputs
    operation Done(): Boolean;
        // input is done, InputTime returns stop time
    operation StartTime(): Unsigned, noFail;
        // inputs are sorted by this
    operation InputTime(): Unsigned;
        // current time while input is not done; stop time once input is done

    // hook for subclasses
    operation SetDone(endTime: Unsigned);
        // called when input is done; override to forget unimportant stroke details

    overrides Init, Finalize;
end class;