Package org.inspirenxe.strata.api.event.cause
package org.inspirenxe.strata.api.event.cause
Causes: who or what led to an event.
Every event has a Cause, a chain of the objects a change passed
through and a context of keyed values. The most asked value is the
origin: the user at this screen, another person through
the server, a data binding, or plain code. Event.origin() reads it without making the whole cause, and
Event.cause() makes the cause only when a handler asks for it.
Causes come from a CauseStack of open frames. Hosts open one for
each input they dispatch, a control acting on another pushes itself, such as a radio group deselecting a button,
and code that applies a change for someone else opens its own. On an engine with a cause stack of its own, the
adapter can back Strata's stack with the engine's.
-
ClassDescriptionWhat led to an event: a chain of objects and a context of keyed values.CauseKey<V>A typed key for a value in a cause's context.The context keys Strata puts.The frames whose objects and values make up the cause of every event fired while they are open.The kind of device an input came from, the
CauseKeys.DEVICEcontext value.Who caused a change, theCauseKeys.ORIGINcontext value.A data binding, writing a value from its source to a component.A plain call from code.Another person, whose change reached this screen through a server or another channel.The person at this screen, acting through input.