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
-
A_BOLD
-
-
A_CENTER
-
-
A_CLEAR_STYLE
-
-
A_DEC_INDENT
-
-
A_HR
-
-
A_IMAGE
-
-
A_INC_INDENT
-
-
A_ITALIC
-
-
A_LARGE
-
-
A_LEFT
-
-
A_RIGHT
-
-
A_SMALL
-
-
A_UNDERLINE
-
-
I_BOLD
-
-
I_ITALIC
-
-
I_UNDERLINE
-
-
L_ALIGN
-
-
L_FORMAT
-
-
L_INSERT
-
-
L_LIST
-
-
RichTextEditor(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.
-
align_to_center()
- Sets the alignment of the selected paragraph to be centered.
-
align_to_left()
- Sets the alignment of the selected paragraph to be left.
-
align_to_right()
- Sets the alignment of the selected paragraph to be right.
-
clear_font_bold()
- Clears the selected text bold.
-
clear_font_italic()
- Clears the selected text italic.
-
clear_font_styles()
- Clears the all styles of the selected text.
-
clear_font_underlined()
- Clears the selected text underlined.
-
insert_hr()
- Inserts a horizontal line.
-
insert_image()
- Inserts an image.
-
itemStateChanged(ItemEvent)
- Invoked when an item's state has been changed.
-
make_font_bold()
- Makes the selected text bold.
-
make_font_bold(boolean)
- Makes or clears the selected text bold.
-
make_font_italic()
- Makes the selected text italic.
-
make_font_italic(boolean)
- Makes or clears the selected text italic.
-
make_font_large()
- Makes the selected text large.
-
make_font_small()
- Makes the selected text small.
-
make_font_underlined()
- Makes or clears the selected text underlined.
-
make_font_underlined(boolean)
- Makes or clears the selected text underlined.
-
set_alignment(int)
- Sets the alignment of the selected paragraph to be the specified style.
-
set_font_color(Color)
- Sets the font color of the selected text to be the specified color.
-
set_font_color(ItemEvent)
- Sets the font color of the selected text to be the selected color.
-
set_font_name(ItemEvent)
- Sets the font name of the selected text to be the selected name.
-
set_font_name(String)
- Sets the font name of the selected text to be the specified name.
-
set_font_size(int)
- Sets the font size of the selected text to be the specified size.
-
set_font_size(ItemEvent)
- Sets the font size of the selected text to be the selected size.
-
set_font_size_diff(int)
- Sets the font size of the selected text differed from the specified size.
L_FORMAT
public static final String L_FORMAT
L_INSERT
public static final String L_INSERT
L_ALIGN
public static final String L_ALIGN
L_LIST
public static final String L_LIST
I_BOLD
public static final String I_BOLD
I_ITALIC
public static final String I_ITALIC
I_UNDERLINE
public static final String I_UNDERLINE
A_BOLD
public static final String A_BOLD
A_ITALIC
public static final String A_ITALIC
A_UNDERLINE
public static final String A_UNDERLINE
A_CLEAR_STYLE
public static final String A_CLEAR_STYLE
A_LARGE
public static final String A_LARGE
A_SMALL
public static final String A_SMALL
A_LEFT
public static final String A_LEFT
A_CENTER
public static final String A_CENTER
A_RIGHT
public static final String A_RIGHT
A_INC_INDENT
public static final String A_INC_INDENT
A_DEC_INDENT
public static final String A_DEC_INDENT
A_IMAGE
public static final String A_IMAGE
A_HR
public static final String A_HR
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.
set_font_name
public void set_font_name(String name)
- Sets the font name of the selected text to be the specified name.
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
.
set_font_size
public void set_font_size(int size)
- Sets the font size of the selected text to be the specified size.
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.
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" .
make_font_large
public abstract void make_font_large()
- Makes the selected text large.
make_font_small
public abstract void make_font_small()
- Makes the selected text small.
set_font_color
public void set_font_color(Color color)
- Sets the font color of the selected text to be the specified color.
set_font_color
public void set_font_color(ItemEvent e)
- Sets the font color of the selected text to be the selected color.
make_font_bold
public void make_font_bold(boolean bold)
- Makes or clears the selected text bold.
make_font_bold
public void make_font_bold()
- Makes the selected text bold.
clear_font_bold
public void clear_font_bold()
- Clears the selected text bold.
make_font_italic
public void make_font_italic(boolean italic)
- Makes or clears the selected text italic.
make_font_italic
public void make_font_italic()
- Makes the selected text italic.
clear_font_italic
public void clear_font_italic()
- Clears the selected text italic.
make_font_underlined
public void make_font_underlined(boolean underline)
- Makes or clears the selected text underlined.
make_font_underlined
public void make_font_underlined()
- Makes or clears the selected text underlined.
clear_font_underlined
public void clear_font_underlined()
- Clears the selected text underlined.
clear_font_styles
public void clear_font_styles()
- Clears the all styles of the selected text.
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
align_to_left
public void align_to_left()
- Sets the alignment of the selected paragraph to be left.
align_to_center
public void align_to_center()
- Sets the alignment of the selected paragraph to be centered.
align_to_right
public void align_to_right()
- Sets the alignment of the selected paragraph to be right.
insert_hr
public void insert_hr()
- Inserts a horizontal line.
insert_image
public void insert_image()
- Inserts an image.
actionPerformed
public void actionPerformed(ActionEvent e)
- Invoked when an action occurs.
- Overrides:
- actionPerformed in class TextEditor
- See Also:
- ActionListener
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