All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.editor.RichTextEditor

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

public abstract class RichTextEditor
extends TextEditor
The RichTextEditor is an abstract base class of multi-line text area that is suited for editing styled documents.

Version:
20 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
DocumentEditor, HTMLEditor

Variable Index

 o A_BOLD
 o A_CENTER
 o A_CLEAR_STYLE
 o A_DEC_INDENT
 o A_HR
 o A_IMAGE
 o A_INC_INDENT
 o A_ITALIC
 o A_LARGE
 o A_LEFT
 o A_RIGHT
 o A_SMALL
 o A_UNDERLINE
 o I_BOLD
 o I_ITALIC
 o I_UNDERLINE
 o L_ALIGN
 o L_FORMAT
 o L_INSERT
 o L_LIST

Constructor Index

 o RichTextEditor(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 align_to_center()
Sets the alignment of the selected paragraph to be centered.
 o align_to_left()
Sets the alignment of the selected paragraph to be left.
 o align_to_right()
Sets the alignment of the selected paragraph to be right.
 o clear_font_bold()
Clears the selected text bold.
 o clear_font_italic()
Clears the selected text italic.
 o clear_font_styles()
Clears the all styles of the selected text.
 o clear_font_underlined()
Clears the selected text underlined.
 o insert_hr()
Inserts a horizontal line.
 o insert_image()
Inserts an image.
 o itemStateChanged(ItemEvent)
Invoked when an item's state has been changed.
 o make_font_bold()
Makes the selected text bold.
 o make_font_bold(boolean)
Makes or clears the selected text bold.
 o make_font_italic()
Makes the selected text italic.
 o make_font_italic(boolean)
Makes or clears the selected text italic.
 o make_font_large()
Makes the selected text large.
 o make_font_small()
Makes the selected text small.
 o make_font_underlined()
Makes or clears the selected text underlined.
 o make_font_underlined(boolean)
Makes or clears the selected text underlined.
 o set_alignment(int)
Sets the alignment of the selected paragraph to be the specified style.
 o set_font_color(Color)
Sets the font color of the selected text to be the specified color.
 o set_font_color(ItemEvent)
Sets the font color of the selected text to be the selected color.
 o set_font_name(ItemEvent)
Sets the font name of the selected text to be the selected name.
 o set_font_name(String)
Sets the font name of the selected text to be the specified name.
 o set_font_size(int)
Sets the font size of the selected text to be the specified size.
 o set_font_size(ItemEvent)
Sets the font size of the selected text to be the selected size.
 o set_font_size_diff(int)
Sets the font size of the selected text differed from the specified size.

Variables

 o L_FORMAT
 public static final String L_FORMAT
 o L_INSERT
 public static final String L_INSERT
 o L_ALIGN
 public static final String L_ALIGN
 o L_LIST
 public static final String L_LIST
 o I_BOLD
 public static final String I_BOLD
 o I_ITALIC
 public static final String I_ITALIC
 o I_UNDERLINE
 public static final String I_UNDERLINE
 o A_BOLD
 public static final String A_BOLD
 o A_ITALIC
 public static final String A_ITALIC
 o A_UNDERLINE
 public static final String A_UNDERLINE
 o A_CLEAR_STYLE
 public static final String A_CLEAR_STYLE
 o A_LARGE
 public static final String A_LARGE
 o A_SMALL
 public static final String A_SMALL
 o A_LEFT
 public static final String A_LEFT
 o A_CENTER
 public static final String A_CENTER
 o A_RIGHT
 public static final String A_RIGHT
 o A_INC_INDENT
 public static final String A_INC_INDENT
 o A_DEC_INDENT
 public static final String A_DEC_INDENT
 o A_IMAGE
 public static final String A_IMAGE
 o A_HR
 public static final String A_HR

Constructors

 o RichTextEditor
 public RichTextEditor(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 set_font_name
 public void set_font_name(String name)
Sets the font name of the selected text to be the specified name.

 o set_font_name
 public void set_font_name(ItemEvent e)
Sets the font name of the selected text to be the selected name. Selected item must be a String.

 o set_font_size
 public void set_font_size(int size)
Sets the font size of the selected text to be the specified size.

 o set_font_size_diff
 public void set_font_size_diff(int size)
Sets the font size of the selected text differed from the specified size.

 o set_font_size
 public void set_font_size(ItemEvent e)
Sets the font size of the selected text to be the selected size. Selected item must be an Integer or a String such as "2", "+2", and "-2" .

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

 o make_font_small
 public abstract void make_font_small()
Makes the selected text small.

 o set_font_color
 public void set_font_color(Color color)
Sets the font color of the selected text to be the specified color.

 o set_font_color
 public void set_font_color(ItemEvent e)
Sets the font color of the selected text to be the selected color.

 o make_font_bold
 public void make_font_bold(boolean bold)
Makes or clears the selected text bold.

 o make_font_bold
 public void make_font_bold()
Makes the selected text bold.

 o clear_font_bold
 public void clear_font_bold()
Clears the selected text bold.

 o make_font_italic
 public void make_font_italic(boolean italic)
Makes or clears the selected text italic.

 o make_font_italic
 public void make_font_italic()
Makes the selected text italic.

 o clear_font_italic
 public void clear_font_italic()
Clears the selected text italic.

 o make_font_underlined
 public void make_font_underlined(boolean underline)
Makes or clears the selected text underlined.

 o make_font_underlined
 public void make_font_underlined()
Makes or clears the selected text underlined.

 o clear_font_underlined
 public void clear_font_underlined()
Clears the selected text underlined.

 o clear_font_styles
 public void clear_font_styles()
Clears the all styles of the selected text.

 o set_alignment
 public void set_alignment(int align)
Sets the alignment of the selected paragraph to be the specified style.

See Also:
LEFT, CENTER, RIGHT
 o align_to_left
 public void align_to_left()
Sets the alignment of the selected paragraph to be left.

 o align_to_center
 public void align_to_center()
Sets the alignment of the selected paragraph to be centered.

 o align_to_right
 public void align_to_right()
Sets the alignment of the selected paragraph to be right.

 o insert_hr
 public void insert_hr()
Inserts a horizontal line.

 o insert_image
 public void insert_image()
Inserts an image.

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

Overrides:
actionPerformed in class TextEditor
See Also:
ActionListener
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Invoked when an item's state has been changed.

Overrides:
itemStateChanged in class TextEditor
See Also:
ItemListener

All Packages  Class Hierarchy  This Package  Previous  Next  Index