|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.input.dispatch_agent | +--sub_arctic.input.selection_agent_class
Positional dispatch agent for maintaining a currently selected set. This agent dispatches inputs under the selectable input protocol and maintains a currently selected object set. Objects can be placed in the set by clicking on them using a Macintosh style interaction where simple clicks make objects the single selection, and clicks with the shift key held down add to the set.
selectable
Field Summary | |
protected java.util.Vector |
_selection_set
The currently selected set. |
protected java.lang.reflect.Method |
select
Hold a reference to the select function of our protocol. |
protected java.lang.reflect.Method |
unselect
Hold a reference to the unselect function of our protocol. |
Constructor Summary | |
selection_agent_class()
Simple constructor |
Method Summary | |
boolean |
add_to_selection_set(selectable obj,
event evt,
java.lang.Object user_info)
Add the given object to the selection set. |
void |
clear_selection_set(event evt,
java.lang.Object user_info)
Clear the selection set to empty. |
boolean |
dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
Attempt to dispatch an event with this agent. |
boolean |
event_is_useful(event evt)
Indicate which events we are interested in seeing. |
int |
find_selection(selectable obj)
Return the index of the given object in the currently selected object set or -1 if the object is not selected. |
protected boolean |
inform_addition(selectable obj,
event evt,
java.lang.Object user_info)
Do the work of informing an object that it has been added to the currently selected object set. |
protected boolean |
inform_removal(selectable obj,
event evt,
java.lang.Object user_info)
Do the work of informing an object that it has been removed from the currently selected object set. |
int |
num_selected()
Number of objects currently selected |
boolean |
remove_from_selection_set(selectable obj,
event evt,
java.lang.Object user_info)
Remove the given object to the selection set. |
selectable |
selected_set_item(int index)
Retrieve the selected object at the given index in the currently selected set. |
boolean |
set_selection(selectable obj,
event evt,
java.lang.Object user_info)
Set the selection set to the given single element. |
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 |
protected java.lang.reflect.Method select
protected java.lang.reflect.Method unselect
protected java.util.Vector _selection_set
Constructor Detail |
public selection_agent_class()
Method Detail |
public int num_selected()
public selectable selected_set_item(int index)
int
- index the index of the desired element.public void clear_selection_set(event evt, java.lang.Object user_info)
event
- evt the event which "caused" the clear.Object
- user_info the user information that should be passed to
objects dropping out of the selection set.public boolean set_selection(selectable obj, event evt, java.lang.Object user_info)
selectable
- obj the object being selectedevent
- evt the event which "caused" the selection.Object
- user_info the user information that should be passed to
objects added and dropped out of the selection
set.public int find_selection(selectable obj)
selectable
- obj the object we are inquiring about.public boolean add_to_selection_set(selectable obj, event evt, java.lang.Object user_info)
selectable
- obj the object being selectedevent
- evt the event which "caused" the selection.Object
- user_info the user information that should be passed to
object added to the selection set.public boolean remove_from_selection_set(selectable obj, event evt, java.lang.Object user_info)
selectable
- obj the object being deselectedevent
- evt the event which "caused" the deselection.Object
- user_info the user information that should be passed to
object dropped out of the selection set.public boolean event_is_useful(event evt)
event
- evt the event we are testing.protected boolean inform_addition(selectable obj, event evt, java.lang.Object user_info)
selectable
- obj the object we are informing.event
- evt the event "causing" the selection.Object
- user_info the user info that should be passed to the
object.protected boolean inform_removal(selectable obj, event evt, java.lang.Object user_info)
selectable
- obj the object we are informing.event
- evt the event "causing" the deselection.Object
- user_info the user info that should be passed to the
object.public boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
event
- evt the event we are trying to dispatchObject
- user_info the user info value to pass with the dispatchinteractor
- to_obj the object to dispatch to.int
- seq_num the sequence number of this event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |