Uses of Interface
javax.swing.text.Document
Package
Description
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides for events fired by Swing components.
Provides classes and interfaces that deal with editable and noneditable text
components.
Provides the class
HTMLEditorKit
and supporting classes for creating
HTML text editors.Provides a class (
RTFEditorKit
) for creating Rich-Text-Format text
editors.-
Uses of Document in javax.swing
Modifier and TypeMethodDescriptionprotected Document
JTextArea.createDefaultModel()
Creates the default implementation of the model to be used at construction if one isn't explicitly given.protected Document
JTextField.createDefaultModel()
Creates the default implementation of the model to be used at construction if one isn't explicitly given.Modifier and TypeMethodDescriptionvoid
JFormattedTextField.setDocument(Document doc)
Associates the editor with a text document.void
JTextField.setDocument(Document doc)
Associates the editor with a text document.void
JTextPane.setDocument(Document doc)
Associates the editor with a text document.ModifierConstructorDescriptionJPasswordField(Document doc, String txt, int columns)
Constructs a newJPasswordField
that uses the given text storage model and the given number of columns.Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0).Constructs a new JTextArea with the specified number of rows and columns, and the given model.JTextField(Document doc, String text, int columns)
Constructs a newJTextField
that uses the given text storage model and the given number of columns. -
Uses of Document in javax.swing.event
Modifier and TypeMethodDescriptionDocumentEvent.getDocument()
Gets the document that sourced the change event. -
Uses of Document in javax.swing.text
Modifier and TypeInterfaceDescriptioninterface
Interface for a generic styled document.Modifier and TypeClassDescriptionclass
An implementation of the document interface to serve as a basis for implementing various kinds of documents.class
A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.class
A plain document that maintains no character attributes.Modifier and TypeMethodDescriptionDefaultEditorKit.createDefaultDocument()
Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.abstract Document
EditorKit.createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.StyledEditorKit.createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.AbstractDocument.AbstractElement.getDocument()
Retrieves the underlying model.AbstractDocument.DefaultDocumentEvent.getDocument()
Gets the document that sourced the change event.protected Document
AbstractWriter.getDocument()
Fetches the document.abstract Document
DocumentFilter.FilterBypass.getDocument()
Returns the Document the mutation is occurring on.Element.getDocument()
Fetches the document associated with this element.JTextComponent.getDocument()
Fetches the model associated with the editor.View.getDocument()
Fetches the model associated with the view.Modifier and TypeMethodDescriptionvoid
DefaultEditorKit.read(InputStream in, Document doc, int pos)
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.void
Inserts content from the given stream, which will be treated as plain text.abstract void
EditorKit.read(InputStream in, Document doc, int pos)
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.abstract void
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.void
JTextComponent.setDocument(Document doc)
Associates the editor with a text document.void
DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len)
Writes content from a document to the given stream in a format appropriate for this kind of content handler.void
Writes content from a document to the given stream as plain text.abstract void
EditorKit.write(OutputStream out, Document doc, int pos, int len)
Writes content from a document to the given stream in a format appropriate for this kind of content handler.abstract void
Writes content from a document to the given stream in a format appropriate for this kind of content handler.ModifierConstructorDescriptionprotected
AbstractWriter(Writer w, Document doc)
Creates a new AbstractWriter.protected
AbstractWriter(Writer w, Document doc, int pos, int len)
Creates a new AbstractWriter.ElementIterator(Document document)
Creates a newElementIterator
. -
Uses of Document in javax.swing.text.html
Modifier and TypeMethodDescriptionHTMLEditorKit.createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.Modifier and TypeMethodDescriptionvoid
Inserts content from the given stream.void
Write content from a document to the given stream in a format appropriate for this kind of content handler. -
Uses of Document in javax.swing.text.rtf
Modifier and TypeMethodDescriptionvoid
RTFEditorKit.read(InputStream in, Document doc, int pos)
Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.void
Insert content from the given stream, which will be treated as plain text.void
RTFEditorKit.write(OutputStream out, Document doc, int pos, int len)
Write content from a document to the given stream in a format appropriate for this kind of content handler.void
Write content from a document to the given stream as plain text.