sub_arctic.input
Class click_track_agent

java.lang.Object
  |
  +--sub_arctic.input.dispatch_agent
        |
        +--sub_arctic.input.focus_dispatch_agent
              |
              +--sub_arctic.input.click_track_agent

public class click_track_agent
extends focus_dispatch_agent

This class implements a focus based agent that tracks (dispatches, but never consumes) mouse button press and release events. This is used by things that need to hear about presses or releases that they wouldn't normally directly receive (i.e. to reset something).

This agent dispatches under the click_tracking input protocol.


Field Summary
protected  java.lang.reflect.Method track_click
          Store the reference to the method object representing this object's protocol.
 
Fields inherited from class sub_arctic.input.focus_dispatch_agent
_focus_set, _user_info_set
 
Constructor Summary
click_track_agent()
          Default constructor
 
Method Summary
 boolean allowable_focus(focusable candidate_obj)
          Allow objects in this focus set only if they implement the click_tracking interface.
 boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
          Dispatch an event passed to us by our policy.
 boolean event_is_useful(event evt)
          Only interested in mouse button moves.
 
Methods inherited from class sub_arctic.input.focus_dispatch_agent
add_to_focus, clear_focus, focus_item, focus_set_size, inform_focus_enter, inform_focus_exit, is_in_focus, remove_from_focus, set_focus_to, user_info_item
 
Methods inherited from class sub_arctic.input.dispatch_agent
after_dispatch_notify, dispatch_unused_event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

track_click

protected java.lang.reflect.Method track_click
Store the reference to the method object representing this object's protocol.
Constructor Detail

click_track_agent

public click_track_agent()
Default constructor
Method Detail

allowable_focus

public boolean allowable_focus(focusable candidate_obj)
Allow objects in this focus set only if they implement the click_tracking interface.

Parameters:
focusable - candidate_obj object we are testing for eligibility
Returns:
boolean indicating if object may be added to focus
Overrides:
allowable_focus in class focus_dispatch_agent

event_is_useful

public boolean event_is_useful(event evt)
Only interested in mouse button moves.
Parameters:
event - evt the event we are expressing interest or non-interest in.
Returns:
boolean indicating whether we want the event.
Overrides:
event_is_useful in class dispatch_agent

dispatch_event

public boolean dispatch_event(event evt,
                              java.lang.Object user_info,
                              interactor to_obj,
                              int seq_num)
Dispatch an event passed to us by our policy.
Parameters:
event - evt event that we are dispatching.
Object - user_info uninterpreted information to pass with event.
interactor - to_obj ignored.
int - seq_num ignored.
Returns:
boolean indicating whether event was dispatched and consumed.
Overrides:
dispatch_event in class focus_dispatch_agent