All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.text.TextEditView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----jp.kyasu.awt.KComponent
                   |
                   +----jp.kyasu.awt.text.TextView
                           |
                           +----jp.kyasu.awt.text.TextEditView

public class TextEditView
extends TextView
implements TextModelListener
The TextEditView class implements a view of a MVC model for the text editing. The model of the MVC model is a TextEditModel object and the controller of the MVC model is a TextEditController object.

Version:
12 Dec 1998
Author:
Kazuki YASUMATSU
See Also:
TextEditModel, TextEditController

Variable Index

 o DEFAULT_CURSOR
The default cursor.

Constructor Index

 o TextEditView(TextEditModel)
Constructs a text edit view with the specified text edit model.

Method Index

 o addNotify()
Notifies this view that it has been added to a container.
 o addTextPositionListener(TextPositionListener)
Add a listener to recieve text position events when the selection of the text view changes.
 o getCaretColor()
Returns the caret color.
 o getController()
Returns the controller of this view.
 o getModel()
Returns the model of this view.
 o getRichText()
Returns the RichText object being viewed.
 o getSelectedText()
Returns the selected text.
 o getSelectionBegin()
Returns the beginning text position of the selection, inclusive.
 o getSelectionEnd()
Returns the ending text position of the selection, exclusive.
 o getTextCaret()
Returns the text caret of this view.
 o isEditable()
Tests if this view is editable.
 o paint(Graphics)
Paints this component.
 o removeNotify()
Notifies this view that it has been removed from its container.
 o removeTextPositionListener(TextPositionListener)
Removes an text position listener.
 o selectionIsCaret()
Tests if the selection is caret, i.e., null selection.
 o setCaretColor(Color)
Sets the caret color.
 o setController(TextEditController)
Sets the controller of this view.
 o setEditable(boolean)
Makes this view editable.
 o setEnabled(boolean)
Enables or disables this view.
 o setFont(Font)
Sets the font of this view.
 o setRichText(RichText)
Sets the RichText object of this view.
 o setText(Text)
Sets the Text object of this view.
 o setTextCaret(TextCaret)
Sets the text caret of this view.
 o textModelChanged(TextModelEvent)
Invoked when the text model has been changed.

Variables

 o DEFAULT_CURSOR
 public static final Cursor DEFAULT_CURSOR
The default cursor.

Constructors

 o TextEditView
 public TextEditView(TextEditModel textEditModel)
Constructs a text edit view with the specified text edit model.

Parameters:
textEditModel - the text edit model.

Methods

 o getRichText
 public RichText getRichText()
Returns the RichText object being viewed.

Overrides:
getRichText in class TextView
 o getModel
 public TextEditModel getModel()
Returns the model of this view.

 o getController
 public TextEditController getController()
Returns the controller of this view.

 o setController
 public synchronized void setController(TextEditController controller)
Sets the controller of this view.

 o textModelChanged
 public void textModelChanged(TextModelEvent event)
Invoked when the text model has been changed.

See Also:
TextModelListener
 o setText
 public void setText(Text text)
Sets the Text object of this view.

Parameters:
text - the Text object.
 o setRichText
 public void setRichText(RichText richText)
Sets the RichText object of this view.

Parameters:
richText - the RichText object.
 o getSelectionBegin
 public TextPositionInfo getSelectionBegin()
Returns the beginning text position of the selection, inclusive.

 o getSelectionEnd
 public TextPositionInfo getSelectionEnd()
Returns the ending text position of the selection, exclusive.

 o isEditable
 public boolean isEditable()
Tests if this view is editable.

 o setEditable
 public void setEditable(boolean b)
Makes this view editable.

 o setEnabled
 public synchronized void setEnabled(boolean b)
Enables or disables this view.

Overrides:
setEnabled in class KComponent
 o getCaretColor
 public Color getCaretColor()
Returns the caret color.

See Also:
setCaretColor
 o setCaretColor
 public synchronized void setCaretColor(Color c)
Sets the caret color.

See Also:
getCaretColor
 o getTextCaret
 public TextCaret getTextCaret()
Returns the text caret of this view.

See Also:
setTextCaret
 o setTextCaret
 public synchronized void setTextCaret(TextCaret textCaret)
Sets the text caret of this view.

See Also:
getTextCaret
 o getSelectedText
 public Text getSelectedText()
Returns the selected text.

 o addNotify
 public void addNotify()
Notifies this view that it has been added to a container.

Overrides:
addNotify in class KComponent
 o removeNotify
 public void removeNotify()
Notifies this view that it has been removed from its container.

Overrides:
removeNotify in class Component
 o setFont
 public void setFont(Font f)
Sets the font of this view.

Overrides:
setFont in class Component
 o addTextPositionListener
 public void addTextPositionListener(TextPositionListener l)
Add a listener to recieve text position events when the selection of the text view changes.

Parameters:
l - the listener to recieve events.
 o removeTextPositionListener
 public void removeTextPositionListener(TextPositionListener l)
Removes an text position listener.

Parameters:
l - the listener being removed.
 o paint
 public void paint(Graphics g)
Paints this component.

Overrides:
paint in class KComponent
 o selectionIsCaret
 public boolean selectionIsCaret()
Tests if the selection is caret, i.e., null selection.


All Packages  Class Hierarchy  This Package  Previous  Next  Index