|
|||||||||
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.focus_dispatch_agent | +--sub_arctic.input.single_focus_agent | +--sub_arctic.input.text_focus_agent
Focus based dispatch agent for delivering text input. This agent dispatches under the text_acceptor input protocol. That protocol provides features for filtering characters, recognizing and acting of special "action characters", and performing standard edit functions (i.e., character delete and line kill) in addition to normal text input.
text_acceptor
Field Summary | |
protected java.lang.reflect.Method |
action_char
Keep a reference to the method action_char in the protected protocol.; |
char |
del_char1
First character to be treated as a "delete character". |
char |
del_char2
Second character to be treated as a "delete character". |
protected java.lang.reflect.Method |
delete_char
Keep a reference to the method delete_char in the protected protocol.; |
protected java.lang.reflect.Method |
end_text_entry
Keep a ref to the end_text_entry method. |
protected java.lang.reflect.Method |
line_kill
Keep a reference to the method line_kill in the protected protocol.; |
char |
line_kill_char
Character to be treated as a "line kill character". |
protected java.lang.reflect.Method |
new_char
Keep a reference to the method new_char in the protected protocol.; |
protected java.lang.reflect.Method |
special_key
Keep a reference to the special_key method |
protected java.lang.reflect.Method |
start_text_entry
Keep a reference to the method start_text_entry in the protocol. |
Fields inherited from class sub_arctic.input.focus_dispatch_agent |
_focus_set,
_user_info_set |
Constructor Summary | |
text_focus_agent()
Simple constructor. |
Method Summary | |
boolean |
allowable_focus(focusable candidate_obj)
Indicate whether the given object is suitable to be our focus. |
boolean |
dispatch_event(event evt,
java.lang.Object user_info,
interactor to_obj,
int seq_num)
Attempt to dispatch the given event as text input. |
static int |
eol_action(int ch)
Standard filter to translate end of line characters into closure actions. |
protected void |
inform_focus_enter(focusable obj,
event evt,
java.lang.Object user_info)
Handle informing an object that it has become the new text focus. |
protected void |
inform_focus_exit(focusable obj,
event evt,
java.lang.Object user_info)
Handle informing an object that it has lost the text focus. |
static int |
no_white(int ch)
Standard filter that removes all whitespace. |
static int |
only_digits(int ch)
Standard filter to accept only decimal digits. |
static int |
only_numeric(int ch)
Standard filter to accept only decimal digits, plus, minus, and decimal point. |
static int |
translate_to_lower(int ch)
Standard translation filter for mapping to all lower case. |
static int |
translate_to_upper(int ch)
Standard translation filter for mapping to all upper case. |
Methods inherited from class sub_arctic.input.single_focus_agent |
add_to_focus,
clear_focus,
remove_from_focus,
set_focus_to |
Methods inherited from class sub_arctic.input.focus_dispatch_agent |
focus_item,
focus_set_size,
is_in_focus,
user_info_item |
Methods inherited from class sub_arctic.input.dispatch_agent |
after_dispatch_notify,
dispatch_unused_event,
event_is_useful |
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 start_text_entry
protected java.lang.reflect.Method new_char
protected java.lang.reflect.Method action_char
protected java.lang.reflect.Method delete_char
protected java.lang.reflect.Method line_kill
protected java.lang.reflect.Method special_key
protected java.lang.reflect.Method end_text_entry
public char del_char1
public char del_char2
public char line_kill_char
Constructor Detail |
public text_focus_agent()
Method Detail |
protected void inform_focus_enter(focusable obj, event evt, java.lang.Object user_info)
focusable
- obj the object receiving focusevent
- evt the event that "caused" the focus.Object
- user_info the user info to be passed to the object.protected void inform_focus_exit(focusable obj, event evt, java.lang.Object user_info)
focusable
- obj the object loosing focusevent
- evt the event that "caused" the loss of focus.Object
- user_info the user info to be passed to the object.public boolean allowable_focus(focusable candidate_obj)
focusable
- candidate_obj the object being inquired about.public boolean dispatch_event(event evt, java.lang.Object user_info, interactor to_obj, int seq_num)
event
- evt the event to dispatch.Object
- user_info ignored (since we are focus agent).interactor
- to_obj ignored (since we are focus agent).int
- seq_num ignored (since we are focus agent).public static int translate_to_upper(int ch)
int
- ch ordinal value of the character to translate.public static int translate_to_lower(int ch)
int
- ch ordinal value of the character to translate.public static int no_white(int ch)
return no_white(eol_action(translate_to_lower(ch)));
int
- ch ordinal value of the character to filter.public static int only_digits(int ch)
int
- ch ordinal value of the character to filter.public static int only_numeric(int ch)
int
- ch ordinal value of the character to filter.public static int eol_action(int ch)
return only_digits(eol_action(ch));
int
- ch ordinal value of the character to filter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |