sub_arctic.input
Class simple_drag_focus_agent
java.lang.Object
|
+--sub_arctic.input.dispatch_agent
|
+--sub_arctic.input.focus_dispatch_agent
|
+--sub_arctic.input.single_focus_agent
|
+--sub_arctic.input.simple_drag_focus_agent
- public class simple_drag_focus_agent
- extends single_focus_agent
Focus dispatch agent for misc. dragging. This agent dispatches under the
simple_drag input protocol which is designed for generic dragging (i.e.,
anything not handled by one of the more specifically targeted drag
protocols). Its particularly suitable for dragging components that are
inside the object itself (such as the thumb of a slider).
Field Summary |
protected java.lang.reflect.Method |
drag_end
Hold a reference to the Method for drag_end |
protected java.lang.reflect.Method |
drag_feedback
Hold a reference to the Method for drag_feedback |
protected java.lang.reflect.Method |
drag_start
Hold a reference to the Method for drag_start |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
drag_start
protected java.lang.reflect.Method drag_start
- Hold a reference to the Method for drag_start
drag_feedback
protected java.lang.reflect.Method drag_feedback
- Hold a reference to the Method for drag_feedback
drag_end
protected java.lang.reflect.Method drag_end
- Hold a reference to the Method for drag_end
simple_drag_focus_agent
public simple_drag_focus_agent()
- Simple constructor.
allowable_focus
public boolean allowable_focus(focusable candidate_obj)
- Indicate if the given object is suitable for inclusion in the focus set
of this object. In this case the object must be a simple_draggable.
- Parameters:
focusable
- candidate_obj the object we are testing suitability for.- Returns:
- boolean indicating whether the object is suitable.
- Overrides:
- allowable_focus in class focus_dispatch_agent
event_is_useful
public boolean event_is_useful(event evt)
- Indicate if the given event should be passed to this agent. In this
case we are interested in MOUSE_DRAGGED, MOUSE_MOVED, or MOUSE_RELEASED
events.
- Parameters:
event
- evt the event we are testing.- Returns:
- boolean indicating whether we want this event.
- Overrides:
- event_is_useful in class dispatch_agent
inform_focus_enter
protected void inform_focus_enter(focusable obj,
event evt,
java.lang.Object user_info)
- Do the work needed when an object goes in the focus set. In this case
we send the object a drag_start().
- Parameters:
focusable
- obj the object entering the focus set.event
- evt the event "causing" that entry.Object
- user_info the user info that should be sent to the object.- Overrides:
- inform_focus_enter in class focus_dispatch_agent
inform_focus_exit
protected void inform_focus_exit(focusable obj,
event evt,
java.lang.Object user_info)
- Do the work needed when an object comes out of the focus set. In this case
we send the object an drag_end().
- Parameters:
focusable
- obj the object leaving the focus set.event
- evt the event "causing" that exit.Object
- user_info the user info that should be sent to the object.- Overrides:
- inform_focus_exit in class focus_dispatch_agent
dispatch_event
public boolean dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
- Attempt to dispatch an event via this agent.
- Parameters:
event
- evt the event being dispatched.Object
- user_info ignored (because this is a focus agent).interactor
- to_obj ignored (because this is a focus agent).int
- seq_num ignored (because this is a focus agent).- Overrides:
- dispatch_event in class focus_dispatch_agent