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

Constructor Index

 o DefaultTextEditModel(RichText)
Constructs a text edit model with the specified rich text.
 o DefaultTextEditModel(RichTextStyle)
Constructs an empty text edit model with the specified rich text style.

Method Index

 o addTextListener(TextListener)
Adds the specified text listener to receive text events from this text edit model.
 o modifyParagraphStyle(int, int, ParagraphStyleModifier)
 o modifyTextStyle(int, int, TextStyleModifier)
 o removeTextListener(TextListener)
Removes the specified text listener so it no longer receives text events from this text edit model.
 o replace(int, int, Text)
Replaces the specified range of the rich text of this text edit model with the specified replacement text object.
 o setParagraphStyle(int, int, ParagraphStyle)
 o setParagraphStyles(int, int, ParagraphStyle[])
 o setRichText(RichText)
Sets the rich text of this text model to be the specified rich text.
 o setTextStyle(int, int, TextStyle)

Constructors

 o DefaultTextEditModel
 public DefaultTextEditModel(RichTextStyle richTextStyle)
Constructs an empty text edit model with the specified rich text style.

Parameters:
richTextStyle - the rich text style.
 o DefaultTextEditModel
 public DefaultTextEditModel(RichText richText)
Constructs a text edit model with the specified rich text.

Parameters:
richText - the rich text.

Methods

 o 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
 o 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.
 o 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.
 o 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.
 o setTextStyle
 public synchronized Undo setTextStyle(int begin,
                                       int end,
                                       TextStyle textStyle)
 o modifyTextStyle
 public synchronized Undo modifyTextStyle(int begin,
                                          int end,
                                          TextStyleModifier modifier)
 o setParagraphStyle
 public synchronized Undo setParagraphStyle(int begin,
                                            int end,
                                            ParagraphStyle pStyle)
 o modifyParagraphStyle
 public synchronized Undo modifyParagraphStyle(int begin,
                                               int end,
                                               ParagraphStyleModifier modifier)
 o setParagraphStyles
 public synchronized Undo setParagraphStyles(int begin,
                                             int end,
                                             ParagraphStyle pStyles[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index