MiG InfoCom MiG Calendar AShape Developer Manual User Manual

Page 17

Advertising
background image

MiG InfoCom AB

InteractionBroker
It is the interpreter of

Command

s. Since

Command

s are very

generic something is needed to interpret what that

Command

wants to do, if that is not contained in the

Command

itself.

Command
The

Command

is a concrete class and contains a generic

(again) description of something to do. It consists of the
command string, a property/value pair that may be use to
explain it further, and a target.

CommandSet
A collection of link

Command

s. Is an interface and is

implemented by

DefaultCommand

. It is used to chain

multiple commands together for one interaction. You can use

CompositeCommand

for this.

Expression
An

Expression

is something that can be evaluated to

true

or

false

. The only thing you have for sure is a

PropertyProvider

that you can use to get values for

certain properties.

Expression

is an interface and the

concrete implementations provides some context to which
properties is interesting and how they should be evaluated.

For instance the

LogicalExpression

denotes a comparison

algorithm where you provide a property name and a value
that is should relate to with anyone of it's ten operators (e.g.
equals, is_null and in_collection). The actual object to
compare the give value to is gotten from the mandatory

PropertyProvider

.

Since the

PropertyProvider

can be different for every

evaluation this makes for a great way to describe expressions
like: “If the object that the mouse is over right now is named
background”. Currently

ActivityInteractor

and

MouseKeyInteractor

implement the

PropertyProvider

interface and will thus pass them self as the

PropertyProvider

to the

Expression'

s evaluate

method. This means they can return property values for
things like a list of named areas the mouse was over when it
was pressed
(

MouseKeyInteractor.PROP_MOUSE_PRESSED_LIST

).

Static Overrides

AShape Developer Manual

Page 17 / 24

Advertising