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

Constructor Index

 o TextEditController(TextEditView)
Constructs a text edit controller with the specified text edit view.

Method Index

 o backward_character()
Moves the insertion cursor one character to the left.
 o 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.
 o beep()
Causes the terminal to beep.
 o beginning_of_file()
Moves the insertion cursor to the beginning of the text.
 o beginning_of_line()
Moves the insertion cursor to the beginning of the line.
 o clearSoftTab()
Disables soft tab.
 o delete_next_character()
If the cursor is inside the selection, deletes the entire selection; otherwise, deletes the character following the insert cursor.
 o delete_next_character(boolean)
If the cursor is inside the selection, deletes the entire selection; otherwise, deletes the character following the insert cursor.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o delete_selection()
Deletes the current selection.
 o delete_selection(boolean)
Deletes the current selection.
 o delete_to_end_of_line()
Deletes the characters following the insertion cursor to the next end of line character.
 o delete_to_end_of_line(boolean)
Deletes the characters following the insertion cursor to the next end of line character.
 o delete_to_start_of_line()
Deletes the characters preceding the insertion cursor to the previous beginning of line character.
 o delete_to_start_of_line(boolean)
Deletes the characters preceding the insertion cursor to the previous beginning of line character.
 o deselect_all()
Deselects the current selection.
 o do_nothing()
Do nothing, but KeyEvent is consumed.
 o end_of_file()
Moves the insertion cursor to the end of the text.
 o end_of_line()
Moves the insertion cursor to the end of the line.
 o forward_character()
Moves the insertion cursor one character to the right.
 o forward_word()
Moves the insertion cursor to the first whitespace character or end of line following the next non-whitespace character.
 o getAvailableKeyActions()
Returns the available key action objects in this controller.
 o getDefaultKeymap()
Returns the default key map.
 o getSoftTab()
Returns the length of soft tab.
 o goto_line()
Go to line.
 o goto_line(int)
Go to the specified number of the line.
 o insert_string(String)
If the cursor is inside the selection, deletes the entire selection.
 o isSoftTab()
Checks if this controller allows soft tab.
 o kill_next_character()
If the cursor is inside the selection, deletes the entire selection.
 o kill_next_word()
If the cursor is inside the selection, deletes the entire selection.
 o kill_previous_character()
If the cursor is inside the selection, deletes the entire selection.
 o kill_previous_word()
If the cursor is inside the selection, deletes the entire selection.
 o kill_selection()
Kills the currently selected text and stores the text in the cut buffer.
 o 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.
 o 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.
 o newbreak()
If the cursor is inside the selection, deletes the entire selection.
 o newline()
If the cursor is inside the selection, deletes the entire selection.
 o newline_and_indent()
If the cursor is inside the selection, deletes the entire selection.
 o next_line()
Moves the insertion cursor to the next line.
 o next_page()
Moves the insertion cursor forward one page.
 o previous_line()
Moves the insertion cursor to the previous line.
 o previous_page()
Moves the insertion cursor back one page.
 o redraw_display()
Redraw the display.
 o setSoftTab(int)
Sets the length of soft tab.
 o show_match(char)
Show match.
 o tab()
If the cursor is inside the selection, deletes the entire selection.
 o unkill()
Restores last killed text to the position of the insertion cursor.

Constructors

 o TextEditController
 public TextEditController(TextEditView view)
Constructs a text edit controller with the specified text edit view.

Parameters:
view - the text edit view.

Methods

 o getDefaultKeymap
 public static Keymap getDefaultKeymap()
Returns the default key map.

 o isSoftTab
 public boolean isSoftTab()
Checks if this controller allows soft tab.

See Also:
clearSoftTab, getSoftTab, setSoftTab
 o 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
 o 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
 o clearSoftTab
 public void clearSoftTab()
Disables soft tab.

See Also:
isSoftTab, getSoftTab, setSoftTab
 o getAvailableKeyActions
 public KeyAction[] getAvailableKeyActions()
Returns the available key action objects in this controller.

 o backward_character
 public void backward_character()
Moves the insertion cursor one character to the left.

 o 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.

 o beep
 public void beep()
Causes the terminal to beep.

 o beginning_of_file
 public void beginning_of_file()
Moves the insertion cursor to the beginning of the text.

 o beginning_of_line
 public void beginning_of_line()
Moves the insertion cursor to the beginning of the line.

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o delete_selection
 public void delete_selection()
Deletes the current selection.

See Also:
delete_selection
 o 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
 o 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
 o 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
 o 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
 o 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
 o deselect_all
 public void deselect_all()
Deselects the current selection.

 o do_nothing
 public void do_nothing()
Do nothing, but KeyEvent is consumed.

 o end_of_file
 public void end_of_file()
Moves the insertion cursor to the end of the text.

 o end_of_line
 public void end_of_line()
Moves the insertion cursor to the end of the line.

 o forward_character
 public void forward_character()
Moves the insertion cursor one character to the right.

 o 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.

 o goto_line
 public void goto_line()
Go to line.

 o goto_line
 public void goto_line(int lineNo)
Go to the specified number of the line.

 o 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.

 o 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
 o 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
 o 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
 o 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
 o kill_selection
 public void kill_selection()
Kills the currently selected text and stores the text in the cut buffer.

See Also:
delete_selection
 o 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
 o 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
 o newbreak
 public void newbreak()
If the cursor is inside the selection, deletes the entire selection. Inserts a newbreak at the insertion cursor.

 o newline
 public void newline()
If the cursor is inside the selection, deletes the entire selection. Inserts a newline at the insertion cursor.

 o 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.

 o next_line
 public void next_line()
Moves the insertion cursor to the next line.

 o next_page
 public void next_page()
Moves the insertion cursor forward one page.

 o previous_line
 public void previous_line()
Moves the insertion cursor to the previous line.

 o previous_page
 public void previous_page()
Moves the insertion cursor back one page.

 o redraw_display
 public void redraw_display()
Redraw the display.

 o show_match
 public void show_match(char keyChar)
Show match.

 o tab
 public void tab()
If the cursor is inside the selection, deletes the entire selection. Inserts the soft tab.

 o unkill
 public void unkill()
Restores last killed text to the position of the insertion cursor.


All Packages  Class Hierarchy  This Package  Previous  Next  Index