|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sub_arctic.lib.min_interactor
|
+--sub_arctic.lib.base_interactor
|
+--sub_arctic.lib.text_display
|
+--sub_arctic.lib.text_edit
Multi-line (but single font) text edit area. This class allows simple entry and editing of multiple lines of text.
| Fields inherited from class sub_arctic.lib.text_display |
_first_line,
_font,
_h_spacing,
_metric,
_selection_end_line,
_selection_end_pos,
_selection_start_line,
_selection_start_pos,
_text,
_v_spacing,
BOXED,
NO_SELECTION,
SELECT_END,
xpos,
ypos,
ypos_cutoff |
| Fields inherited from class sub_arctic.lib.base_interactor |
_child_index,
_child_list,
_clip_bounds,
_constraint_flags,
_enabled_constraint,
_flags,
_h,
_h_constraint,
_parent,
_part_a_constraint,
_part_b_constraint,
_user_data,
_visible_constraint,
_w,
_w_constraint,
_x,
_x_constraint,
_y,
_y_constraint,
default_child_hint |
| Constructor Summary | |
text_edit(int xv,
int yv,
int wv,
int hv,
java.lang.String contents,
java.awt.Font fnt,
boolean boxed)
Full constructor with explicit size. |
|
text_edit(int xv,
int yv,
java.lang.String contents)
Constructor with computed size, default font, and default boxed status. |
|
text_edit(int xv,
int yv,
java.lang.String contents,
java.awt.Font fnt,
boolean boxed)
Full constructor with size determined by initial text. |
|
| Method Summary | |
boolean |
action_char(event evt,
char ch,
java.lang.Object user_info)
Accept 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)
Pre-filter a character before providing it is actually provided as input. |
int |
char_pos_of(int on_ln,
int x_pos)
Map an x position in local coordinates into a text string position (index) on a given line. |
void |
delete_a_char()
Delete the character before the current selection (backing the selection up one character). |
boolean |
delete_char(event evt,
java.lang.Object user_info)
Accept input for a character signifying a delete. |
boolean |
drag_end(event evt,
java.lang.Object user_info)
Accept input corresponding to the end of a drag. |
boolean |
drag_feedback(event evt,
java.lang.Object user_info)
Accept a movement during a drag. |
boolean |
drag_start(event evt,
java.lang.Object user_info)
Accept the start of a drag to the object. |
boolean |
end_text_entry(event evt,
java.lang.Object user_info)
Dispatch input indicating that text input is over (e.g. |
int |
find_line_of(int y_pos)
Map y position in local coordinates into a line number. |
boolean |
line_kill(event evt,
java.lang.Object user_info)
Accept input for a character signifying a line kill. |
boolean |
new_char(event evt,
char ch,
java.lang.Object user_info)
Accept input for a single character. |
boolean |
press(event evt,
java.lang.Object user_info)
Accept mouse button press input to the object. |
boolean |
release(event evt,
java.lang.Object user_info)
Companion method to press() needed to finish pressable. |
void |
replace_selection(java.lang.String with_str)
Replace the area of the current selection with the given string. |
boolean |
special_key(event evt,
int key_code,
java.lang.Object user_info)
Accept 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)
Accept input that signifies that object is new text focus and will receive subsequent text input. |
| Methods inherited from class sub_arctic.lib.text_display |
boxed,
break_into_lines,
draw_highlighted_lines,
draw_norm_lines,
draw_self_local,
draw_split_line,
dump_text,
first_line,
first_line,
font,
get_string,
h_spacing,
intrinsic_constraints,
part_a,
selection_end_line,
selection_end_pos,
selection_start_line,
selection_start_pos,
set_boxed,
set_font,
set_h_spacing,
set_part_a,
set_raw_part_a,
set_selection,
set_text,
set_text,
set_v_spacing,
size_by_content,
text,
v_spacing |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public text_edit(int xv,
int yv,
int wv,
int hv,
java.lang.String contents,
java.awt.Font fnt,
boolean boxed)
int - xv the x position of the object.int - yv the y position of the object.int - wv the width of the object.int - hv the height of the object.String - contents the string to put into the editing area.boolean - boxed true if this object should have a box around it.
public text_edit(int xv,
int yv,
java.lang.String contents,
java.awt.Font fnt,
boolean boxed)
int - xv the x position of the object.int - yv the y position of the object.String - contents the string to put into the editing area.boolean - boxed true if this object should have a box around it.
public text_edit(int xv,
int yv,
java.lang.String contents)
int - xv the x position of the object.int - yv the y position of the object.String - contents the string to put into the editing area.| Method Detail |
public void replace_selection(java.lang.String with_str)
String - with_str the new string to put where the selection is now.public void delete_a_char()
public int char_pos_of(int on_ln,
int x_pos)
int - on_ln the line to be checking.int - x_pos the x coordinate to check (in pixels).public int find_line_of(int y_pos)
int - y_pos the y position (in pixels) to map to a line number.
public boolean start_text_entry(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public int char_filter(int input_char,
int modifiers)
int - input_char the input character to be filtered.int - modifiers the current state of the modifier keys.
public boolean new_char(event evt,
char ch,
java.lang.Object user_info)
event - evt the event to be dispatched.char - ch the character to be entered.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean action_char(event evt,
char ch,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean delete_char(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean line_kill(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean special_key(event evt,
int key_code,
java.lang.Object user_info)
event - evt the event to be dispatched.int - key_code the keyboard code of this special key.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean end_text_entry(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean press(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to pick when this object was
clicked on.
public boolean release(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to pick when this object was
clicked on.
public boolean drag_start(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean drag_feedback(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
public boolean drag_end(event evt,
java.lang.Object user_info)
event - evt the event to be dispatched.Object - user_info the object provided to the agent when this
interactor entered the focus set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||