All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.TextComponent
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----jp.kyasu.awt.KContainer
|
+----jp.kyasu.awt.EventProxyContainer
|
+----jp.kyasu.awt.TextComponent
- public class TextComponent
- extends EventProxyContainer
- implements TextListener, TextPositionListener
A TextComponent is a component that allows the editing of some text.
A TextComponent is an MVC-based component. The model of the
TextComponent is a TextEditModel
object, the view of
the TextComponent is a TextEditView
object, and the
controller of the TextComponent is a
TextEditController
object.
The principal editing operations on a TextComponent
are
the replaceRange (replaceSelection)
,
setRangeTextStyle (setSelectionTextStyle)
,
modifyRangeTextStyle (modifySelectionTextStyle)
,
setRangeParagraphStyle (setSelectionParagraphStyle)
and
modifyRangeParagraphStyle (modifySelectionParagraphStyle)
methods:
- The
replaceRange (replaceSelection)
method replaces the
specified range (selection) of the text (model) with the specified
replacement text.
- The
setRangeTextStyle (setSelectionTextStyle)
method
sets the text style in the specified range (selection) of the text
(model) to be the specified text style.
- The
>modifyRangeTextStyle (modifySelectionTextStyle)
method modifies the text style in the specified range (selection) of
the text (model) by using the specified TextStyleModifier
object.
- The
setRangeParagraphStyle (setSelectionParagraphStyle)
method sets the paragraph style at the specified range (selection)
of the text (model) to be the specified paragraph style.
- The
modifyRangeParagraphStyle
(modifySelectionParagraphStyle)
method modifies the paragraph
style at the specified range (selection) of the text (model) by using
the specified ParagraphStyleModifier
object.
An application should use the above editing operations and should not
edit the text of the TextComponent directly.
- Version:
- 25 Jul 1998
- Author:
- Kazuki YASUMATSU
- See Also:
- TextModel, TextEditModel, TextEditView, BasicTextEditController, TextEditController
-
CHAR_WRAP
- The constant for the character line wrapping style.
-
DEFAULT_HORIZONTAL_STYLE
- The default rich text style when the horizontal scrollbar only.
-
DEFAULT_VERTICAL_STYLE
- The default rich text style when the vertical scrollbar only.
-
NO_WRAP
- The constant for the no line wrapping style.
-
NOT_EDITABLE_BACKGROUND
- The default background color for the not editable state.
-
NOT_EDITABLE_FOREGROUND
- The default foreground color for the not editable state.
-
NOT_EDITABLE_SELECTION_BACKGROUND
- The default selection background color for the not editable state.
-
NOT_EDITABLE_SELECTION_FOREGROUND
- The default selection foreground color for the not editable state.
-
SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
-
SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
-
SCROLLBARS_NONE
- Do not create or display any scrollbars.
-
SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
-
WORD_WRAP
- The constant for the word line wrapping style.
-
TextComponent(RichText)
- Constructs a new text component with the specified rich text.
-
TextComponent(RichText, int)
- Constructs a new text component with the specified rich text and
scroll bar visibility.
-
TextComponent(String)
- Constructs a new text component with the specified string.
-
TextComponent(String, int)
- Constructs a new text component with the specified string and scroll
bar visibility.
-
TextComponent(String, int, RichTextStyle)
- Constructs a new text component with the specified string, scroll bar
visibility, and rich text style.
-
TextComponent(TextEditModel)
- Constructs a new text component with the specified model.
-
TextComponent(TextEditModel, int)
- Constructs a new text component with the specified model and scroll
bar visibility.
-
TextComponent(TextEditModel, int, VBorder)
- Constructs a new text component with the specified model, scroll bar
visibility, and border visual.
-
addKeyAction(KeyAction)
- Adds the key action to the key binding of this text component.
-
addTextListener(TextListener)
- Adds the specified text event listener to recieve text events from
this text component.
-
addTextPositionListener(TextPositionListener)
- Adds the specified text position event listener to recieve text
position events from this text component.
-
append(String)
- Appends the given string to the text component's current text.
-
append(Text)
- Appends the given text to the current text.
-
append(Text, boolean)
- Appends the given text to the current text.
-
appendText(String)
-
Deprecated.
-
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.
-
clearUndo()
- Clears the undo of the last change.
-
copy_clipboard()
- Copies the current selection to the clipboard.
-
cut_clipboard()
- Cuts the current selection to the clipboard.
-
delete_next_character()
- 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_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_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_selection()
- 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_start_of_line()
- Deletes the characters preceding the insertion cursor to the previous
beginning of line character.
-
deselect_all()
- Deselects the current selection.
-
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.
-
find_word()
- Finds the word and move the insertion cursor to the founded word.
-
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.
-
getCaretColor()
- Returns the caret color.
-
getCaretPosition()
- Returns the position of the text insertion caret for this text component.
-
getColumns()
- Returns the number of columns in this text component.
-
getController()
- Returns the controller of this text component.
-
getCurrentTextStyle()
- Returns the current text style of this text component.
-
getEditMenu()
- Returns the edit menu of this text component.
-
getKeyAction(String)
- Returns the key action object associated with the specified name.
-
getKeyBinding()
- Returns the key binding of this text component.
-
getKeymap()
- Returns the keymap of this text component.
-
getLineWrap()
- Returns the line wrapping style.
-
getLocationOfText()
- Returns the location of the text of this text component.
-
getMinimumSize()
- Returns the minimum size of this text component.
-
getMinimumSize(int, int)
- Returns the minimum size of a text component with the specified
number of rows and columns.
-
getModel()
- Returns the model of this text component.
-
getParagraphStyleAt(int)
- Returns the paragraph style at the specified index in this text
component.
-
getParagraphStyleCount()
- Returns the number of the paragraph styles in the text of this text
component.
-
getParagraphStyles()
- Returns all paragraph styles in the text of this text component.
-
getParagraphStyles(int, int)
- Returns the paragraph styles in the text of this text component.
-
getPopupMenu()
- Returns the popup menu of this text component.
-
getPreferredSize()
- Returns the preferred size of this text component.
-
getPreferredSize(int, int)
- Determines the preferred size of a text component with the specified
number of rows and columns.
-
getRichText()
- Returns the rich text of this text component.
-
getRows()
- Returns the number of rows in the text component.
-
getScrollbarThickness()
- Returns the thickness of the scroll bar.
-
getScrollbarVisibility()
- Returns an enumerated value that indicates which scroll bars
the text component uses.
-
getSelectedText()
- Returns the selected string from the string that is presented by
this text component.
-
getSelectedTEXT()
- Returns the selected text from this text component.
-
getSelectionBackground()
- Returns the selection background color.
-
getSelectionEnd()
- Returns the end position of the selected text in this text component.
-
getSelectionForeground()
- Returns the selection foreground color.
-
getSelectionStart()
- Returns the start position of the selected text in this text component.
-
getSoftTab()
- Returns the length of soft tab.
-
getTEXT()
- Returns the text of this text component.
-
getText()
- Returns the string that is presented by this text component.
-
getText(String)
- Returns the string that is presented by this text component.
-
getTextCaret()
- Returns the text caret of this text component.
-
getTextStyleAt(int)
- Returns the text style at the specified index in this text component.
-
getTextStyleCount()
- Returns the number of the text styles in the text of this text component.
-
getTextStyles()
- Returns all text styles in the text of this text component.
-
getTextStyles(int, int)
- Returns the text styles in the text of this text component.
-
getView()
- Returns the view of this text component.
-
goto_line()
- Go to line.
-
insert(String, int)
- Inserts the specified string at the specified position in this
text component.
-
insert(Text, int)
- Inserts the specified text at the specified position in this text
component.
-
insert(Text, int, boolean)
- Inserts the specified text at the specified position in this text
component.
-
insert_character(char)
- If the cursor is inside the selection, deletes the entire selection.
-
insert_string(String)
- If the cursor is inside the selection, deletes the entire selection.
-
insertText(String, int)
-
Deprecated.
-
isAutoIndentEnabled()
- Checks if the auto indent is enabled.
-
isClickable()
- Tests if this text component handles
ClickableTextAction
.
-
isClickToFocus()
- Tests if the text component requests the focus when the mouse is clicked.
-
isEditable()
- Indicates whether or not this text component is editable.
-
isMouseFocus()
- Tests if the text component requests the focus when the mouse enters
the component.
-
isShowMatchEnabled()
- Checks if the show match is enabled.
-
isSoftTab()
- Checks if this text component 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.
-
minimumSize(int, int)
-
Deprecated.
-
modifyRangeParagraphStyle(ParagraphStyleModifier, int, int)
- Modifies the paragraph style between the indicated start and end
positions by the specified paragraph style modifier.
-
modifyRangeParagraphStyle(ParagraphStyleModifier, int, int, boolean)
- Modifies the paragraph style between the indicated start and end
positions by the specified paragraph style modifier.
-
modifyRangeTextStyle(TextStyleModifier, int, int)
- Modifies the text style between the indicated start and end positions
by the specified text style modifier.
-
modifyRangeTextStyle(TextStyleModifier, int, int, boolean)
- Modifies the text style between the indicated start and end positions
by the specified text style modifier.
-
modifySelectionParagraphStyle(ParagraphStyleModifier)
- Modifies the paragraph style in the range of the current selection by
the specified paragraph style modifier.
-
modifySelectionParagraphStyle(ParagraphStyleModifier, boolean)
- Modifies the paragraph style in the range of the current selection by
the specified paragraph style modifier.
-
modifySelectionTextStyle(TextStyleModifier)
- Modifies the text style in the range of the current selection by the
specified text style modifier.
-
modifySelectionTextStyle(TextStyleModifier, boolean)
- Modifies the text style in the range of the current selection by the
specified text style modifier.
-
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.
-
paragraphStyles()
- Returns an enumeration of the paragraph styles of the text of this
text component.
-
paragraphStyles(int, int)
- Returns an enumeration of the paragraph styles of the text of this
text component.
-
paste_clipboard()
- Pastes the the clipboard before the insertion cursor.
-
performKeyAction(String)
- Performs the key action named the specified name.
-
performKeyAction(String, char)
- Performs the key action named the specified name.
-
preferredSize(int, int)
-
Deprecated.
-
previous_line()
- Moves the insertion cursor to the previous line.
-
previous_page()
- Moves the insertion cursor back one page.
-
print(boolean)
- Prints the text of this text component with the specified flag
determining to print a page number in footer.
-
print(Insets, String, boolean)
- Prints the text of this text component with the specified insets,
header string, and flag determining to print a page number in footer.
-
print(PrintJob, Insets, String, boolean)
- Prints the text of this text component to a print device provided from
the specified print job, with the specified insets, header string, and
flag determining to print a page number in footer.
-
print(PrintJob, String, boolean)
- Prints the text of this text component to a print device provided from
the specified print job, with the specified header string and flag
determining to print a page number in footer.
-
print(String, boolean)
- Prints the text of this text component with the specified header
string and flag determining to print a page number in footer.
-
redraw_display()
- Redraw the display.
-
removeKeyAction(KeyAction)
- Removes the key action from the key binding of this text component.
-
removeKeyActionNamed(String)
- Removes the key action named the specified name from the key binding
of this text component.
-
removeTextListener(TextListener)
- Removes the specified text event listener so that it no longer
receives text events from this textcomponent
-
removeTextPositionListener(TextPositionListener)
- Removes the specified text position event listener so that it no
longer receives text position events from this text component
-
replaceRange(String, int, int)
- Replaces text between the indicated start and end positions
with the specified replacement text.
-
replaceRange(Text, int, int)
- Replaces text between the indicated start and end positions
with the specified replacement text.
-
replaceRange(Text, int, int, boolean)
- Replaces text between the indicated start and end positions
with the specified replacement text.
-
replaceSelection(String)
- Replaces string in the range of the current selection with the
specified replacement string.
-
replaceSelection(Text)
- Replaces text in the range of the current selection with the
specified replacement text.
-
replaceSelection(Text, boolean)
- Replaces text in the range of the current selection with the
specified replacement text.
-
replaceText(String, int, int)
-
Deprecated.
-
select(int, int)
- Selects the text between the specified start and end positions.
-
select(int, int, boolean)
- Selects the text between the specified start and end positions.
-
select(int, int, boolean, boolean)
- Selects the text between the specified start and end positions.
-
select_all()
- Select all text.
-
select_line()
- Select a line at the selection start position.
-
select_word()
- Select a word at the selection start position.
-
selectAll()
- Selects all the text in this text component.
-
selectionIsCaret()
- Tests if the selection is caret, i.e., null selection.
-
setAutoIndentEnabled(boolean)
- Enables the auto indent.
-
setBackground(Color)
- Sets the background color of this text component.
-
setCaretColor(Color)
- Sets the caret color.
-
setCaretPosition(int)
- Sets the position of the text insertion caret for this text component.
-
setCaretPosition(int, boolean)
- Sets the position of the text insertion caret.
-
setClickable(boolean)
- Makes this text component handle
ClickableTextAction
.
-
setClickToFocus()
- Makes the text component request the focus when the mouse is clicked.
-
setColumns(int)
- Sets the number of columns for this text component.
-
setCursor(Cursor)
- Sets the cursor of this text component.
-
setEditable(boolean)
- Sets the flag that determines whether or not this text component is
editable.
-
setEditable(boolean, boolean)
- Sets the flag that determines whether or not this text component is
editable.
-
setEnabled(boolean)
- Enables or disables this text component.
-
setFont(Font)
- Sets the font of this text component.
-
setForeground(Color)
- Sets the foreground color of this text component.
-
setKeymap(Keymap)
- Sets the keymap of this text component.
-
setLineWrap(int)
- Sets the line wrapping style.
-
setLocationOfText(Point)
- Sets the location of the text of this text component.
-
setMouseFocus()
- Makes the text component request the focus when the mouse enters the
component.
-
setPopupMenu(PopupMenu)
- Sets the popup menu of this text component.
-
setRangeParagraphStyle(ParagraphStyle, int, int)
- Sets the paragraph style between the indicated start and end positions
to the specified paragraph style.
-
setRangeParagraphStyle(ParagraphStyle, int, int, boolean)
- Sets the paragraph style between the indicated start and end positions
to the specified paragraph style.
-
setRangeTextStyle(TextStyle, int, int)
- Sets the text style between the indicated start and end positions
to the specified text style.
-
setRangeTextStyle(TextStyle, int, int, boolean)
- Sets the text style between the indicated start and end positions
to the specified text style.
-
setRichText(RichText)
- Sets the rich text of this text component.
-
setRows(int)
- Sets the number of rows for this text component.
-
setScrollbarThickness(int)
- Sets the thickness of the scroll bar.
-
setSelectionBackground(Color)
- Sets the selection background color.
-
setSelectionEnd(int)
- Sets the selection end for this text component to the specified position.
-
setSelectionForeground(Color)
- Sets the selection foreground color.
-
setSelectionParagraphStyle(ParagraphStyle)
- Sets the paragraph style in the range of the current selection to the
specified paragraph style.
-
setSelectionParagraphStyle(ParagraphStyle, boolean)
- Sets the paragraph style in the range of the current selection to the
specified paragraph style.
-
setSelectionStart(int)
- Sets the selection start for this text component to the specified
position.
-
setSelectionTextStyle(TextStyle)
- Sets the text style in the range of the current selection to the
specified text style.
-
setSelectionTextStyle(TextStyle, boolean)
- Sets the text style in the range of the current selection to the
specified text style.
-
setShowMatchEnabled(boolean)
- Enables the show match.
-
setSoftTab(int)
- Sets the length of soft tab.
-
setText(String)
- Sets the string that is presented by this text component to be the
specified string.
-
setTEXT(Text)
- Sets the text of this text component.
-
setTextCaret(TextCaret)
- Sets the text caret of this text component.
-
tab()
- If the cursor is inside the selection, deletes the entire selection.
-
textPositionChanged(TextPositionEvent)
- Invoked when the position of the text has changed.
-
textStyles()
- Returns an enumeration of the text styles of the text of this text
component.
-
textStyles(int, int)
- Returns an enumeration of the text styles of the text of this text
component.
-
textValueChanged(TextEvent)
- Invoked when the value of the text has changed.
-
undo()
- Undo the last change.
-
unkill()
- Restores last killed text to the position of the insertion cursor.
SCROLLBARS_BOTH
public static final int SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
SCROLLBARS_VERTICAL_ONLY
public static final int SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
SCROLLBARS_HORIZONTAL_ONLY
public static final int SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
SCROLLBARS_NONE
public static final int SCROLLBARS_NONE
- Do not create or display any scrollbars.
CHAR_WRAP
public static final int CHAR_WRAP
- The constant for the character line wrapping style.
The line is wrapped at the character boundary.
WORD_WRAP
public static final int WORD_WRAP
- The constant for the word line wrapping style.
The line is wrapped at the word boundary.
NO_WRAP
public static final int NO_WRAP
- The constant for the no line wrapping style.
The line is wrapped only at the line separator.
NOT_EDITABLE_FOREGROUND
public static final Color NOT_EDITABLE_FOREGROUND
- The default foreground color for the not editable state.
NOT_EDITABLE_BACKGROUND
public static final Color NOT_EDITABLE_BACKGROUND
- The default background color for the not editable state.
NOT_EDITABLE_SELECTION_FOREGROUND
public static final Color NOT_EDITABLE_SELECTION_FOREGROUND
- The default selection foreground color for the not editable state.
NOT_EDITABLE_SELECTION_BACKGROUND
public static final Color NOT_EDITABLE_SELECTION_BACKGROUND
- The default selection background color for the not editable state.
DEFAULT_VERTICAL_STYLE
public static final RichTextStyle DEFAULT_VERTICAL_STYLE
- The default rich text style when the vertical scrollbar only.
DEFAULT_HORIZONTAL_STYLE
public static final RichTextStyle DEFAULT_HORIZONTAL_STYLE
- The default rich text style when the horizontal scrollbar only.
TextComponent
public TextComponent(String string)
- Constructs a new text component with the specified string.
- Parameters:
- string - the initial string that the component presents.
TextComponent
public TextComponent(String string,
int scrollbars)
- Constructs a new text component with the specified string and scroll
bar visibility.
- Parameters:
- string - the initial string that the component presents.
- scrollbars - a constant that determines what scrollbars are
created to view the text component.
TextComponent
public TextComponent(String string,
int scrollbars,
RichTextStyle rtStyle)
- Constructs a new text component with the specified string, scroll bar
visibility, and rich text style.
- Parameters:
- string - the initial string that the component presents.
- scrollbars - a constant that determines what scrollbars are
created to view the text component.
- rtStyle - the rich text style.
TextComponent
public TextComponent(RichText richText)
- Constructs a new text component with the specified rich text.
- Parameters:
- richText - the initial rich text that the component presents.
TextComponent
public TextComponent(RichText richText,
int scrollbars)
- Constructs a new text component with the specified rich text and
scroll bar visibility.
- Parameters:
- richText - the initial rich text that the component presents.
- scrollbars - a constant that determines what scrollbars are
created to view the text component.
TextComponent
public TextComponent(TextEditModel textEditModel)
- Constructs a new text component with the specified model.
- Parameters:
- textEditModel - the initial model of the MVC component.
TextComponent
public TextComponent(TextEditModel textEditModel,
int scrollbars)
- Constructs a new text component with the specified model and scroll
bar visibility.
- Parameters:
- textEditModel - the initial model of the MVC component.
- scrollbars - a constant that determines what scrollbars are
created to view the text component.
TextComponent
public TextComponent(TextEditModel textEditModel,
int scrollbars,
VBorder border)
- Constructs a new text component with the specified model, scroll bar
visibility, and border visual.
- Parameters:
- textEditModel - the initial model of the MVC component.
- scrollbars - a constant that determines what scrollbars are
created to view the text component.
- border - the border visual of the text component.
addTextListener
public synchronized void addTextListener(TextListener l)
- Adds the specified text event listener to recieve text events from
this text component.
- Parameters:
- l - the text event listener.
removeTextListener
public synchronized void removeTextListener(TextListener l)
- Removes the specified text event listener so that it no longer
receives text events from this textcomponent
- Parameters:
- l - the text event listener.
textValueChanged
public void textValueChanged(TextEvent e)
- Invoked when the value of the text has changed.
- See Also:
- TextListener
addTextPositionListener
public synchronized void addTextPositionListener(TextPositionListener l)
- Adds the specified text position event listener to recieve text
position events from this text component.
- Parameters:
- l - the text position event listener.
removeTextPositionListener
public synchronized void removeTextPositionListener(TextPositionListener l)
- Removes the specified text position event listener so that it no
longer receives text position events from this text component
- Parameters:
- l - the text position event listener.
textPositionChanged
public void textPositionChanged(TextPositionEvent te)
- Invoked when the position of the text has changed.
- See Also:
- TextPositionListener
setForeground
public synchronized void setForeground(Color c)
- Sets the foreground color of this text component.
- Overrides:
- setForeground in class Component
setBackground
public synchronized void setBackground(Color c)
- Sets the background color of this text component.
- Overrides:
- setBackground in class Component
setFont
public synchronized void setFont(Font font)
- Sets the font of this text component.
- Overrides:
- setFont in class Component
setCursor
public synchronized void setCursor(Cursor c)
- Sets the cursor of this text component.
- Overrides:
- setCursor in class Component
setEnabled
public synchronized void setEnabled(boolean b)
- Enables or disables this text component.
- Overrides:
- setEnabled in class KContainer
setText
public synchronized void setText(String str)
- Sets the string that is presented by this text component to be the
specified string.
- Parameters:
- str - the new string.
- See Also:
- getText
getText
public String getText()
- Returns the string that is presented by this text component.
- See Also:
- setText, getText
getText
public String getText(String separator)
- Returns the string that is presented by this text component.
- Parameters:
- separator - the preferred line separator string.
- See Also:
- setText, getText
getSelectedText
public String getSelectedText()
- Returns the selected string from the string that is presented by
this text component.
- Returns:
- the selected string of this text component.
- See Also:
- select
isEditable
public boolean isEditable()
- Indicates whether or not this text component is editable.
- Returns:
-
true
if this text component is editable;
false
otherwise.
- See Also:
- setEditable
setEditable
public synchronized void setEditable(boolean b)
- Sets the flag that determines whether or not this text component is
editable.
- Parameters:
- b - a flag indicating whether this text component should be user
editable.
- See Also:
- isEditable, setEditable
getSelectionStart
public int getSelectionStart()
- Returns the start position of the selected text in this text component.
- Returns:
- the start position of the selected text.
- See Also:
- setSelectionStart, getSelectionEnd
setSelectionStart
public void setSelectionStart(int selectionStart)
- Sets the selection start for this text component to the specified
position.
- Parameters:
- selectionStart - the start position of the selected text.
- See Also:
- getSelectionStart, setSelectionEnd
getSelectionEnd
public int getSelectionEnd()
- Returns the end position of the selected text in this text component.
- Returns:
- the end position of the selected text.
- See Also:
- setSelectionEnd, getSelectionStart
setSelectionEnd
public void setSelectionEnd(int selectionEnd)
- Sets the selection end for this text component to the specified position.
- Parameters:
- selectionEnd - the end position of the selected text.
- See Also:
- getSelectionEnd, setSelectionStart
select
public synchronized void select(int selectionStart,
int selectionEnd)
- Selects the text between the specified start and end positions.
- Parameters:
- selectionStart - the start position of the text to select.
- selectionEnd - the end position of the text to select.
- See Also:
- setSelectionStart, setSelectionEnd, selectAll
selectAll
public void selectAll()
- Selects all the text in this text component.
- See Also:
- select
setCaretPosition
public synchronized void setCaretPosition(int position)
- Sets the position of the text insertion caret for this text component.
- Parameters:
- position - the position of the text insertion caret.
- See Also:
- getCaretPosition
getCaretPosition
public int getCaretPosition()
- Returns the position of the text insertion caret for this text component.
- Returns:
- the position of the text insertion caret.
- See Also:
- setCaretPosition
selectionIsCaret
public boolean selectionIsCaret()
- Tests if the selection is caret, i.e., null selection.
insert
public synchronized void insert(String str,
int pos)
- Inserts the specified string at the specified position in this
text component.
- Parameters:
- str - the string to insert.
- pos - the position at which to insert.
- See Also:
- setText, replaceRange, append
insertText
public void insertText(String str,
int pos)
- Note: insertText() is deprecated.
As of JDK version 1.1,
replaced by
insert(String, int)
.
append
public synchronized void append(String str)
- Appends the given string to the text component's current text.
- Parameters:
- str - the text to append.
- See Also:
- insert
appendText
public void appendText(String str)
- Note: appendText() is deprecated.
As of JDK version 1.1,
replaced by
append(String)
.
replaceRange
public synchronized void replaceRange(String str,
int start,
int end)
- Replaces text between the indicated start and end positions
with the specified replacement text.
- Parameters:
- str - the string to use as the replacement.
- start - the start position.
- end - the end position.
- See Also:
- insert
replaceText
public void replaceText(String str,
int start,
int end)
- Note: replaceText() is deprecated.
As of JDK version 1.1,
replaced by
replaceRange(String, int, int)
.
getRows
public int getRows()
- Returns the number of rows in the text component.
- Returns:
- the number of rows in the text component.
- See Also:
- setRows, getColumns
setRows
public void setRows(int rows)
- Sets the number of rows for this text component.
- Parameters:
- rows - the number of rows.
- See Also:
- getRows, setColumns
getColumns
public int getColumns()
- Returns the number of columns in this text component.
- Returns:
- the number of columns in the text component.
- See Also:
- setColumns, getRows
setColumns
public void setColumns(int columns)
- Sets the number of columns for this text component.
- Parameters:
- columns - the number of columns.
- See Also:
- getColumns, setRows
getScrollbarVisibility
public int getScrollbarVisibility()
- Returns an enumerated value that indicates which scroll bars
the text component uses.
- Returns:
- an integer that indicates which scroll bars are used.
- See Also:
- SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE
getPreferredSize
public Dimension getPreferredSize(int rows,
int columns)
- Determines the preferred size of a text component with the specified
number of rows and columns.
- Parameters:
- rows - the number of rows.
- columns - the number of columns.
- Returns:
- the preferred dimensions required to display the text component
with the specified number of rows and columns.
preferredSize
public Dimension preferredSize(int rows,
int columns)
- Note: preferredSize() is deprecated.
As of JDK version 1.1,
replaced by
getPreferredSize(int, int)
.
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of this text component.
- Returns:
- the preferred dimensions needed for this text component.
- Overrides:
- getPreferredSize in class KContainer
getMinimumSize
public Dimension getMinimumSize(int rows,
int columns)
- Returns the minimum size of a text component with the specified
number of rows and columns.
- Parameters:
- rows - the number of rows.
- columns - the number of columns.
- Returns:
- the minimum dimensions required to display the text component
with the specified number of rows and columns.
minimumSize
public Dimension minimumSize(int rows,
int columns)
- Note: minimumSize() is deprecated.
As of JDK version 1.1,
replaced by
getMinimumSize(int, int)
.
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this text component.
- Returns:
- the preferred dimensions needed for this text component.
- Overrides:
- getMinimumSize in class KContainer
getModel
public TextEditModel getModel()
- Returns the model of this text component.
getView
public TextEditView getView()
- Returns the view of this text component.
getController
public TextEditController getController()
- Returns the controller of this text component.
getRichText
public RichText getRichText()
- Returns the rich text of this text component.
setRichText
public synchronized void setRichText(RichText richText)
- Sets the rich text of this text component.
getLineWrap
public int getLineWrap()
- Returns the line wrapping style.
- See Also:
- setLineWrap, CHAR_WRAP, WORD_WRAP, NO_WRAP
setLineWrap
public synchronized void setLineWrap(int lineWrap)
- Sets the line wrapping style.
- Parameters:
- lineWrap - the line wrapping style.
- See Also:
- getLineWrap, CHAR_WRAP, WORD_WRAP, NO_WRAP
getLocationOfText
public Point getLocationOfText()
- Returns the location of the text of this text component.
- See Also:
- setLocationOfText
setLocationOfText
public synchronized void setLocationOfText(Point p)
- Sets the location of the text of this text component.
- See Also:
- getLocationOfText
getSelectionForeground
public Color getSelectionForeground()
- Returns the selection foreground color.
- See Also:
- setSelectionForeground
setSelectionForeground
public synchronized void setSelectionForeground(Color c)
- Sets the selection foreground color.
- See Also:
- getSelectionForeground
getSelectionBackground
public Color getSelectionBackground()
- Returns the selection background color.
- See Also:
- setSelectionBackground
setSelectionBackground
public synchronized void setSelectionBackground(Color c)
- Sets the selection background color.
- See Also:
- getSelectionBackground
getCaretColor
public Color getCaretColor()
- Returns the caret color.
- See Also:
- setCaretColor
setCaretColor
public synchronized void setCaretColor(Color c)
- Sets the caret color.
- See Also:
- getCaretColor
getTextCaret
public TextCaret getTextCaret()
- Returns the text caret of this text component.
- See Also:
- setCaretColor
setTextCaret
public synchronized void setTextCaret(TextCaret textCaret)
- Sets the text caret of this text component.
- See Also:
- getTextCaret
getEditMenu
public Menu getEditMenu()
- Returns the edit menu of this text component.
getPopupMenu
public PopupMenu getPopupMenu()
- Returns the popup menu of this text component.
- See Also:
- setPopupMenu
setPopupMenu
public void setPopupMenu(PopupMenu menu)
- Sets the popup menu of this text component.
- See Also:
- getPopupMenu
setEditable
public synchronized void setEditable(boolean b,
boolean changeColor)
- Sets the flag that determines whether or not this text component is
editable.
- Parameters:
- b - a flag indicating whether this text component should be user
editable.
- changeColor - if true, change the color of the text component
according to the editable state.
- See Also:
- isEditable, setEditable
isClickToFocus
public boolean isClickToFocus()
- Tests if the text component requests the focus when the mouse is clicked.
- Returns:
-
true
if the text component requests the focus when
the mouse is clicked, false
if the text component
requests the focus when the mouse enters the view.
- See Also:
- isMouseFocus
isMouseFocus
public boolean isMouseFocus()
- Tests if the text component requests the focus when the mouse enters
the component.
- See Also:
- isClickToFocus
setClickToFocus
public void setClickToFocus()
- Makes the text component request the focus when the mouse is clicked.
- See Also:
- isClickToFocus, setMouseFocus
setMouseFocus
public void setMouseFocus()
- Makes the text component request the focus when the mouse enters the
component.
- See Also:
- isMouseFocus, setClickToFocus
getKeymap
public Keymap getKeymap()
- Returns the keymap of this text component.
- See Also:
- setKeymap
setKeymap
public synchronized void setKeymap(Keymap keymap)
- Sets the keymap of this text component.
- See Also:
- getKeymap
getKeyBinding
public KeyBinding getKeyBinding()
- Returns the key binding of this text component.
- See Also:
- addKeyAction, removeKeyAction, removeKeyActionNamed
getKeyAction
public KeyAction getKeyAction(String actionName)
- Returns the key action object associated with the specified name.
- Parameters:
- actionName - the name of the key action.
- Returns:
- the key action object, or
null
if no associated
action exists.
- See Also:
- addKeyAction, removeKeyAction, removeKeyActionNamed
addKeyAction
public synchronized void addKeyAction(KeyAction keyAction)
- Adds the key action to the key binding of this text component.
- Parameters:
- keyAction - the key action object.
- See Also:
- getKeyAction, removeKeyAction, removeKeyActionNamed
removeKeyAction
public synchronized void removeKeyAction(KeyAction keyAction)
- Removes the key action from the key binding of this text component.
- Parameters:
- keyAction - the key action object.
- See Also:
- getKeyAction, addKeyAction, removeKeyActionNamed
removeKeyActionNamed
public synchronized void removeKeyActionNamed(String actionName)
- Removes the key action named the specified name from the key binding
of this text component.
- Parameters:
- actionName - the name of the key action.
- See Also:
- getKeyAction, addKeyAction, removeKeyAction
performKeyAction
public void performKeyAction(String actionName)
- Performs the key action named the specified name.
- Parameters:
- actionName - the name of the key action.
- See Also:
- performKeyAction
performKeyAction
public synchronized void performKeyAction(String actionName,
char keyChar)
- Performs the key action named the specified name.
- Parameters:
- actionName - the name of the key action.
- keyChar - the key character for the key action.
- See Also:
- performKeyAction
isClickable
public boolean isClickable()
- Tests if this text component handles
ClickableTextAction
.
- See Also:
- setClickable, ClickableTextAction
setClickable
public void setClickable(boolean b)
- Makes this text component handle
ClickableTextAction
.
- See Also:
- isClickable, ClickableTextAction
isSoftTab
public boolean isSoftTab()
- Checks if this text component 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 text component.
- 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
getCurrentTextStyle
public TextStyle getCurrentTextStyle()
- Returns the current text style of this text component.
getTextStyleAt
public TextStyle getTextStyleAt(int index)
- Returns the text style at the specified index in this text component.
- Returns:
- the text style at the specified index, or
null
if the index is out of range.
getTextStyleCount
public int getTextStyleCount()
- Returns the number of the text styles in the text of this text component.
getTextStyles
public TextStyle[] getTextStyles()
- Returns all text styles in the text of this text component.
getTextStyles
public TextStyle[] getTextStyles(int begin,
int end)
- Returns the text styles in the text of this text component.
- Parameters:
- begin - the beginning index to get text styles, inclusive.
- end - the ending index to get text styles, exclusive.
textStyles
public Enumeration textStyles()
- Returns an enumeration of the text styles of the text of this text
component.
textStyles
public Enumeration textStyles(int begin,
int end)
- Returns an enumeration of the text styles of the text of this text
component.
- Parameters:
- begin - the beginning index to get styles, inclusive.
- end - the ending index to get styles, exclusive.
getParagraphStyleAt
public ParagraphStyle getParagraphStyleAt(int index)
- Returns the paragraph style at the specified index in this text
component.
- Returns:
- the paragraph style at the specified index, or
null
if the index is out of range.
getParagraphStyleCount
public int getParagraphStyleCount()
- Returns the number of the paragraph styles in the text of this text
component.
getParagraphStyles
public ParagraphStyle[] getParagraphStyles()
- Returns all paragraph styles in the text of this text component.
getParagraphStyles
public ParagraphStyle[] getParagraphStyles(int begin,
int end)
- Returns the paragraph styles in the text of this text component.
- Parameters:
- begin - the beginning index of the text to get paragraph styles,
inclusive.
- end - the ending index of the text to get paragraph styles,
exclusive.
paragraphStyles
public Enumeration paragraphStyles()
- Returns an enumeration of the paragraph styles of the text of this
text component.
paragraphStyles
public Enumeration paragraphStyles(int begin,
int end)
- Returns an enumeration of the paragraph styles of the text of this
text component.
- Parameters:
- begin - the beginning index to get styles, inclusive.
- end - the ending index to get styles, exclusive.
getTEXT
public Text getTEXT()
- Returns the text of this text component.
- See Also:
- setTEXT
setTEXT
public synchronized void setTEXT(Text text)
- Sets the text of this text component.
- See Also:
- getTEXT
getSelectedTEXT
public Text getSelectedTEXT()
- Returns the selected text from this text component.
select
public void select(int selectionStart,
int selectionEnd,
boolean scroll)
- Selects the text between the specified start and end positions.
- Parameters:
- selectionStart - the start position of the text to select.
- selectionEnd - the end position of the text to select.
- scroll - if true, scrolls the view after selection done.
- See Also:
- select
select
public synchronized void select(int selectionStart,
int selectionEnd,
boolean scroll,
boolean top)
- Selects the text between the specified start and end positions.
- Parameters:
- selectionStart - the start position of the text to select.
- selectionEnd - the end position of the text to select.
- scroll - if true, scrolls the view after selection done.
- top - if true, scrolls to the top of the view.
- See Also:
- select, select
setCaretPosition
public void setCaretPosition(int position,
boolean top)
- Sets the position of the text insertion caret.
- Parameters:
- position - the position of the caret.
- top - if true, scrolls to the top of the view.
- See Also:
- setCaretPosition
insert
public void insert(Text text,
int pos)
- Inserts the specified text at the specified position in this text
component.
- Parameters:
- text - the text to insert.
- pos - the position at which to insert.
- See Also:
- insert
insert
public void insert(Text text,
int pos,
boolean scroll)
- Inserts the specified text at the specified position in this text
component.
- Parameters:
- text - the text to insert.
- pos - the position at which to insert.
- scroll - if true, scrolls the view after the insertion.
- See Also:
- insert, replaceRange
append
public void append(Text text)
- Appends the given text to the current text.
- Parameters:
- text - the text to append.
- See Also:
- append
append
public void append(Text text,
boolean scroll)
- Appends the given text to the current text.
- Parameters:
- text - the text to append.
- scroll - if true, scrolls the view after the appending.
- See Also:
- insert
replaceRange
public void replaceRange(Text text,
int start,
int end)
- Replaces text between the indicated start and end positions
with the specified replacement text.
- Parameters:
- text - the text to use as the replacement.
- start - the start position, inclusive.
- end - the end position, exclusive.
- See Also:
- replaceRange
replaceRange
public void replaceRange(Text text,
int start,
int end,
boolean scroll)
- Replaces text between the indicated start and end positions
with the specified replacement text.
- Parameters:
- text - the text to use as the replacement.
- start - the start position, inclusive.
- end - the end position, exclusive.
- scroll - if true, scrolls the view after replace done.
- See Also:
- replaceRange, replaceRange, replaceSelection
replaceSelection
public void replaceSelection(String str)
- Replaces string in the range of the current selection with the
specified replacement string.
- Parameters:
- str - the string to use as the replacement.
- See Also:
- replaceSelection
replaceSelection
public void replaceSelection(Text text)
- Replaces text in the range of the current selection with the
specified replacement text.
- Parameters:
- text - the text to use as the replacement.
- See Also:
- replaceSelection
replaceSelection
public void replaceSelection(Text text,
boolean scroll)
- Replaces text in the range of the current selection with the
specified replacement text.
- Parameters:
- text - the text to use as the replacement.
- scroll - if true, scrolls the view after replace done.
- See Also:
- replaceSelection, replaceSelection, replaceRange
setRangeTextStyle
public void setRangeTextStyle(TextStyle style,
int start,
int end)
- Sets the text style between the indicated start and end positions
to the specified text style.
- Parameters:
- style - the text style to be set.
- start - the start position, inclusive.
- end - the end position, exclusive.
- See Also:
- setRangeTextStyle
setRangeTextStyle
public void setRangeTextStyle(TextStyle style,
int start,
int end,
boolean scroll)
- Sets the text style between the indicated start and end positions
to the specified text style.
- Parameters:
- style - the text style to be set.
- start - the start position, inclusive.
- end - the end position, exclusive.
- scroll - if true, scrolls the view after set done.
- See Also:
- setRangeTextStyle, setSelectionTextStyle
setSelectionTextStyle
public void setSelectionTextStyle(TextStyle style)
- Sets the text style in the range of the current selection to the
specified text style.
- Parameters:
- style - the text style to be set.
- See Also:
- setSelectionTextStyle
setSelectionTextStyle
public void setSelectionTextStyle(TextStyle style,
boolean scroll)
- Sets the text style in the range of the current selection to the
specified text style.
- Parameters:
- style - the text style to be set.
- scroll - if true, scrolls the view after set done.
- See Also:
- setSelectionTextStyle, setRangeTextStyle
modifyRangeTextStyle
public void modifyRangeTextStyle(TextStyleModifier modifier,
int start,
int end)
- Modifies the text style between the indicated start and end positions
by the specified text style modifier.
- Parameters:
- modifier - the text style modifier.
- start - the start position, inclusive.
- end - the end position, exclusive.
- See Also:
- modifyRangeTextStyle
modifyRangeTextStyle
public void modifyRangeTextStyle(TextStyleModifier modifier,
int start,
int end,
boolean scroll)
- Modifies the text style between the indicated start and end positions
by the specified text style modifier.
- Parameters:
- modifier - the text style modifier.
- start - the start position, inclusive.
- end - the end position, exclusive.
- scroll - if true, scrolls the view after set done.
- See Also:
- modifyRangeTextStyle, modifySelectionTextStyle
modifySelectionTextStyle
public void modifySelectionTextStyle(TextStyleModifier modifier)
- Modifies the text style in the range of the current selection by the
specified text style modifier.
- Parameters:
- modifier - the text style modifier.
- See Also:
- modifySelectionTextStyle
modifySelectionTextStyle
public void modifySelectionTextStyle(TextStyleModifier modifier,
boolean scroll)
- Modifies the text style in the range of the current selection by the
specified text style modifier.
- Parameters:
- modifier - the text style modifier.
- scroll - if true, scrolls the view after set done.
- See Also:
- modifySelectionTextStyle, modifyRangeTextStyle
setRangeParagraphStyle
public void setRangeParagraphStyle(ParagraphStyle style,
int start,
int end)
- Sets the paragraph style between the indicated start and end positions
to the specified paragraph style.
- Parameters:
- style - the paragraph style to be set.
- start - the start position, inclusive.
- end - the end position, exclusive.
- See Also:
- setRangeParagraphStyle
setRangeParagraphStyle
public void setRangeParagraphStyle(ParagraphStyle style,
int start,
int end,
boolean scroll)
- Sets the paragraph style between the indicated start and end positions
to the specified paragraph style.
- Parameters:
- style - the paragraph style to be set.
- start - the start position, inclusive.
- end - the end position, exclusive.
- scroll - if true, scrolls the view after set done.
- See Also:
- setRangeParagraphStyle, setSelectionParagraphStyle
setSelectionParagraphStyle
public void setSelectionParagraphStyle(ParagraphStyle style)
- Sets the paragraph style in the range of the current selection to the
specified paragraph style.
- Parameters:
- style - the paragraph style to be set.
- See Also:
- setSelectionParagraphStyle
setSelectionParagraphStyle
public void setSelectionParagraphStyle(ParagraphStyle style,
boolean scroll)
- Sets the paragraph style in the range of the current selection to the
specified paragraph style.
- Parameters:
- style - the paragraph style to be set.
- scroll - if true, scrolls the view after set done.
- See Also:
- setSelectionParagraphStyle, setRangeParagraphStyle
modifyRangeParagraphStyle
public void modifyRangeParagraphStyle(ParagraphStyleModifier modifier,
int start,
int end)
- Modifies the paragraph style between the indicated start and end
positions by the specified paragraph style modifier.
- Parameters:
- modifier - the paragraph style modifier.
- start - the start position, inclusive.
- end - the end position, exclusive.
- See Also:
- modifyRangeParagraphStyle
modifyRangeParagraphStyle
public void modifyRangeParagraphStyle(ParagraphStyleModifier modifier,
int start,
int end,
boolean scroll)
- Modifies the paragraph style between the indicated start and end
positions by the specified paragraph style modifier.
- Parameters:
- modifier - the paragraph style modifier.
- start - the start position, inclusive.
- end - the end position, exclusive.
- scroll - if true, scrolls the view after set done.
- See Also:
- modifyRangeParagraphStyle, modifySelectionParagraphStyle
modifySelectionParagraphStyle
public void modifySelectionParagraphStyle(ParagraphStyleModifier modifier)
- Modifies the paragraph style in the range of the current selection by
the specified paragraph style modifier.
- Parameters:
- modifier - the paragraph style modifier.
- See Also:
- modifySelectionParagraphStyle
modifySelectionParagraphStyle
public void modifySelectionParagraphStyle(ParagraphStyleModifier modifier,
boolean scroll)
- Modifies the paragraph style in the range of the current selection by
the specified paragraph style modifier.
- Parameters:
- modifier - the paragraph style modifier.
- scroll - if true, scrolls the view after set done.
- See Also:
- modifySelectionParagraphStyle, modifyRangeParagraphStyle
getScrollbarThickness
public int getScrollbarThickness()
- Returns the thickness of the scroll bar.
- See Also:
- setScrollbarThickness
setScrollbarThickness
public synchronized void setScrollbarThickness(int thickness)
- Sets the thickness of the scroll bar.
- See Also:
- setScrollbarThickness
print
public void print(boolean printPageNum)
- Prints the text of this text component with the specified flag
determining to print a page number in footer.
- Parameters:
- printPageNum - if true, prints a page number in footer.
print
public void print(String header,
boolean printPageNum)
- Prints the text of this text component with the specified header
string and flag determining to print a page number in footer.
- Parameters:
- header - the header string.
- printPageNum - if true, prints a page number in footer.
print
public void print(Insets insets,
String header,
boolean printPageNum)
- Prints the text of this text component with the specified insets,
header string, and flag determining to print a page number in footer.
- Parameters:
- insets - the insets of a printing medium (paper).
- header - the header string.
- printPageNum - if true, prints a page number in footer.
print
public void print(PrintJob job,
String header,
boolean printPageNum)
- Prints the text of this text component to a print device provided from
the specified print job, with the specified header string and flag
determining to print a page number in footer.
- Parameters:
- job - the print job.
- header - the header string.
- printPageNum - if true, prints a page number in footer.
print
public synchronized void print(PrintJob job,
Insets insets,
String header,
boolean printPageNum)
- Prints the text of this text component to a print device provided from
the specified print job, with the specified insets, header string, and
flag determining to print a page number in footer.
- Parameters:
- job - the print job.
- insets - the insets of a printing medium (paper).
- header - the header string.
- printPageNum - if true, prints a page number in footer.
isAutoIndentEnabled
public boolean isAutoIndentEnabled()
- Checks if the auto indent is enabled.
setAutoIndentEnabled
public void setAutoIndentEnabled(boolean autoIndent)
- Enables the auto indent.
isShowMatchEnabled
public boolean isShowMatchEnabled()
- Checks if the show match is enabled.
setShowMatchEnabled
public void setShowMatchEnabled(boolean showMatch)
- Enables the show match.
clearUndo
public void clearUndo()
- Clears the undo of the last change.
copy_clipboard
public void copy_clipboard()
- Copies the current selection to the clipboard.
cut_clipboard
public void cut_clipboard()
- Cuts the current selection to the clipboard.
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.
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.
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.
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.
delete_selection
public void delete_selection()
- Deletes the current 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.
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.
deselect_all
public void deselect_all()
- Deselects the current selection.
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.
find_word
public void find_word()
- Finds the word and move the insertion cursor to the founded word.
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.
insert_character
public void insert_character(char c)
- If the cursor is inside the selection, deletes the entire selection.
Inserts character at the insertion cursor.
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.
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.
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.
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.
kill_selection
public void kill_selection()
- Kills the currently selected text and stores the text in the cut buffer.
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.
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.
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.
paste_clipboard
public void paste_clipboard()
- Pastes the the clipboard before the insertion cursor.
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.
select_all
public void select_all()
- Select all text.
select_line
public void select_line()
- Select a line at the selection start position.
select_word
public void select_word()
- Select a word at the selection start position.
tab
public void tab()
- If the cursor is inside the selection, deletes the entire selection.
Inserts the soft tab.
undo
public void undo()
- Undo the last change.
unkill
public void unkill()
- Restores last killed text to the position of the insertion cursor.
All Packages Class Hierarchy This Package Previous Next Index