sub_arctic.input
Class inout_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.inout_drag_focus_agent
- public class inout_drag_focus_agent
- extends single_focus_agent
Focus agent that implements inout-drag. inout_drag is a drag which only
tracks entry and exit from the bounds of an object. The inout_draggable
protocol provides for inout_drag_start(), inout_drag_enter(),
inout_drag_exit(), and inout_drag_end() methods.
- See Also:
inout_draggable
Field Summary |
protected java.lang.reflect.Method |
end
Store a reference to the end method of our protocol. |
protected java.lang.reflect.Method |
enter
Store a reference to the enter method of our protocol. |
protected java.lang.reflect.Method |
exit
Store a reference to the exit method of our protocol. |
protected boolean |
prev_inside
Was the previous event inside the object |
protected java.lang.reflect.Method |
start
Store a reference to the start method of our protocol. |
Method Summary |
boolean |
allowable_focus(focusable candidate_obj)
Test whether the given object can be added to the focus set (i.e., whether
it is inout_draggable). |
boolean |
dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
Attempt to dispatch an event under this agent's protocol. |
boolean |
event_is_useful(event evt)
Indicate whether the given event is useful for this agent. |
protected void |
inform_focus_enter(focusable obj,
event evt,
java.lang.Object user_info)
Action taken when an object enters the focus set. |
protected void |
inform_focus_exit(focusable obj,
event evt,
java.lang.Object user_info)
Action taken when an object exits the focus set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
start
protected java.lang.reflect.Method start
- Store a reference to the start method of our protocol.
end
protected java.lang.reflect.Method end
- Store a reference to the end method of our protocol.
exit
protected java.lang.reflect.Method exit
- Store a reference to the exit method of our protocol.
enter
protected java.lang.reflect.Method enter
- Store a reference to the enter method of our protocol.
prev_inside
protected boolean prev_inside
- Was the previous event inside the object
inout_drag_focus_agent
public inout_drag_focus_agent()
allowable_focus
public boolean allowable_focus(focusable candidate_obj)
- Test whether the given object can be added to the focus set (i.e., whether
it is inout_draggable).
- Parameters:
focusable
- candidate_obj- Returns:
- boolean indicating whether the object can be put in the focus set.
- Overrides:
- allowable_focus in class focus_dispatch_agent
event_is_useful
public boolean event_is_useful(event evt)
- Indicate whether the given event is useful for this agent. This agent
listens form MOUSE_DRAGGED, MOUSE_MOVED, and MOUSE_RELEASED events.
- Parameters:
event
- evt the event we are asking about.- Returns:
- boolean indicating if the event in useful to this agent.
- 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)
- Action taken when an object enters the focus set. This overrides the
super class to call inout_drag_start() instead of focus_set_enter().
- Parameters:
focusable
- obj the object being added to the focus set.event
- evt the event "causing" the focus.Object
- user_info the information associated with the object when
the focus was established.- 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)
- Action taken when an object exits the focus set. This overrides the
super class to call inout_drag_end() instead of focus_set_exit().
- Parameters:
focusable
- obj the object being removed from the focus set.event
- evt the event "causing" the action.Object
- user_info the information associated with the object when
the focus was established.- 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 under this agent's protocol.
- Parameters:
event
- evt the event to be dispatched.Object
- user_info ignored (since we are a focus agent).interactor
- to_obj ignored (since we are a focus agent).int
- seq_num ignored (since we are a focus agent).- Overrides:
- dispatch_event in class focus_dispatch_agent