|
|||||||||
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.point_agent_class
This is the agent that handles the pointable interface as well as the display_help interface. It is an agent under the positional policy, but must dispatch events in some cases in which there might be no objects picked by the event. We use the dispatch_unused_event() method on dispatch_agent to get that to work. Further, we use the manager's "after_dispatch" list to get notified when other agents dispatch events.
Field Summary | |
protected pointable |
_point_focus
This is where we keep the object we are currently pointing at (or null to signify the that we aren't pointing at anything). |
protected long |
_stable_time
This holds the number of milliseconds the user must be quiescent with the mouse to get a display help box. |
protected java.lang.reflect.Method |
help_close
The method object representing help_close. |
protected boolean |
help_displayed
This variable becomes true if we have a help message displayed right now. |
protected java.lang.reflect.Method |
help_open
The method object representing help_open. |
protected int |
highest_event
Highest event ID seen |
protected boolean |
in_list
This variable tells us if we are yet on the managers list of interested agents for the "after_dispatch" notification. |
protected java.lang.reflect.Method |
mouse_enter
The method object representing mouse_enter |
protected java.lang.reflect.Method |
mouse_exit
The method object representing mouse_exit |
protected transition |
trans
|
protected java.lang.Object |
user_info_cache
We cache a copy of the user info whenever we find an object that speaks one of our protocols and it gets picked successfully. |
Constructor Summary | |
point_agent_class()
Construct a point_agent. |
Method Summary | |
void |
after_dispatch_notify(event evt,
boolean dispatched)
This method is called by the manager after an event is dispatched. |
boolean |
dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
This is the method that does most of the work for dispatching these events. |
boolean |
dispatch_unused_event(event evt)
We override dispatch_unused_event so we can tell the object that the mouse left the area even if the mouse is now not over any of our sub_arctic interactors. |
boolean |
event_is_useful(event evt)
We are only interested for normal dispatching purposes in move events. |
protected boolean |
is_mouse_event(event e)
This is a convenience method for checking if an event is any of the mouse events. |
void |
mouse_event_same_object(event evt)
This gets called when we get a mouse event, but it is over the same object we were over before. |
pointable |
point_focus()
Return the current point focus. |
protected void |
reschedule_transition()
This is called to get a new scheduled transition. |
void |
set_point_focus(pointable i,
event evt)
Set the point focus. |
void |
set_stable_time(long stable)
Set the length of time the user must be stable before a display help display is generated. |
long |
stable_time()
Query the amount of time that the mouse must be stable to get a display help box. |
void |
time_expired(event evt)
This is called to tell us that the timer we previous scheduled has expired. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.reflect.Method help_open
protected java.lang.reflect.Method help_close
protected java.lang.reflect.Method mouse_enter
protected java.lang.reflect.Method mouse_exit
protected java.lang.Object user_info_cache
protected transition trans
protected boolean help_displayed
protected long _stable_time
protected boolean in_list
protected int highest_event
protected pointable _point_focus
Constructor Detail |
public point_agent_class()
Method Detail |
public long stable_time()
public void set_stable_time(long stable)
long
- stable the length of time in millisecondspublic pointable point_focus()
public void set_point_focus(pointable i, event evt)
pointable
- i the new point focusevent
- evt the event that caused this change in focuspublic boolean event_is_useful(event evt)
event
- evt the event to check to see if we care about itpublic boolean dispatch_unused_event(event evt)
event
- evt the event to dispatchpublic boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
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 void after_dispatch_notify(event evt, boolean dispatched)
event
- evt the event which was dispatched (or not)boolean
- dispatched true if the event was handled by some agentprotected boolean is_mouse_event(event e)
event
- e the event to be testedpublic void time_expired(event evt)
event
- e the event that caused this timer to expireprotected void reschedule_transition()
public void mouse_event_same_object(event evt)
event
- evt the that caused this processing
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |