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
-
DEFAULT_CURSOR
- The default cursor.
-
TextEditView(TextEditModel)
- Constructs a text edit view with the specified text edit model.
-
addNotify()
- Notifies this view that it has been added to a container.
-
addTextPositionListener(TextPositionListener)
- Add a listener to recieve text position events when the selection
of the text view changes.
-
getCaretColor()
- Returns the caret color.
-
getController()
- Returns the controller of this view.
-
getModel()
- Returns the model of this view.
-
getRichText()
- Returns the
RichText
object being viewed.
-
getSelectedText()
- Returns the selected text.
-
getSelectionBegin()
- Returns the beginning text position of the selection, inclusive.
-
getSelectionEnd()
- Returns the ending text position of the selection, exclusive.
-
getTextCaret()
- Returns the text caret of this view.
-
isEditable()
- Tests if this view is editable.
-
paint(Graphics)
- Paints this component.
-
removeNotify()
- Notifies this view that it has been removed from its container.
-
removeTextPositionListener(TextPositionListener)
- Removes an text position listener.
-
selectionIsCaret()
- Tests if the selection is caret, i.e., null selection.
-
setCaretColor(Color)
- Sets the caret color.
-
setController(TextEditController)
- Sets the controller of this view.
-
setEditable(boolean)
- Makes this view editable.
-
setEnabled(boolean)
- Enables or disables this view.
-
setFont(Font)
- Sets the font of this view.
-
setRichText(RichText)
- Sets the
RichText
object of this view.
-
setText(Text)
- Sets the
Text
object of this view.
-
setTextCaret(TextCaret)
- Sets the text caret of this view.
-
textModelChanged(TextModelEvent)
- Invoked when the text model has been changed.
DEFAULT_CURSOR
public static final Cursor DEFAULT_CURSOR
- The default cursor.
TextEditView
public TextEditView(TextEditModel textEditModel)
- Constructs a text edit view with the specified text edit model.
- Parameters:
- textEditModel - the text edit model.
getRichText
public RichText getRichText()
- Returns the
RichText
object being viewed.
- Overrides:
- getRichText in class TextView
getModel
public TextEditModel getModel()
- Returns the model of this view.
getController
public TextEditController getController()
- Returns the controller of this view.
setController
public synchronized void setController(TextEditController controller)
- Sets the controller of this view.
textModelChanged
public void textModelChanged(TextModelEvent event)
- Invoked when the text model has been changed.
- See Also:
- TextModelListener
setText
public void setText(Text text)
- Sets the
Text
object of this view.
- Parameters:
- text - the
Text
object.
setRichText
public void setRichText(RichText richText)
- Sets the
RichText
object of this view.
- Parameters:
- richText - the
RichText
object.
getSelectionBegin
public TextPositionInfo getSelectionBegin()
- Returns the beginning text position of the selection, inclusive.
getSelectionEnd
public TextPositionInfo getSelectionEnd()
- Returns the ending text position of the selection, exclusive.
isEditable
public boolean isEditable()
- Tests if this view is editable.
setEditable
public void setEditable(boolean b)
- Makes this view editable.
setEnabled
public synchronized void setEnabled(boolean b)
- Enables or disables this view.
- Overrides:
- setEnabled in class KComponent
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 view.
- See Also:
- setTextCaret
setTextCaret
public synchronized void setTextCaret(TextCaret textCaret)
- Sets the text caret of this view.
- See Also:
- getTextCaret
getSelectedText
public Text getSelectedText()
- Returns the selected text.
addNotify
public void addNotify()
- Notifies this view that it has been added to a container.
- Overrides:
- addNotify in class KComponent
removeNotify
public void removeNotify()
- Notifies this view that it has been removed from its container.
- Overrides:
- removeNotify in class Component
setFont
public void setFont(Font f)
- Sets the font of this view.
- Overrides:
- setFont in class Component
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.
removeTextPositionListener
public void removeTextPositionListener(TextPositionListener l)
- Removes an text position listener.
- Parameters:
- l - the listener being removed.
paint
public void paint(Graphics g)
- Paints this component.
- Overrides:
- paint in class KComponent
selectionIsCaret
public boolean selectionIsCaret()
- Tests if the selection is caret, i.e., null selection.
All Packages Class Hierarchy This Package Previous Next Index