|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.input.dispatch_agent | +--sub_arctic.input.focus_dispatch_agent
This is the abstract base class for all focus dispatch agents. It provides infrastructure for maintaining objects in focus sets, notifying objects of entry and exit from the focus set, etc. This (partial) agent dispatches input under the focusable input protocol.
focusable
Field Summary | |
protected java.util.Vector |
_focus_set
Focus set. |
protected java.util.Vector |
_user_info_set
Each focus object may provide a user info object when it is placed in the focus set. |
Constructor Summary | |
focus_dispatch_agent()
|
Method Summary | |
void |
add_to_focus(focusable new_obj,
event evt,
java.lang.Object user_info)
Add an object to the focus set of this agent. |
boolean |
allowable_focus(focusable candidate_obj)
Do subclass specific test to see if the given object is eligible to go in the focus set. |
void |
clear_focus(event evt)
Clear the focus set of this agent to empty. |
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 or set of objects via this agent. |
focusable |
focus_item(int at_indx)
Return the focus object at a given index in the focus set vector. |
int |
focus_set_size()
Indicate the size of the current focus set. |
protected void |
inform_focus_enter(focusable obj,
event evt,
java.lang.Object user_info)
This method is called whenever an object enters the focus set. |
protected void |
inform_focus_exit(focusable obj,
event evt,
java.lang.Object user_info)
This method is called whenever an object exits the focus set. |
boolean |
is_in_focus(focusable obj)
Determine if the given object is currently part of the focus set for this agent. |
void |
remove_from_focus(focusable obj,
event evt)
Remove the given object from the focus set of this agent. |
void |
set_focus_to(focusable to_obj,
event evt,
java.lang.Object user_info)
Replace the focus set of this agent with the given object. |
protected java.lang.Object |
user_info_item(int at_indx)
Retrieve the user info object corresponding to the focusable object at the given index. |
Methods inherited from class sub_arctic.input.dispatch_agent |
after_dispatch_notify,
dispatch_unused_event,
event_is_useful |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Vector _focus_set
protected java.util.Vector _user_info_set
Constructor Detail |
public focus_dispatch_agent()
Method Detail |
public int focus_set_size()
public focusable focus_item(int at_indx)
int
- at_indx the index of the requested object.protected java.lang.Object user_info_item(int at_indx)
int
- at_indx the index of the requested object.protected void inform_focus_enter(focusable obj, event evt, java.lang.Object user_info)
focusable
- obj the object entering the focus set.event
- evt the event that "caused" the entry.Object
- user_info the user info associated with that object.protected void inform_focus_exit(focusable obj, event evt, java.lang.Object user_info)
focusable
- obj the object exiting the focus set.event
- evt the event that "caused" the exit.Object
- user_info the user info associated with that object.public boolean allowable_focus(focusable candidate_obj)
focusable
- candidate_obj object we are accepting or rejectingpublic void set_focus_to(focusable to_obj, event evt, java.lang.Object user_info)
focusable
- to_obj the object going in the focus set.event
- evt the event that "caused" this focus.Object
- user_info the uninterpreted information that we will pass
back to the object whenever it gets input from
this agent.public boolean is_in_focus(focusable obj)
focusable
- obj the object we are asking aboutpublic void add_to_focus(focusable new_obj, event evt, java.lang.Object user_info)
focusable
- to_obj the object going in the focus set.event
- evt the event that "caused" this focus.Object
- user_info the uninterpreted information that we will pass
back to the object whenever it gets input from
this agent.public void remove_from_focus(focusable obj, event evt)
focusable
- obj the object to be removed.event
- evt the event that "caused" this removal.public void clear_focus(event evt)
event
- evt the event that "caused" this.public abstract boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
event
- evt the event to be dispatched.Object
- user_info ignored.interactor
- to_obj ignored.int
- seq_num ignored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |