sub_arctic.input
Class simple_press_drag_agent
java.lang.Object
|
+--sub_arctic.input.dispatch_agent
|
+--sub_arctic.input.simple_press_drag_agent
- public class simple_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 simple_press_draggable) and hands it off to (i.e.,
makes it the focus of) the simple_drag agent.
- See Also:
pressable
,
simple_draggable
,
simple_drag_focus_agent
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
simple_press_drag_agent
public simple_press_drag_agent()
- Simple constructor
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 simple_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 simple_press_draggable, then we make it the simple_drag focus and we
are done. Otherwise we reject the input.
- Parameters:
evt
- the event being dispatcheduser_info
- an information object to pass with input.
This gets repackaged inside an object_holder object
and passed on the the simple_drag_focusto_obj
- the object (selected via a pick) we are dispatching toseq_num
- event sequence number (ignored here)- Returns:
- whether the event was dispatched successfully
- Overrides:
- dispatch_event in class dispatch_agent