|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Input protocol for objects that accept textual input. This protocol is dispatched by the text focus agent. In addition to simple text input this 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).
text_focus_agent
Field Summary | |
static int |
CLOSURE_ACTION_CHAR
Constant for return from char_filter to signify that character is to be considered a closure point which ends input and should be acted upon (usually this would be done for end of line characters). |
static int |
DISCARD_CHAR
Constant for return from char_filter signifying that character is to be discarded. |
Method Summary | |
boolean |
action_char(event evt,
char ch,
java.lang.Object user_info)
Provide input for a character that has been classified as a closure action (by returning CLOSURE_ACTION_CHAR from char_filter). |
int |
char_filter(int input_char,
int modifiers)
Prefilter a character before providing it as input. |
boolean |
delete_char(event evt,
java.lang.Object user_info)
Provide input for a character signifying a delete. |
boolean |
end_text_entry(event evt,
java.lang.Object user_info)
Provide input indicating that text input is over (e.g. |
boolean |
line_kill(event evt,
java.lang.Object user_info)
Provide input for a character signifying a line kill. |
boolean |
new_char(event evt,
char ch,
java.lang.Object user_info)
Provide input for a single character. |
boolean |
special_key(event evt,
int key_code,
java.lang.Object user_info)
Provide input for a key press signifying a special key (corresponding to KEY_ACTION events). |
boolean |
start_text_entry(event evt,
java.lang.Object user_info)
indicate that this object is the new text focus and will receive subsequent text input. |
Methods inherited from interface sub_arctic.input.focusable |
focus_set_enter,
focus_set_exit |
Field Detail |
public static final int DISCARD_CHAR
public static final int CLOSURE_ACTION_CHAR
Method Detail |
public boolean start_text_entry(event evt, java.lang.Object user_info)
event
- evt the event that "caused" the start of text input.Object
- user_info the user info associated with this object when it
was added to the focus set.public int char_filter(int input_char, int modifiers)
Filtering is done by returning the special value DISCARD_CHAR (= -1), which signifies that the character is not to be passed to new_char(). Translation is done by returning the ordinal value of the translated character. In addition, the value CLOSURE_ACTION_CHAR (= -2) can be returned to indicate that the action_char() method should be invoked instead of new_char(). This is typically done for end of line characters that signify completion of an entry.
int
- input_char ordinal value of the original input character.int
- modifiers modifier mask (see event for encoding).text_focus_agent
,
event
public boolean new_char(event evt, char ch, java.lang.Object user_info)
event
- evt the original event for the character input.char
- ch the translated character that should be
considered the actual input.Object
- user_info the user info that was associated with this object
when it was established as a text focus.public boolean action_char(event evt, char ch, java.lang.Object user_info)
event
- evt the original event for the character input.char
- ch the character.Object
- user_info the user info that was associated with this object
when it was established as a text focus.public boolean delete_char(event evt, java.lang.Object user_info)
event
- evt the event for the input.Object
- user_info the user info that was associated with this object
when it was established as a text focus.public boolean line_kill(event evt, java.lang.Object user_info)
event
- evt the event for the input.Object
- user_info the user info that was associated with this object
when it was established as a text focus.public boolean special_key(event evt, int key_code, java.lang.Object user_info)
event
- evt the original event for the character input.int
- key_code the key code for the action key (see event).Object
- user_info the user info that was associated with this object
when it was established as a text focus.event
public boolean end_text_entry(event evt, java.lang.Object user_info)
event
- evt the event "causing" this input.Object
- user_info the user info that was associated with this object
when it was established as a text focus.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |