public abstract class RichTextEditor extends TextEditor
RichTextEditor is an abstract base class of multi-line
text area that is suited for editing styled documents.DocumentEditor,
HTMLEditor,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
static java.lang.String |
A_BOLD |
static java.lang.String |
A_CENTER |
static java.lang.String |
A_CLEAR_STYLE |
static java.lang.String |
A_DEC_INDENT |
static java.lang.String |
A_HR |
static java.lang.String |
A_IMAGE |
static java.lang.String |
A_INC_INDENT |
static java.lang.String |
A_ITALIC |
static java.lang.String |
A_LARGE |
static java.lang.String |
A_LEFT |
static java.lang.String |
A_RIGHT |
static java.lang.String |
A_SMALL |
static java.lang.String |
A_UNDERLINE |
protected ToggleButton |
boldButton |
static java.lang.String |
I_BOLD |
static java.lang.String |
I_ITALIC |
static java.lang.String |
I_UNDERLINE |
protected ToggleButton |
italicButton |
static java.lang.String |
L_ALIGN |
static java.lang.String |
L_FORMAT |
static java.lang.String |
L_INSERT |
static java.lang.String |
L_LIST |
protected ToggleButton |
underlineButton |
A_COPY, A_CUT, A_FIND, A_GOTO, A_OPEN, A_PASTE, A_PRINT, A_SAVE, A_SAVE_AS, A_UNDO, caretDisableComps, change, checkboxMenuMap, I_AUTO_INDENT, I_INCREMENTAL_LOAD, I_SHOW_MATCH, I_SOFT_TAB, I_WORD_WRAP, INC_LINE_COUNT, incrementalLoad, L_CLOSE, L_CLOSE_CONFIRM, L_EDIT, L_EXIT, L_EXIT_CONFIRM, L_FILE, L_FONT, L_FONT_COLOR, L_FONT_NAME, L_FONT_SIZE, L_FONT_STYLE, L_HELP, L_KFC_ADDRESS, L_KFC_ADDRESS2, L_KFC_AUTHOR, L_KFC_URL, L_NEW_WIN, L_OPEN_CONFIRM, L_READ_ENCODING, L_VERSION, L_VIEW, L_WRITE_ENCODING, P_AUTO_INDENT, P_FILE, P_INCREMENTAL_LOAD, P_READ_ENCODING, P_SHOW_MATCH, P_SOFT_TAB, P_SUB_COMPS, P_WORD_WRAP, P_WRITE_ENCODING, readEncoding, savedTextCursor, subComps, subCompStates, textChanged, writeEncoding, writeTargetCHAR_WRAP, columns, DEFAULT_HORIZONTAL_STYLE, DEFAULT_VERTICAL_STYLE, editController, editModel, editView, NO_WRAP, NOT_EDITABLE_BACKGROUND, NOT_EDITABLE_FOREGROUND, NOT_EDITABLE_SELECTION_BACKGROUND, NOT_EDITABLE_SELECTION_FOREGROUND, rows, savedBackgroundColor, savedForegroundColor, savedSelectionBackgroundColor, savedSelectionForegroundColor, SCROLLBARS_BOTH, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, SCROLLBARS_VERTICAL_ONLY, textListener, textListenerK, textPositionListeners, WORD_WRAPfocusTraversable| コンストラクタと説明 |
|---|
RichTextEditor(int rows,
int columns,
boolean showToolBar,
java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener,
java.awt.event.ActionListener printActionListener)
Constructs a new rich text area with tool bar, with the specified
number of rows and columns.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs.
|
void |
align_to_center()
Sets the alignment of the selected paragraph to be centered.
|
void |
align_to_left()
Sets the alignment of the selected paragraph to be left.
|
void |
align_to_right()
Sets the alignment of the selected paragraph to be right.
|
void |
clear_font_bold()
Clears the selected text bold.
|
void |
clear_font_italic()
Clears the selected text italic.
|
void |
clear_font_styles()
Clears the all styles of the selected text.
|
void |
clear_font_underlined()
Clears the selected text underlined.
|
protected java.awt.Component[] |
createAlignmentComponents() |
protected TextEditModel |
createDefaultTextEditModel() |
protected java.awt.Component[] |
createFontComponents1() |
protected java.awt.Component[] |
createFontComponents2() |
protected TextStyle |
getInsertionStyle() |
void |
insert_hr()
Inserts a horizontal line.
|
void |
insert_image()
Inserts an image.
|
protected void |
insertTextAttachmentAsLine(TextAttachment ta) |
protected void |
insertVisualizable(Visualizable v) |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item's state has been changed.
|
void |
make_font_bold()
Makes the selected text bold.
|
void |
make_font_bold(boolean bold)
Makes or clears the selected text bold.
|
void |
make_font_italic()
Makes the selected text italic.
|
void |
make_font_italic(boolean italic)
Makes or clears the selected text italic.
|
abstract void |
make_font_large()
Makes the selected text large.
|
abstract void |
make_font_small()
Makes the selected text small.
|
void |
make_font_underlined()
Makes or clears the selected text underlined.
|
void |
make_font_underlined(boolean underline)
Makes or clears the selected text underlined.
|
protected java.lang.Integer |
parseInt(java.lang.String s) |
protected java.lang.Object[] |
parseSignedInt(java.lang.String s) |
void |
set_alignment(int align)
Sets the alignment of the selected paragraph to be the specified style.
|
void |
set_font_color(java.awt.Color color)
Sets the font color of the selected text to be the specified color.
|
void |
set_font_color(java.awt.event.ItemEvent e)
Sets the font color of the selected text to be the selected color.
|
void |
set_font_name(java.awt.event.ItemEvent e)
Sets the font name of the selected text to be the selected name.
|
void |
set_font_name(java.lang.String name)
Sets the font name of the selected text to be the specified name.
|
void |
set_font_size_diff(int size)
Sets the font size of the selected text differed from the specified size.
|
void |
set_font_size(int size)
Sets the font size of the selected text to be the specified size.
|
void |
set_font_size(java.awt.event.ItemEvent e)
Sets the font size of the selected text to be the selected size.
|
addCaretDisableComp, addCaretDisableItem, addPropertyChangeListener, addSubComp, addTextListener, addTextPositionListener, appendAnyway, createCheckboxMenuItem, createEditComponents, createEditMenu, createFileComponents, createFindComponents, createFontMenu, createFormatMenu, createIconButton, createIconToggleButton, createInsertMenu, createMenuItem, createPrintComponents, createReadCharSetMenu, createTextComponent, createTextComponent, createToolBar, createViewMenu, createWriteCharSetMenu, disableSubComps, enableSubComps, getEditMenu, getFileFromLoadDialog, getFileFromSaveDialog, getFormatMenu, getIcon, getInsertMenu, getReadEncoding, getToolLabel, getToolTip, getViewMenu, getWriteEncoding, initComponent, isIncrementalLoad, isTextChanged, isWordWrap, load, main, open_file, open_file, print_file, print_file, removePropertyChangeListener, removeTextListener, removeTextPositionListener, save_file_as, save_file_as, save_file, save, setAutoIndentEnabled, setIncrementalLoad, setReadEncoding, setRichText, setShowMatchEnabled, setSoftTab, setText, setTEXT, setTextChanged, setWordWrap, setWriteEncoding, setWriteTarget, textPositionChanged, textValueChanged, warnaddKeyAction, append, append, append, appendText, backward_character, backward_word, beep, beginning_of_file, beginning_of_line, clearSoftTab, clearUndo, copy_clipboard, createTextComponent, createTextComponent, cut_clipboard, delete_next_character, delete_next_word, delete_previous_character, delete_previous_word, delete_selection, delete_to_end_of_line, delete_to_start_of_line, deselect_all, end_of_file, end_of_line, find_word, forward_character, forward_word, getCaretColor, getCaretPosition, getColumns, getController, getCurrentTextStyle, getEventSource, getKeyAction, getKeyBinding, getKeymap, getLineWrap, getLocationOfText, getMinimumSize, getMinimumSize, getModel, getParagraphStyleAt, getParagraphStyleCount, getParagraphStyles, getParagraphStyles, getPopupMenu, getPreferredSize, getPreferredSize, getRichText, getRows, getScrollbarThickness, getScrollbarVisibility, getSelectedText, getSelectedTEXT, getSelectionBackground, getSelectionEnd, getSelectionForeground, getSelectionStart, getSoftTab, getText, getTEXT, getText, getTextCaret, getTextStyleAt, getTextStyleCount, getTextStyles, getTextStyles, getView, goto_line, insert_character, insert_string, insert, insert, insert, insertText, isAutoIndentEnabled, isClickable, isClickToFocus, isEditable, isMouseFocus, isShowMatchEnabled, isSoftTab, kill_next_character, kill_next_word, kill_previous_character, kill_previous_word, kill_selection, kill_to_end_of_line, kill_to_start_of_line, minimumSize, modifyRangeParagraphStyle, modifyRangeParagraphStyle, modifyRangeTextStyle, modifyRangeTextStyle, modifySelectionParagraphStyle, modifySelectionParagraphStyle, modifySelectionTextStyle, modifySelectionTextStyle, newbreak, newline_and_indent, newline, next_line, next_page, paragraphStyles, paragraphStyles, paste_clipboard, performKeyAction, performKeyAction, preferredSize, previous_line, previous_page, print, print, print, print, print, processEvent, redraw_display, removeKeyAction, removeKeyActionNamed, replaceRange, replaceRange, replaceRange, replaceSelection, replaceSelection, replaceSelection, replaceText, select_all, select_line, select_word, select, select, select, selectAll, selectionIsCaret, setBackground, setCaretColor, setCaretPosition, setCaretPosition, setClickable, setClickToFocus, setColumns, setCursor, setEditable, setEditable, setEnabled, setFont, setForeground, setKeymap, setLineWrap, setLocationOfText, setMouseFocus, setPopupMenu, setRangeParagraphStyle, setRangeParagraphStyle, setRangeTextStyle, setRangeTextStyle, setRows, setScrollbarThickness, setSelectionBackground, setSelectionEnd, setSelectionForeground, setSelectionParagraphStyle, setSelectionParagraphStyle, setSelectionStart, setSelectionTextStyle, setSelectionTextStyle, setSoftTab, setTextCaret, tab, textStyles, textStyles, undo, unkilladdFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, delegateFocusEvent, delegateKeyEvent, delegateMouseEvent, focusGained, focusLost, getToolTipText, getToolTipVisual, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setToolTipText, setToolTipText, setToolTipVisualaddNotify, bounds, disable, doLayout, enable, enable, getBounds, getFrame, getInsets, getLocation, getSize, hide, insets, isDirectNotification, isFocusTraversable, layout, location, minimumSize, postOldEvent, preferredSize, repaintNow, requestFocus, reshape, setBounds, setFocusTraversable, setVisible, show, show, size, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMousePosition, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, list, list, locate, paint, paintComponents, paramString, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected ToggleButton boldButton
protected ToggleButton italicButton
protected ToggleButton underlineButton
public static final java.lang.String L_FORMAT
public static final java.lang.String L_INSERT
public static final java.lang.String L_ALIGN
public static final java.lang.String L_LIST
public static final java.lang.String I_BOLD
public static final java.lang.String I_ITALIC
public static final java.lang.String I_UNDERLINE
public static final java.lang.String A_BOLD
public static final java.lang.String A_ITALIC
public static final java.lang.String A_UNDERLINE
public static final java.lang.String A_CLEAR_STYLE
public static final java.lang.String A_LARGE
public static final java.lang.String A_SMALL
public static final java.lang.String A_LEFT
public static final java.lang.String A_CENTER
public static final java.lang.String A_RIGHT
public static final java.lang.String A_INC_INDENT
public static final java.lang.String A_DEC_INDENT
public static final java.lang.String A_IMAGE
public static final java.lang.String A_HR
public RichTextEditor(int rows,
int columns,
boolean showToolBar,
java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener,
java.awt.event.ActionListener printActionListener)
showToolBar is true,
then shows the tool bar initially; otherwise hidden.
This rich text area is created with vertical scroll bar.rows - the number of rowscolumns - 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.protected TextEditModel createDefaultTextEditModel()
createDefaultTextEditModel クラス内 TextEditorpublic void set_font_name(java.lang.String name)
public void set_font_name(java.awt.event.ItemEvent e)
String.public void set_font_size(int size)
public void set_font_size_diff(int size)
public void set_font_size(java.awt.event.ItemEvent e)
Integer or a String
such as "2", "+2", and "-2" .public abstract void make_font_large()
public abstract void make_font_small()
public void set_font_color(java.awt.Color color)
public void set_font_color(java.awt.event.ItemEvent e)
public void make_font_bold(boolean bold)
public void make_font_bold()
public void clear_font_bold()
public void make_font_italic(boolean italic)
public void make_font_italic()
public void clear_font_italic()
public void make_font_underlined(boolean underline)
public void make_font_underlined()
public void clear_font_underlined()
public void clear_font_styles()
public void set_alignment(int align)
public void align_to_left()
public void align_to_center()
public void align_to_right()
public void insert_hr()
public void insert_image()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed インタフェース内 java.awt.event.ActionListeneractionPerformed クラス内 TextEditorActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged インタフェース内 java.awt.event.ItemListeneritemStateChanged クラス内 TextEditorItemListenerprotected java.awt.Component[] createFontComponents1()
protected java.awt.Component[] createFontComponents2()
protected java.awt.Component[] createAlignmentComponents()
protected void insertVisualizable(Visualizable v)
protected void insertTextAttachmentAsLine(TextAttachment ta)
protected TextStyle getInsertionStyle()
protected java.lang.Integer parseInt(java.lang.String s)
protected java.lang.Object[] parseSignedInt(java.lang.String s)