public class DefaultTextEditModel extends DefaultTextModel implements TextEditModel
DefaultTextEditModel class is a default implementation
of the TextEditModel interface.| 修飾子とタイプ | クラスと説明 |
|---|---|
class |
DefaultTextEditModel.ParagraphStyleUndo
Undo for the paragraph style operations.
|
class |
DefaultTextEditModel.ReplaceUndo
Undo for the replace operations.
|
class |
DefaultTextEditModel.TextStyleUndo
Undo for the text style operations.
|
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.awt.event.TextListener |
textListener
The text listener of the text edit model.
|
protected static java.lang.String |
textListenerK
Internal constant for serialization
|
richText, textModelListeners| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
DefaultTextEditModel()
Constructor for subclasses.
|
|
DefaultTextEditModel(RichText richText)
Constructs a text edit model with the specified rich text.
|
|
DefaultTextEditModel(RichTextStyle richTextStyle)
Constructs an empty text edit model with the specified rich text style.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addTextListener(java.awt.event.TextListener listener)
Adds the specified text listener to receive text events from
this text edit model.
|
Undo |
modifyParagraphStyle(int begin,
int end,
ParagraphStyleModifier modifier) |
Undo |
modifyTextStyle(int begin,
int end,
TextStyleModifier modifier) |
protected void |
notifyTextListeners(java.awt.event.TextEvent event)
Notifies the specified text event to the text listeners.
|
void |
removeTextListener(java.awt.event.TextListener listener)
Removes the specified text listener so it no longer receives
text events from this text edit model.
|
protected Undo |
replace(int begin,
int end,
RichText rep)
Replaces the specified range of the rich text of this text edit
model with the specified replacement rich text object.
|
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.
|
Undo |
setParagraphStyle(int begin,
int end,
ParagraphStyle pStyle) |
Undo |
setParagraphStyles(int begin,
int end,
ParagraphStyle[] pStyles) |
void |
setRichText(RichText richText)
Sets the rich text of this text model to be the specified rich text.
|
Undo |
setTextStyle(int begin,
int end,
TextStyle textStyle) |
protected Undo |
setTextStyles(int begin,
int end,
RunArray textStyles) |
addTextModelListener, getRichText, notifyTextModelListeners, removeTextModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTextModelListener, getRichText, removeTextModelListenerprotected transient java.awt.event.TextListener textListener
protected static final java.lang.String textListenerK
public DefaultTextEditModel(RichTextStyle richTextStyle)
richTextStyle - the rich text style.public DefaultTextEditModel(RichText richText)
richText - the rich text.protected DefaultTextEditModel()
public void setRichText(RichText richText)
setRichText インタフェース内 TextModelsetRichText クラス内 DefaultTextModelrichText - the rich text.public void addTextListener(java.awt.event.TextListener listener)
addTextListener インタフェース内 TextEditModellistener - the text listener.public void removeTextListener(java.awt.event.TextListener listener)
removeTextListener インタフェース内 TextEditModellistener - the text listener.protected void notifyTextListeners(java.awt.event.TextEvent event)
public Undo replace(int begin, int end, Text rep)
replace インタフェース内 TextEditModelbegin - the beginning text position to replace, inclusive.end - the ending text position to replace, exclusive.rep - a replacement Text object.null if
the undo is not supported.public Undo setTextStyle(int begin, int end, TextStyle textStyle)
setTextStyle インタフェース内 TextEditModelpublic Undo modifyTextStyle(int begin, int end, TextStyleModifier modifier)
modifyTextStyle インタフェース内 TextEditModelpublic Undo setParagraphStyle(int begin, int end, ParagraphStyle pStyle)
setParagraphStyle インタフェース内 TextEditModelpublic Undo modifyParagraphStyle(int begin, int end, ParagraphStyleModifier modifier)
modifyParagraphStyle インタフェース内 TextEditModelprotected Undo replace(int begin, int end, RichText rep)
begin - the beginning text position to replace, inclusive.end - the ending text position to replace, exclusive.rep - a replacement RichText object.null if
the undo is not supported.public Undo setParagraphStyles(int begin, int end, ParagraphStyle[] pStyles)