| javax.swing.JFrame com.ibm.richtext.swingdemo.SwingDocumentWindow
SwingDocumentWindow | final class SwingDocumentWindow extends JFrame implements DocumentWindow(Code) | | AwtDocumentWindow is a Frame containing a TextPanel, with a document
for storing the text in the TextPanel.
|
Method Summary | |
public boolean | doClose() Attempt to close this window. | public void | doNew() Set the document to empty text with no associated file. | public void | doOpen() Prompt the user for a file from which to load a text document.
If the current text is not saved, first prompt the user to
save. | public void | doPrint() Print the contents of this window. | public boolean | doSave() Save the text in this document. | public boolean | doSaveAs(int format) Prompt the user for a file in which to save the document text. |
SwingDocumentWindow | SwingDocumentWindow(EditApplication application, TextDocument document, TextPanelSettings textPanelSettings, boolean useTabRuler, TextPanelListener listener, boolean supportStyledText, boolean supportPlainText, int[] menus)(Code) | | Create a new AwtDocumentWindow.
Parameters: application - the application that owns this document Parameters: document - the document to show in this AwtDocumentWindow |
doClose | public boolean doClose()(Code) | | Attempt to close this window. If the text has not been saved,
give the user a chance to save the text before closing the
window. If the user cancels this operation, this method returns
false and the window is not closed; otherwise this method
returns true and the window is closed.
|
doNew | public void doNew()(Code) | | Set the document to empty text with no associated file. If
the document text is not saved, prompt the user to save the
the text first. If this operation is canceled, the document
is unchanged.
|
doOpen | public void doOpen()(Code) | | Prompt the user for a file from which to load a text document.
If the current text is not saved, first prompt the user to
save. If either operation is canceled or fails, the document
is unchanged.
|
doPrint | public void doPrint()(Code) | | Print the contents of this window.
|
doSave | public boolean doSave()(Code) | | Save the text in this document. If there is no file associated
with the text, this is equivalent to doSaveAs .
This method returns true if the document was successfully saved.
|
doSaveAs | public boolean doSaveAs(int format)(Code) | | Prompt the user for a file in which to save the document text.
If this operation is not canceled, save the text in the file.
The file becomes this document's file.
|
|
|