sub_arctic.input
Class grow_press_drag_agent

java.lang.Object
  |
  +--sub_arctic.input.dispatch_agent
        |
        +--sub_arctic.input.grow_press_drag_agent

public class grow_press_drag_agent
extends dispatch_agent

This class implements an agent which is a hybrid positional/focus agent. It basically accepts a positional press over a properly typed object (an interactor which implements grow_press_draggable) and hands it off to (i.e., makes it the focus of) the grow_drag agent.

See Also:
pressable, grow_draggable, grow_drag_focus_agent

Constructor Summary
grow_press_drag_agent()
          Simple constructor
 
Method Summary
 boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
          Attempt to perform event dispatch to the given object.
 boolean event_is_useful(event evt)
          Declares that we are only interested in press of the mouse button.
 
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
 

Constructor Detail

grow_press_drag_agent

public grow_press_drag_agent()
Simple constructor
Method Detail

event_is_useful

public boolean event_is_useful(event evt)
Declares that we are only interested in press of the mouse button. Other events are handled by the grow_drag agent itself.
Parameters:
evt - the event we are deciding interest in
Returns:
whether we are interested in having the event dispatched to us
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)
Attempt to perform event dispatch to the given object. If the object is grow_press_draggable, then we make it the grow_drag focus and we are done. Otherwise we reject the input.
Parameters:
evt - the event being dispatched
user_info - an information object to pass with input. This gets repackaged inside an object_holder object and passed on the the grow_drag_focus
to_obj - the object (selected via a pick) we are dispatching to
seq_num - event sequence number (ignored here)
Returns:
whether the event was dispatched successfully
Overrides:
dispatch_event in class dispatch_agent