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
-
A_LIST
-
-
A_SAVE_AS_OBJECT
-
-
A_SAVE_AS_TEXT
-
-
A_UNLIST
-
-
DocumentEditor()
- Constructs a new rich text area with tool bar.
-
DocumentEditor(boolean)
- Constructs a new rich text area with tool bar.
-
DocumentEditor(int, int)
- Constructs a new rich text area with tool bar, with the specified
number of rows and columns.
-
DocumentEditor(int, int, boolean)
- Constructs a new rich text area with tool bar, with the specified
number of rows and columns.
-
DocumentEditor(int, int, boolean, ActionListener, ActionListener, ActionListener)
- Constructs a new rich text area with tool bar, with the specified
number of rows and columns.
-
actionPerformed(ActionEvent)
- Invoked when an action occurs.
-
clear_list()
- Clears the selected paragraph as a list.
-
decrease_indent()
- Decreases the selected paragraph indentation.
-
increase_indent()
- Increases the selected paragraph indentation.
-
loadAsObject(InputStream)
- Loads the contents of the specified stream as object into
this component.
-
main(String[])
- Executes the examples.
-
make_font_large()
- Makes the selected text large.
-
make_font_small()
- Makes the selected text small.
-
make_list()
- Makes the selected paragraph as a list.
-
open_file(File)
- Opens the specified file.
-
save_file_as(boolean)
- Saves the text into the selected file.
-
save_file_as(File)
- Saves the text into the specified file.
-
save_file_as(File, boolean)
- Saves the text into the specified file.
-
saveAsObject(OutputStream)
- Saves the contents of this component as object into the
specified stream.
-
textPositionChanged(TextPositionEvent)
- Invoked when the position of the text has changed.
A_SAVE_AS_TEXT
public static final String A_SAVE_AS_TEXT
A_SAVE_AS_OBJECT
public static final String A_SAVE_AS_OBJECT
A_LIST
public static final String A_LIST
A_UNLIST
public static final String A_UNLIST
DocumentEditor
public DocumentEditor()
- Constructs a new rich text area with tool bar.
This rich text area is created with vertical scroll bar.
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.
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.
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.
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.
make_font_large
public void make_font_large()
- Makes the selected text large.
- Overrides:
- make_font_large in class RichTextEditor
make_font_small
public void make_font_small()
- Makes the selected text small.
- Overrides:
- make_font_small in class RichTextEditor
make_list
public void make_list()
- Makes the selected paragraph as a list.
clear_list
public void clear_list()
- Clears the selected paragraph as a list.
increase_indent
public void increase_indent()
- Increases the selected paragraph indentation.
decrease_indent
public void decrease_indent()
- Decreases the selected paragraph indentation.
actionPerformed
public void actionPerformed(ActionEvent e)
- Invoked when an action occurs.
- Overrides:
- actionPerformed in class RichTextEditor
- See Also:
- ActionListener
textPositionChanged
public void textPositionChanged(TextPositionEvent te)
- Invoked when the position of the text has changed.
- Overrides:
- textPositionChanged in class TextEditor
- See Also:
- TextPositionListener
open_file
public void open_file(File file)
- Opens the specified file.
- Overrides:
- open_file in class TextEditor
save_file_as
public void save_file_as(File file)
- Saves the text into the specified file.
- Overrides:
- save_file_as in class TextEditor
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.
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.
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.
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.
main
public static void main(String args[])
- Executes the examples.
All Packages Class Hierarchy This Package Previous Next Index