|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectyu.ac.bg.etf.javaqx.core.AbstractDisposable
yu.ac.bg.etf.javaqx.qswing.text.TextDocument
Abstract text document.
Field Summary | |
protected EventListenerList |
listenerList
|
Method Summary | |
void |
addUndoRedoListener(UndoRedoListener listener)
Adds undo/redo listener. |
void |
appendText(java.lang.String text)
Appends text to the end of the document. |
void |
clearText()
Clears the text. |
protected java.lang.String |
disposedErrorString()
Returns object disposed error message. |
protected void |
disposeObject()
Disposes the object. |
protected void |
fireRedoAvailable(boolean available)
Notifies listeners that redo operation is available. |
protected void |
fireUndoAvailable(boolean available)
Notifies listeners that undo operation is available. |
TextHighlighter |
getHighlighter()
Returns highlighter. |
java.lang.String |
getText()
Returns text of the document. |
UndoRedoListener[] |
getUndoRedoListeners()
Returns all undo/redo listeners. |
boolean |
isModified()
Returns true if the document is modified. |
boolean |
isRedoAvailable()
Returns true if the redo operation is available. |
boolean |
isUndoAvailable()
Returns true if the undo operation is available. |
void |
print(Printer printer)
Prints the document on the specified printer. |
void |
read(java.io.Reader reader)
Reads text from reader. |
boolean |
readFrom(java.io.Reader reader)
Reads text from reader without throwing exceptions. |
boolean |
readFrom(java.lang.String fileName)
Reads text from the specified file without throwing exceptions. |
void |
redo()
Redos last action. |
void |
removeUndoRedoListener(UndoRedoListener listener)
Remove undo/redo listener. |
void |
setHighlighter(TextHighlighter highlighter)
Sets highlighter. |
void |
setModified(boolean modified)
Sets whether or not the document is modified. |
void |
setText(java.lang.String text)
Sets text of the document. |
void |
setUndoRedoEnabled(boolean enabled)
Sets whether or not the undo stack is enabled. |
void |
undo()
Undos last action. |
void |
write(java.io.Writer writer)
Writes text to writer. |
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable |
addDisposeListener, dispose, disposedCheck, finalize, isDisposed, removeDisposeListener |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final EventListenerList listenerList
Method Detail |
public void clearText()
public java.lang.String getText()
public void setText(java.lang.String text)
text
- the text of the documentpublic void appendText(java.lang.String text)
text
- the text to be appendedpublic boolean isUndoAvailable()
public boolean isRedoAvailable()
public void setUndoRedoEnabled(boolean enabled)
enabled
- true if enabledpublic void undo()
public void redo()
public boolean isModified()
public void setModified(boolean modified)
modified
- true if modifiedpublic void read(java.io.Reader reader) throws java.io.IOException
reader
- the reader
java.io.IOException
- on an I/O errorpublic boolean readFrom(java.io.Reader reader)
reader
- the reader
public boolean readFrom(java.lang.String fileName)
fileName
- the file name
public void write(java.io.Writer writer) throws java.io.IOException
writer
- the writer
java.io.IOException
- on an I/O errorpublic void print(Printer printer)
printer
- the printerpublic TextHighlighter getHighlighter()
public void setHighlighter(TextHighlighter highlighter)
highlighter
- the highlighterpublic void addUndoRedoListener(UndoRedoListener listener)
listener
- the undo/redo listenerpublic void removeUndoRedoListener(UndoRedoListener listener)
listener
- the undo/redo listenerpublic UndoRedoListener[] getUndoRedoListeners()
protected void fireUndoAvailable(boolean available)
available
- true if availableprotected void fireRedoAvailable(boolean available)
available
- true if availableprotected java.lang.String disposedErrorString()
disposedErrorString
in class AbstractDisposable
protected final void disposeObject()
disposeObject
in class AbstractDisposable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |