All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.editor.DocumentEditor

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.EventProxyContainer
                                   |
                                   +----jp.kyasu.awt.TextComponent
                                           |
                                           +----jp.kyasu.editor.TextEditor
                                                   |
                                                   +----jp.kyasu.editor.RichTextEditor
                                                           |
                                                           +----jp.kyasu.editor.DocumentEditor

public class DocumentEditor
extends RichTextEditor
A DocumentEditor object is a multi-line area that displays text. It is suited for editing styled documents. It is created with tool bar.

Version:
19 Jun 1998
Author:
Kazuki YASUMATSU

Variable Index

 o A_LIST
 o A_SAVE_AS_OBJECT
 o A_SAVE_AS_TEXT
 o A_UNLIST

Constructor Index

 o DocumentEditor()
Constructs a new rich text area with tool bar.
 o DocumentEditor(boolean)
Constructs a new rich text area with tool bar.
 o DocumentEditor(int, int)
Constructs a new rich text area with tool bar, with the specified number of rows and columns.
 o DocumentEditor(int, int, boolean)
Constructs a new rich text area with tool bar, with the specified number of rows and columns.
 o DocumentEditor(int, int, boolean, ActionListener, ActionListener, ActionListener)
Constructs a new rich text area with tool bar, with the specified number of rows and columns.

Method Index

 o actionPerformed(ActionEvent)
Invoked when an action occurs.
 o clear_list()
Clears the selected paragraph as a list.
 o decrease_indent()
Decreases the selected paragraph indentation.
 o increase_indent()
Increases the selected paragraph indentation.
 o loadAsObject(InputStream)
Loads the contents of the specified stream as object into this component.
 o main(String[])
Executes the examples.
 o make_font_large()
Makes the selected text large.
 o make_font_small()
Makes the selected text small.
 o make_list()
Makes the selected paragraph as a list.
 o open_file(File)
Opens the specified file.
 o save_file_as(boolean)
Saves the text into the selected file.
 o save_file_as(File)
Saves the text into the specified file.
 o save_file_as(File, boolean)
Saves the text into the specified file.
 o saveAsObject(OutputStream)
Saves the contents of this component as object into the specified stream.
 o textPositionChanged(TextPositionEvent)
Invoked when the position of the text has changed.

Variables

 o A_SAVE_AS_TEXT
 public static final String A_SAVE_AS_TEXT
 o A_SAVE_AS_OBJECT
 public static final String A_SAVE_AS_OBJECT
 o A_LIST
 public static final String A_LIST
 o A_UNLIST
 public static final String A_UNLIST

Constructors

 o DocumentEditor
 public DocumentEditor()
Constructs a new rich text area with tool bar. This rich text area is created with vertical scroll bar.

 o DocumentEditor
 public DocumentEditor(boolean showToolBar)
Constructs a new rich text area with tool bar. If showToolBar is true, then shows the tool bar initially; otherwise hides. This rich text area is created with vertical scroll bar.

Parameters:
showToolBar - if true, then shows the tool bar initially; otherwise hides.
 o DocumentEditor
 public DocumentEditor(int rows,
                       int columns)
Constructs a new rich text area with tool bar, with the specified number of rows and columns. This rich text area is created with vertical scroll bar.

Parameters:
rows - the number of rows
columns - the number of columns.
 o DocumentEditor
 public DocumentEditor(int rows,
                       int columns,
                       boolean showToolBar)
Constructs a new rich text area with tool bar, with the specified number of rows and columns. If showToolBar is true, then shows the tool bar initially; otherwise hidden. This rich text area is created with vertical scroll bar.

Parameters:
rows - the number of rows
columns - the number of columns.
showToolBar - if true, then shows the tool bar initially; otherwise hides.
 o DocumentEditor
 public DocumentEditor(int rows,
                       int columns,
                       boolean showToolBar,
                       ActionListener openActionListener,
                       ActionListener saveActionListener,
                       ActionListener printActionListener)
Constructs a new rich text area with tool bar, with the specified number of rows and columns. If showToolBar is true, then shows the tool bar initially; otherwise hidden. This rich text area is created with vertical scroll bar.

Parameters:
rows - the number of rows
columns - the number of columns.
showToolBar - if true, then shows the tool bar initially; otherwise hides.
openActionListener - the action listener that receives action events from the open button in tool bar.
saveActionListener - the action listener that receives action events from the save button in tool bar.
printActionListener - the action listener that receives action events from the print button in tool bar.

Methods

 o make_font_large
 public void make_font_large()
Makes the selected text large.

Overrides:
make_font_large in class RichTextEditor
 o make_font_small
 public void make_font_small()
Makes the selected text small.

Overrides:
make_font_small in class RichTextEditor
 o make_list
 public void make_list()
Makes the selected paragraph as a list.

 o clear_list
 public void clear_list()
Clears the selected paragraph as a list.

 o increase_indent
 public void increase_indent()
Increases the selected paragraph indentation.

 o decrease_indent
 public void decrease_indent()
Decreases the selected paragraph indentation.

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

Overrides:
actionPerformed in class RichTextEditor
See Also:
ActionListener
 o textPositionChanged
 public void textPositionChanged(TextPositionEvent te)
Invoked when the position of the text has changed.

Overrides:
textPositionChanged in class TextEditor
See Also:
TextPositionListener
 o open_file
 public void open_file(File file)
Opens the specified file.

Overrides:
open_file in class TextEditor
 o save_file_as
 public void save_file_as(File file)
Saves the text into the specified file.

Overrides:
save_file_as in class TextEditor
 o save_file_as
 public void save_file_as(boolean serialize)
Saves the text into the selected file.

Parameters:
serialize - if true, saves the text as an object.
 o save_file_as
 public void save_file_as(File file,
                          boolean serialize)
Saves the text into the specified file.

Parameters:
file - the file to store into.
serialize - if true, saves the text as an object.
 o loadAsObject
 public boolean loadAsObject(InputStream stream)
Loads the contents of the specified stream as object into this component.

Parameters:
stream - the stream to be loaded.
Returns:
true if the loading was succeeded.
 o saveAsObject
 public boolean saveAsObject(OutputStream stream)
Saves the contents of this component as object into the specified stream.

Parameters:
stream - the stream to save into.
Returns:
true if the saving was succeeded.
 o main
 public static void main(String args[])
Executes the examples.


All Packages  Class Hierarchy  This Package  Previous  Next  Index