|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.input.dispatch_agent
This is the abstract base class for all dispatch agents in all policies. This API provides methods for reporting whether the agent is interested in a particular type of event, for actually dispatching the event.
Constructor Summary | |
dispatch_agent()
Construct a dispatch agent. |
Method Summary | |
void |
after_dispatch_notify(event evt,
boolean dispatched)
This method is called by the manager after an event is dispatched on all agents which have registered interest in becoming aware of this fact. |
abstract boolean |
dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
Attempt to dispatch an event to an object via this agent. |
boolean |
dispatch_unused_event(event evt)
This method is called by some policies (most notably the positional policy) to dispatch events which did not meet the selection criteria of the policy itself. |
boolean |
event_is_useful(event evt)
Indicate whether the given event might be dispatchable by this agent. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public dispatch_agent()
Method Detail |
public boolean event_is_useful(event evt)
event
- evt the event to be tested for usefulnesspublic abstract boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
In addition, for agents which may be passed the same event more than once (targeted towards different objects), a sequence number is also passed. This number is guaranteed to be different for each different event being dispatched (this allows the agent to know when to clear its cache or advance within its state machine controller in certain cases).
event
- evt the event to dispatchObject
- user_info policy defined user informationinteractor
- to_obj the object to (possibly)send the event toint
- seq_num the sequence number of this eventpublic boolean dispatch_unused_event(event evt)
The most common use of this is to remove status displays when the pointer leaves the area of an application via an agent like pointable.
The default implementation of this function is to simply return false.
event
- evt the event to dispatchpublic void after_dispatch_notify(event evt, boolean dispatched)
Note that there is no return value from the function, because it is not possible to affect the event -- it has already been dispatched (or not dispatched) when this function is called.
By default this function does nothing.
event
- evt the event which was dispatched (or not)boolean
- dispatched true if the event was handled by some agent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |