All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.DefaultTextEditModel
java.lang.Object
|
+----jp.kyasu.awt.DefaultTextModel
|
+----jp.kyasu.awt.DefaultTextEditModel
- public class DefaultTextEditModel
- extends DefaultTextModel
- implements TextEditModel
The DefaultTextEditModel
class is a default implementation
of the TextEditModel
interface.
- Version:
- 11 Jun 1998
- Author:
- Kazuki YASUMATSU
-
DefaultTextEditModel(RichText)
- Constructs a text edit model with the specified rich text.
-
DefaultTextEditModel(RichTextStyle)
- Constructs an empty text edit model with the specified rich text style.
-
addTextListener(TextListener)
- Adds the specified text listener to receive text events from
this text edit model.
-
modifyParagraphStyle(int, int, ParagraphStyleModifier)
-
-
modifyTextStyle(int, int, TextStyleModifier)
-
-
removeTextListener(TextListener)
- Removes the specified text listener so it no longer receives
text events from this text edit model.
-
replace(int, int, Text)
- Replaces the specified range of the rich text of this text edit
model with the specified replacement text object.
-
setParagraphStyle(int, int, ParagraphStyle)
-
-
setParagraphStyles(int, int, ParagraphStyle[])
-
-
setRichText(RichText)
- Sets the rich text of this text model to be the specified rich text.
-
setTextStyle(int, int, TextStyle)
-
DefaultTextEditModel
public DefaultTextEditModel(RichTextStyle richTextStyle)
- Constructs an empty text edit model with the specified rich text style.
- Parameters:
- richTextStyle - the rich text style.
DefaultTextEditModel
public DefaultTextEditModel(RichText richText)
- Constructs a text edit model with the specified rich text.
- Parameters:
- richText - the rich text.
setRichText
public void setRichText(RichText richText)
- Sets the rich text of this text model to be the specified rich text.
- Parameters:
- richText - the rich text.
- Overrides:
- setRichText in class DefaultTextModel
addTextListener
public void addTextListener(TextListener listener)
- Adds the specified text listener to receive text events from
this text edit model.
- Parameters:
- listener - the text listener.
removeTextListener
public void removeTextListener(TextListener listener)
- Removes the specified text listener so it no longer receives
text events from this text edit model.
- Parameters:
- listener - the text listener.
replace
public synchronized Undo replace(int begin,
int end,
Text rep)
- Replaces the specified range of the rich text of this text edit
model with the specified replacement text object.
- Parameters:
- begin - the beginning text position to replace, inclusive.
- end - the ending text position to replace, exclusive.
- rep - a replacement
Text
object.
- Returns:
- the undo object for this operation, or
null
if
the undo is not supported.
setTextStyle
public synchronized Undo setTextStyle(int begin,
int end,
TextStyle textStyle)
modifyTextStyle
public synchronized Undo modifyTextStyle(int begin,
int end,
TextStyleModifier modifier)
setParagraphStyle
public synchronized Undo setParagraphStyle(int begin,
int end,
ParagraphStyle pStyle)
modifyParagraphStyle
public synchronized Undo modifyParagraphStyle(int begin,
int end,
ParagraphStyleModifier modifier)
setParagraphStyles
public synchronized Undo setParagraphStyles(int begin,
int end,
ParagraphStyle pStyles[])
All Packages Class Hierarchy This Package Previous Next Index