All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.text.TextEditController
java.lang.Object
|
+----jp.kyasu.awt.text.TextController
|
+----jp.kyasu.awt.text.BasicTextEditController
|
+----jp.kyasu.awt.text.TextEditController
- public class TextEditController
- extends BasicTextEditController
The TextEditController
class implements a controller
of a MVC model for the text editing. The model of the MVC model is a
TextEditModel
object and the view of the MVC model is a
TextEditView
object.
The BasicTextEditController
class (a superclass of this class)
implements basic operations for the text editing. The
TextEditController
class implements full operations for the
text editing.
- Version:
- 15 Dec 1998
- Author:
- Kazuki YASUMATSU
- See Also:
- TextEditModel, TextEditView, BasicTextEditController
-
TextEditController(TextEditView)
- Constructs a text edit controller with the specified text edit view.
-
backward_character()
- Moves the insertion cursor one character to the left.
-
backward_word()
- Moves the insertion cursor to the first non-whitespace character
after the first whitespace character to the left or the beginning of
the line.
-
beep()
- Causes the terminal to beep.
-
beginning_of_file()
- Moves the insertion cursor to the beginning of the text.
-
beginning_of_line()
- Moves the insertion cursor to the beginning of the line.
-
clearSoftTab()
- Disables soft tab.
-
delete_next_character()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character following the insert cursor.
-
delete_next_character(boolean)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character following the insert cursor.
-
delete_next_word()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters following the insertion cursor to
the next space, tab or end of line character.
-
delete_next_word(boolean)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters following the insertion cursor to
the next space, tab or end of line character.
-
delete_previous_character()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character of text immediately preceding the
insertion cursor.
-
delete_previous_character(boolean)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character of text immediately preceding the
insertion cursor.
-
delete_previous_word()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters preceding the insertion cursor to
the previous space, tab or beginning of line character.
-
delete_previous_word(boolean)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters preceding the insertion cursor to
the previous space, tab or beginning of line character.
-
delete_selection()
- Deletes the current selection.
-
delete_selection(boolean)
- Deletes the current selection.
-
delete_to_end_of_line()
- Deletes the characters following the insertion cursor to the next
end of line character.
-
delete_to_end_of_line(boolean)
- Deletes the characters following the insertion cursor to the next
end of line character.
-
delete_to_start_of_line()
- Deletes the characters preceding the insertion cursor to the previous
beginning of line character.
-
delete_to_start_of_line(boolean)
- Deletes the characters preceding the insertion cursor to the previous
beginning of line character.
-
deselect_all()
- Deselects the current selection.
-
do_nothing()
- Do nothing, but KeyEvent is consumed.
-
end_of_file()
- Moves the insertion cursor to the end of the text.
-
end_of_line()
- Moves the insertion cursor to the end of the line.
-
forward_character()
- Moves the insertion cursor one character to the right.
-
forward_word()
- Moves the insertion cursor to the first whitespace character or
end of line following the next non-whitespace character.
-
getAvailableKeyActions()
- Returns the available key action objects in this controller.
-
getDefaultKeymap()
- Returns the default key map.
-
getSoftTab()
- Returns the length of soft tab.
-
goto_line()
- Go to line.
-
goto_line(int)
- Go to the specified number of the line.
-
insert_string(String)
- If the cursor is inside the selection, deletes the entire selection.
-
isSoftTab()
- Checks if this controller allows soft tab.
-
kill_next_character()
- If the cursor is inside the selection, deletes the entire selection.
-
kill_next_word()
- If the cursor is inside the selection, deletes the entire selection.
-
kill_previous_character()
- If the cursor is inside the selection, deletes the entire selection.
-
kill_previous_word()
- If the cursor is inside the selection, deletes the entire selection.
-
kill_selection()
- Kills the currently selected text and stores the text in the cut buffer.
-
kill_to_end_of_line()
- Kills the characters following the insertion cursor to the next end
of line character and stores the characters in the cut buffer.
-
kill_to_start_of_line()
- Kills the characters preceding the insertion cursor to the next
beginning of line character and stores the characters in the cut buffer.
-
newbreak()
- If the cursor is inside the selection, deletes the entire selection.
-
newline()
- If the cursor is inside the selection, deletes the entire selection.
-
newline_and_indent()
- If the cursor is inside the selection, deletes the entire selection.
-
next_line()
- Moves the insertion cursor to the next line.
-
next_page()
- Moves the insertion cursor forward one page.
-
previous_line()
- Moves the insertion cursor to the previous line.
-
previous_page()
- Moves the insertion cursor back one page.
-
redraw_display()
- Redraw the display.
-
setSoftTab(int)
- Sets the length of soft tab.
-
show_match(char)
- Show match.
-
tab()
- If the cursor is inside the selection, deletes the entire selection.
-
unkill()
- Restores last killed text to the position of the insertion cursor.
TextEditController
public TextEditController(TextEditView view)
- Constructs a text edit controller with the specified text edit view.
- Parameters:
- view - the text edit view.
getDefaultKeymap
public static Keymap getDefaultKeymap()
- Returns the default key map.
isSoftTab
public boolean isSoftTab()
- Checks if this controller allows soft tab.
- See Also:
- clearSoftTab, getSoftTab, setSoftTab
getSoftTab
public int getSoftTab()
- Returns the length of soft tab.
- Returns:
- the length of soft tab. if the length is less than 0, soft tab
is not allowed by this controller.
- See Also:
- setSoftTab, isSoftTab, clearSoftTab
setSoftTab
public void setSoftTab(int i)
- Sets the length of soft tab.
- Parameters:
- i - the length of soft tab. if the length is less than 0, disables
soft tab.
- See Also:
- getSoftTab, isSoftTab, clearSoftTab
clearSoftTab
public void clearSoftTab()
- Disables soft tab.
- See Also:
- isSoftTab, getSoftTab, setSoftTab
getAvailableKeyActions
public KeyAction[] getAvailableKeyActions()
- Returns the available key action objects in this controller.
backward_character
public void backward_character()
- Moves the insertion cursor one character to the left.
backward_word
public void backward_word()
- Moves the insertion cursor to the first non-whitespace character
after the first whitespace character to the left or the beginning of
the line. If the insertion cursor is already at the beginning of a
word, moves the insertion cursor to the beginning of the previous word.
beep
public void beep()
- Causes the terminal to beep.
beginning_of_file
public void beginning_of_file()
- Moves the insertion cursor to the beginning of the text.
beginning_of_line
public void beginning_of_line()
- Moves the insertion cursor to the beginning of the line.
delete_next_character
public void delete_next_character()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character following the insert cursor.
- See Also:
- delete_next_character
delete_next_character
public void delete_next_character(boolean kill)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character following the insert cursor.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_next_character, kill_next_character
delete_next_word
public void delete_next_word()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters following the insertion cursor to
the next space, tab or end of line character.
- See Also:
- delete_next_word
delete_next_word
public void delete_next_word(boolean kill)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters following the insertion cursor to
the next space, tab or end of line character.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_next_word, kill_next_word
delete_previous_character
public void delete_previous_character()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character of text immediately preceding the
insertion cursor.
- See Also:
- delete_previous_character
delete_previous_character
public void delete_previous_character(boolean kill)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character of text immediately preceding the
insertion cursor.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_previous_character, kill_previous_character
delete_previous_word
public void delete_previous_word()
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters preceding the insertion cursor to
the previous space, tab or beginning of line character.
- See Also:
- delete_previous_word
delete_previous_word
public void delete_previous_word(boolean kill)
- If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters preceding the insertion cursor to
the previous space, tab or beginning of line character.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_previous_word, kill_previous_word
delete_selection
public void delete_selection()
- Deletes the current selection.
- See Also:
- delete_selection
delete_selection
public void delete_selection(boolean kill)
- Deletes the current selection.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_selection, kill_selection
delete_to_end_of_line
public void delete_to_end_of_line()
- Deletes the characters following the insertion cursor to the next
end of line character.
- See Also:
- delete_to_end_of_line
delete_to_end_of_line
public void delete_to_end_of_line(boolean kill)
- Deletes the characters following the insertion cursor to the next
end of line character.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_to_end_of_line, kill_to_end_of_line
delete_to_start_of_line
public void delete_to_start_of_line()
- Deletes the characters preceding the insertion cursor to the previous
beginning of line character.
- See Also:
- delete_to_start_of_line
delete_to_start_of_line
public void delete_to_start_of_line(boolean kill)
- Deletes the characters preceding the insertion cursor to the previous
beginning of line character.
- Parameters:
- kill - if true, copies the deleted characters to the clipboard.
- See Also:
- delete_to_start_of_line, kill_to_start_of_line
deselect_all
public void deselect_all()
- Deselects the current selection.
do_nothing
public void do_nothing()
- Do nothing, but KeyEvent is consumed.
end_of_file
public void end_of_file()
- Moves the insertion cursor to the end of the text.
end_of_line
public void end_of_line()
- Moves the insertion cursor to the end of the line.
forward_character
public void forward_character()
- Moves the insertion cursor one character to the right.
forward_word
public void forward_word()
- Moves the insertion cursor to the first whitespace character or
end of line following the next non-whitespace character. If the
insertion cursor is already at the end of a word, moves the
insertion cursor to the end of the next word.
goto_line
public void goto_line()
- Go to line.
goto_line
public void goto_line(int lineNo)
- Go to the specified number of the line.
insert_string
public void insert_string(String str)
- If the cursor is inside the selection, deletes the entire selection.
Inserts string at the insertion cursor.
kill_next_character
public void kill_next_character()
- If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the character following the insertion cursor and
stores the character in the cut buffer.
- See Also:
- delete_next_character
kill_next_word
public void kill_next_word()
- If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the characters following the insertion cursor to
the next space, tab or end of line character, and stores the
characters in the cut buffer.
- See Also:
- delete_next_word
kill_previous_character
public void kill_previous_character()
- If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the character of text immediately preceding the
insertion cursor and stores the character in the cut buffer.
- See Also:
- delete_previous_character
kill_previous_word
public void kill_previous_word()
- If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the characters preceding the insertion cursor to
the next space, tab or beginning of line character, and stores the
characters in the cut buffer.
- See Also:
- delete_previous_word
kill_selection
public void kill_selection()
- Kills the currently selected text and stores the text in the cut buffer.
- See Also:
- delete_selection
kill_to_end_of_line
public void kill_to_end_of_line()
- Kills the characters following the insertion cursor to the next end
of line character and stores the characters in the cut buffer.
- See Also:
- delete_to_end_of_line
kill_to_start_of_line
public void kill_to_start_of_line()
- Kills the characters preceding the insertion cursor to the next
beginning of line character and stores the characters in the cut buffer.
- See Also:
- delete_to_start_of_line
newbreak
public void newbreak()
- If the cursor is inside the selection, deletes the entire selection.
Inserts a newbreak at the insertion cursor.
newline
public void newline()
- If the cursor is inside the selection, deletes the entire selection.
Inserts a newline at the insertion cursor.
newline_and_indent
public void newline_and_indent()
- If the cursor is inside the selection, deletes the entire selection.
Inserts a newline and then the same number of whitespace characters
as at the beginning of the previous line.
next_line
public void next_line()
- Moves the insertion cursor to the next line.
next_page
public void next_page()
- Moves the insertion cursor forward one page.
previous_line
public void previous_line()
- Moves the insertion cursor to the previous line.
previous_page
public void previous_page()
- Moves the insertion cursor back one page.
redraw_display
public void redraw_display()
- Redraw the display.
show_match
public void show_match(char keyChar)
- Show match.
tab
public void tab()
- If the cursor is inside the selection, deletes the entire selection.
Inserts the soft tab.
unkill
public void unkill()
- Restores last killed text to the position of the insertion cursor.
All Packages Class Hierarchy This Package Previous Next Index