public class TextEditor extends TextComponent implements java.awt.event.ActionListener, java.awt.event.ItemListener
TextEditor object is a multi-line area that displays text.
It can be set to allow editing or read-only modes.
It is created with tool bar.| 修飾子とタイプ | フィールドと説明 |
|---|---|
static java.lang.String |
A_COPY |
static java.lang.String |
A_CUT |
static java.lang.String |
A_FIND |
static java.lang.String |
A_GOTO |
static java.lang.String |
A_OPEN |
static java.lang.String |
A_PASTE |
static java.lang.String |
A_PRINT |
static java.lang.String |
A_SAVE |
static java.lang.String |
A_SAVE_AS |
static java.lang.String |
A_UNDO |
protected java.util.Vector |
caretDisableComps |
protected java.beans.PropertyChangeSupport |
change |
protected java.util.Hashtable |
checkboxMenuMap |
static java.lang.String |
I_AUTO_INDENT |
static java.lang.String |
I_INCREMENTAL_LOAD |
static java.lang.String |
I_SHOW_MATCH |
static java.lang.String |
I_SOFT_TAB |
static java.lang.String |
I_WORD_WRAP |
protected static int |
INC_LINE_COUNT |
protected boolean |
incrementalLoad |
static java.lang.String |
L_CLOSE |
static java.lang.String |
L_CLOSE_CONFIRM |
static java.lang.String |
L_EDIT |
static java.lang.String |
L_EXIT |
static java.lang.String |
L_EXIT_CONFIRM |
static java.lang.String |
L_FILE |
static java.lang.String |
L_FONT |
static java.lang.String |
L_FONT_COLOR |
static java.lang.String |
L_FONT_NAME |
static java.lang.String |
L_FONT_SIZE |
static java.lang.String |
L_FONT_STYLE |
static java.lang.String |
L_HELP |
static java.lang.String |
L_KFC_ADDRESS |
static java.lang.String |
L_KFC_ADDRESS2 |
static java.lang.String |
L_KFC_AUTHOR |
static java.lang.String |
L_KFC_URL |
static java.lang.String |
L_NEW_WIN |
static java.lang.String |
L_OPEN_CONFIRM |
static java.lang.String |
L_READ_ENCODING |
static java.lang.String |
L_VERSION |
static java.lang.String |
L_VIEW |
static java.lang.String |
L_WRITE_ENCODING |
static java.lang.String |
P_AUTO_INDENT |
static java.lang.String |
P_FILE |
static java.lang.String |
P_INCREMENTAL_LOAD |
static java.lang.String |
P_READ_ENCODING |
static java.lang.String |
P_SHOW_MATCH |
static java.lang.String |
P_SOFT_TAB |
static java.lang.String |
P_SUB_COMPS |
static java.lang.String |
P_WORD_WRAP |
static java.lang.String |
P_WRITE_ENCODING |
protected java.lang.String |
readEncoding |
protected java.awt.Cursor |
savedTextCursor |
protected java.util.Vector |
subComps |
protected java.util.Vector |
subCompStates |
protected boolean |
textChanged |
protected java.lang.String |
writeEncoding |
protected java.io.File |
writeTarget |
CHAR_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| コンストラクタと説明 |
|---|
TextEditor()
Constructs a new text area with tool bar.
|
TextEditor(boolean showToolBar)
Constructs a new text area with tool bar.
|
TextEditor(int rows,
int columns)
Constructs a new text area with tool bar, with the specified number
of rows and columns.
|
TextEditor(int rows,
int columns,
boolean showToolBar)
Constructs a new text area with tool bar, with the specified number
of rows and columns.
|
TextEditor(int rows,
int columns,
boolean showToolBar,
java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener,
java.awt.event.ActionListener printActionListener)
Constructs a new 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.
|
protected void |
addCaretDisableComp(java.awt.Component c) |
protected void |
addCaretDisableItem(java.awt.MenuItem item) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
|
protected void |
addSubComp(java.awt.Component c) |
void |
addTextListener(java.awt.event.TextListener l)
Adds the specified text event listener to recieve text events from
this text component.
|
void |
addTextPositionListener(TextPositionListener l)
Adds the specified text position event listener to recieve text
position events from this text component.
|
protected void |
appendAnyway(Text text,
boolean scroll) |
protected java.awt.CheckboxMenuItem |
createCheckboxMenuItem(java.lang.String command,
boolean state,
java.awt.event.ItemListener l) |
protected TextEditModel |
createDefaultTextEditModel() |
protected java.awt.Component[] |
createEditComponents() |
protected java.awt.Menu |
createEditMenu() |
protected java.awt.Component[] |
createFileComponents(java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener) |
protected java.awt.Component[] |
createFindComponents(boolean withGoto) |
protected java.awt.Menu |
createFontMenu() |
protected java.awt.Menu |
createFormatMenu() |
protected Button |
createIconButton(java.lang.String command) |
protected ToggleButton |
createIconToggleButton(java.lang.String command) |
protected java.awt.Menu |
createInsertMenu() |
protected java.awt.MenuItem |
createMenuItem(java.lang.String command,
java.awt.event.ActionListener l) |
protected java.awt.Component[] |
createPrintComponents(java.awt.event.ActionListener printActionListener) |
protected CharSetMenu |
createReadCharSetMenu() |
protected java.awt.Component |
createTextComponent(int rows,
int columns) |
protected java.awt.Component |
createTextComponent(TextEditModel model,
int rows,
int columns) |
protected ToolBar |
createToolBar(boolean showToolBar,
java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener,
java.awt.event.ActionListener printActionListener)
Creates a tool bar.
|
protected java.awt.Menu |
createViewMenu() |
protected CharSetMenu |
createWriteCharSetMenu() |
void |
disableSubComps()
Disables sub components.
|
void |
enableSubComps()
Enables sub components.
|
java.awt.Menu |
getEditMenu()
Returns the edit menu for this editor, or
null. |
protected java.io.File |
getFileFromLoadDialog(java.lang.String label,
java.lang.String initDir,
java.lang.String initFile) |
protected java.io.File |
getFileFromSaveDialog(java.lang.String label,
java.lang.String initDir,
java.lang.String initFile) |
java.awt.Menu |
getFormatMenu()
Returns the format menu for this editor, or
null. |
VImage |
getIcon(java.lang.String name)
Returns the icon for the spcified name.
|
java.awt.Menu |
getInsertMenu()
Returns the insert menu for this editor, or
null. |
java.lang.String |
getReadEncoding()
Returns the encoding name for reading.
|
java.lang.String |
getToolLabel(java.lang.String name)
Returns the tool label for the spcified name.
|
java.lang.String |
getToolTip(java.lang.String name)
Returns the tool tip for the spcified name.
|
java.awt.Menu |
getViewMenu()
Returns the view menu for this editor, or
null. |
java.lang.String |
getWriteEncoding()
Returns the encoding name for writing.
|
protected void |
initComponent(java.awt.Component textComp,
ToolBar toolBar) |
boolean |
isIncrementalLoad()
Checks if the loading is done incrementally.
|
boolean |
isTextChanged()
Checks if the text is changed.
|
boolean |
isWordWrap()
Checks if this editor wraps the line at word boundary.
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item's state has been changed.
|
boolean |
load(java.io.BufferedReader reader)
Loads the contents of the specified reader incrementally into
this component
|
static void |
main(java.lang.String[] args)
Executes the examples.
|
void |
open_file()
Opens the new file.
|
void |
open_file(java.io.File file)
Opens the specified file.
|
void |
print_file()
Prints the file.
|
protected void |
print_file(java.lang.String header) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
|
void |
removeTextListener(java.awt.event.TextListener l)
Removes the specified text event listener so that it no longer
receives text events from this textcomponent
|
void |
removeTextPositionListener(TextPositionListener l)
Removes the specified text position event listener so that it no
longer receives text position events from this text component
|
void |
save_file_as()
Saves the text into the selected file.
|
void |
save_file_as(java.io.File file)
Saves the text into the specified file.
|
void |
save_file()
Saves the text into the current file.
|
boolean |
save(java.io.Writer writer)
Saves the contents of this component into the specified writer.
|
void |
setAutoIndentEnabled(boolean autoIndent)
Enables the auto indent.
|
void |
setIncrementalLoad(boolean b)
Enables or disables the incremental loading.
|
void |
setReadEncoding(java.lang.String enc)
Sets the encoding name for reading to be the specified name.
|
void |
setRichText(RichText rtext)
Sets the rich text of this text component.
|
void |
setShowMatchEnabled(boolean showMatch)
Enables the show match.
|
void |
setSoftTab(boolean b)
Enables the soft tab.
|
void |
setText(java.lang.String str)
Sets the string that is presented by this text component to be the
specified string.
|
void |
setTEXT(Text text)
Sets the text of this text component.
|
void |
setTextChanged(boolean b)
Sets the text is changed or not.
|
void |
setWordWrap(boolean wordWrap)
Enables the word wrap.
|
void |
setWriteEncoding(java.lang.String enc)
Sets the encoding name for writing to be the specified name.
|
protected void |
setWriteTarget(java.io.File file) |
void |
textPositionChanged(TextPositionEvent te)
Invoked when the position of the text has changed.
|
void |
textValueChanged(java.awt.event.TextEvent e)
Invoked when the value of the text has changed.
|
protected void |
warn(java.lang.Exception e) |
addKeyAction, 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 java.beans.PropertyChangeSupport change
protected boolean textChanged
protected java.lang.String readEncoding
protected java.lang.String writeEncoding
protected boolean incrementalLoad
protected java.io.File writeTarget
protected java.util.Hashtable checkboxMenuMap
protected java.util.Vector subComps
protected java.util.Vector subCompStates
protected java.util.Vector caretDisableComps
public static final java.lang.String L_KFC_URL
public static final java.lang.String L_KFC_AUTHOR
public static final java.lang.String L_KFC_ADDRESS
public static final java.lang.String L_KFC_ADDRESS2
public static final java.lang.String L_FILE
public static final java.lang.String L_NEW_WIN
public static final java.lang.String L_CLOSE
public static final java.lang.String L_EXIT
public static final java.lang.String L_EDIT
public static final java.lang.String L_VIEW
public static final java.lang.String L_HELP
public static final java.lang.String L_VERSION
public static final java.lang.String L_FONT
public static final java.lang.String L_FONT_NAME
public static final java.lang.String L_FONT_STYLE
public static final java.lang.String L_FONT_SIZE
public static final java.lang.String L_FONT_COLOR
public static final java.lang.String L_READ_ENCODING
public static final java.lang.String L_WRITE_ENCODING
public static final java.lang.String L_OPEN_CONFIRM
public static final java.lang.String L_CLOSE_CONFIRM
public static final java.lang.String L_EXIT_CONFIRM
public static final java.lang.String A_OPEN
public static final java.lang.String A_SAVE
public static final java.lang.String A_SAVE_AS
public static final java.lang.String A_PRINT
public static final java.lang.String A_COPY
public static final java.lang.String A_CUT
public static final java.lang.String A_PASTE
public static final java.lang.String A_UNDO
public static final java.lang.String A_FIND
public static final java.lang.String A_GOTO
public static final java.lang.String I_WORD_WRAP
public static final java.lang.String I_SOFT_TAB
public static final java.lang.String I_AUTO_INDENT
public static final java.lang.String I_SHOW_MATCH
public static final java.lang.String I_INCREMENTAL_LOAD
public static final java.lang.String P_WORD_WRAP
public static final java.lang.String P_SOFT_TAB
public static final java.lang.String P_AUTO_INDENT
public static final java.lang.String P_SHOW_MATCH
public static final java.lang.String P_READ_ENCODING
public static final java.lang.String P_WRITE_ENCODING
public static final java.lang.String P_INCREMENTAL_LOAD
public static final java.lang.String P_FILE
public static final java.lang.String P_SUB_COMPS
protected static final int INC_LINE_COUNT
protected transient java.awt.Cursor savedTextCursor
public TextEditor()
public TextEditor(boolean showToolBar)
showToolBar
is true, then shows the tool bar initially; otherwise hides.
This text area is created with vertical scroll bar.showToolBar - if true, then shows the tool bar initially;
otherwise hides.public TextEditor(int rows,
int columns)
rows - the number of rowscolumns - the number of columns.public TextEditor(int rows,
int columns,
boolean showToolBar)
showToolBar is true, then shows
the tool bar initially; otherwise hidden.
This 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.public TextEditor(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 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()
protected java.awt.Component createTextComponent(int rows,
int columns)
protected java.awt.Component createTextComponent(TextEditModel model, int rows, int columns)
protected void initComponent(java.awt.Component textComp,
ToolBar toolBar)
public void setText(java.lang.String str)
setText クラス内 TextComponentstr - the new string.TextComponent.getText()public void setTEXT(Text text)
setTEXT クラス内 TextComponentTextComponent.getTEXT()public void setRichText(RichText rtext)
setRichText クラス内 TextComponentpublic void textValueChanged(java.awt.event.TextEvent e)
textValueChanged インタフェース内 java.awt.event.TextListenertextValueChanged クラス内 TextComponentTextListenerpublic boolean isTextChanged()
public void setTextChanged(boolean b)
public java.awt.Menu getEditMenu()
null.getEditMenu クラス内 TextComponentpublic java.awt.Menu getViewMenu()
null.public java.awt.Menu getInsertMenu()
null.public java.awt.Menu getFormatMenu()
null.public java.lang.String getToolTip(java.lang.String name)
public java.lang.String getToolLabel(java.lang.String name)
public VImage getIcon(java.lang.String name)
Available icons are: 'anchor', 'backward', 'bold', 'center', 'color', 'copy', 'cut', 'decindent', 'find', 'forward', 'goto', 'hr', 'image', 'incindent', 'italic', 'java', 'large', 'left', 'link', 'list', 'new', 'olist', 'open', 'paste', 'preview', 'print', 'redo', 'reload', 'right', 'save', 'scolor', 'small', 'stop', 'table', 'underline', 'undo', and 'unlist'.
public boolean isWordWrap()
public void setWordWrap(boolean wordWrap)
public void setSoftTab(boolean b)
public void setAutoIndentEnabled(boolean autoIndent)
setAutoIndentEnabled クラス内 TextComponentpublic void setShowMatchEnabled(boolean showMatch)
setShowMatchEnabled クラス内 TextComponentpublic java.lang.String getReadEncoding()
public void setReadEncoding(java.lang.String enc)
public java.lang.String getWriteEncoding()
public void setWriteEncoding(java.lang.String enc)
public boolean isIncrementalLoad()
public void setIncrementalLoad(boolean b)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener クラス内 java.awt.Containerlistener - The PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener クラス内 java.awt.Componentlistener - The PropertyChangeListener to be removedpublic void addTextListener(java.awt.event.TextListener l)
addTextListener クラス内 TextComponentl - the text event listener.public void removeTextListener(java.awt.event.TextListener l)
removeTextListener クラス内 TextComponentl - the text event listener.public void addTextPositionListener(TextPositionListener l)
addTextPositionListener クラス内 TextComponentl - the text position event listener.public void removeTextPositionListener(TextPositionListener l)
removeTextPositionListener クラス内 TextComponentl - the text position event listener.public void textPositionChanged(TextPositionEvent te)
textPositionChanged インタフェース内 TextPositionListenertextPositionChanged クラス内 TextComponentjava.awt.event.TextPositionListenerpublic void disableSubComps()
enableSubComps()public void enableSubComps()
disableSubComps()public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed インタフェース内 java.awt.event.ActionListenerActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged インタフェース内 java.awt.event.ItemListenerItemListenerpublic void open_file()
public void open_file(java.io.File file)
public void save_file()
public void save_file_as()
public void save_file_as(java.io.File file)
public boolean load(java.io.BufferedReader reader)
reader - the buffered reader to be loaded.public boolean save(java.io.Writer writer)
writer - the writer to save into.public void print_file()
protected void print_file(java.lang.String header)
protected ToolBar createToolBar(boolean showToolBar, java.awt.event.ActionListener openActionListener, java.awt.event.ActionListener saveActionListener, java.awt.event.ActionListener printActionListener)
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 java.awt.Component[] createFileComponents(java.awt.event.ActionListener openActionListener,
java.awt.event.ActionListener saveActionListener)
protected java.awt.Component[] createPrintComponents(java.awt.event.ActionListener printActionListener)
protected java.awt.Component[] createFindComponents(boolean withGoto)
protected java.awt.Component[] createEditComponents()
protected Button createIconButton(java.lang.String command)
protected ToggleButton createIconToggleButton(java.lang.String command)
protected java.awt.Menu createInsertMenu()
protected java.awt.Menu createFormatMenu()
protected java.awt.Menu createEditMenu()
protected java.awt.Menu createViewMenu()
protected java.awt.Menu createFontMenu()
protected CharSetMenu createReadCharSetMenu()
protected CharSetMenu createWriteCharSetMenu()
protected java.awt.MenuItem createMenuItem(java.lang.String command,
java.awt.event.ActionListener l)
protected java.awt.CheckboxMenuItem createCheckboxMenuItem(java.lang.String command,
boolean state,
java.awt.event.ItemListener l)
protected void addSubComp(java.awt.Component c)
protected void addCaretDisableComp(java.awt.Component c)
protected void addCaretDisableItem(java.awt.MenuItem item)
protected void setWriteTarget(java.io.File file)
protected void warn(java.lang.Exception e)
protected java.io.File getFileFromLoadDialog(java.lang.String label,
java.lang.String initDir,
java.lang.String initFile)
protected java.io.File getFileFromSaveDialog(java.lang.String label,
java.lang.String initDir,
java.lang.String initFile)
protected void appendAnyway(Text text, boolean scroll)
public static void main(java.lang.String[] args)