javax.swing.text |
Provides classes and interfaces that deal with editable
and noneditable text components. Examples of text components are text
fields and text areas, of which password fields and document editors
are special instantiations. Features that are supported by this
package include selection/highlighting, editing, style,
and key mapping.
Note:
Most of the Swing API is not thread safe.
For details, see
Threads and Swing,
a section in
The Java Tutorial.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@since 1.2
@serial exclude
|
Java Source File Name | Type | Comment |
AbstractDocument.java | Class | An implementation of the document interface to serve as a
basis for implementing various kinds of documents. |
AbstractWriter.java | Class | AbstractWriter is an abstract class that actually
does the work of writing out the element tree
including the attributes. |
AsyncBoxView.java | Class | A box that does layout asynchronously. |
AttributeSet.java | Interface | A collection of unique attributes. |
BadLocationException.java | Class | This exception is to report bad locations within a document model
(that is, attempts to reference a location that doesn't exist).
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
BoxView.java | Class | A view that arranges its children into a box shape by tiling
its children along an axis. |
Caret.java | Interface | A place within a document view that represents where
things can be inserted into the document model. |
ChangedCharSetException.java | Class | ChangedCharSetException as the name indicates is an exception
thrown when the charset is changed. |
ComponentView.java | Class | Component decorator that implements the view interface. |
CompositeView.java | Class | CompositeView is an abstract View
implementation which manages one or more child views.
(Note that CompositeView is intended
for managing relatively small numbers of child views.)
CompositeView is intended to be used as
a starting point for View implementations,
such as BoxView , that will contain child
View s. |
DateFormatter.java | Class | DateFormatter is an InternationalFormatter that does its
formatting by way of an instance of java.text.DateFormat .
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
DefaultCaret.java | Class | A default implementation of Caret. |
DefaultEditorKit.java | Class | This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document. |
DefaultFormatter.java | Class | DefaultFormatter formats aribtrary objects. |
DefaultFormatterFactory.java | Class | An implementation of
JFormattedTextField.AbstractFormatterFactory .
DefaultFormatterFactory allows specifying a number of
different JFormattedTextField.AbstractFormatter s that are to
be used.
The most important one is the default one
(setDefaultFormatter ). |
DefaultHighlighter.java | Class | Implements the Highlighter interfaces. |
DefaultStyledDocument.java | Class | A document that can be marked up with character and paragraph
styles in a manner similar to the Rich Text Format. |
DefaultTextUI.java | Class |
This class has been deprecated and should no longer be used. |
Document.java | Interface |
The Document is a container for text that serves
as the model for swing text components. |
DocumentFilter.java | Class | DocumentFilter , as the name implies, is a filter for the
Document mutation methods. |
EditorKit.java | Class | Establishes the set of things needed by a text component
to be a reasonably functioning editor for some type
of text content. |
Element.java | Interface | Interface to describe a structural piece of a document. |
ElementIterator.java | Class |
ElementIterator, as the name suggests, iteratates over the Element
tree. |
FieldView.java | Class | Extends the multi-line plain text view to be suitable
for a single-line editor view. |
FlowView.java | Class | A View that tries to flow it's children into some
partially constrained space. |
GapContent.java | Class | An implementation of the AbstractDocument.Content interface
implemented using a gapped buffer similar to that used by emacs.
The underlying storage is a array of unicode characters with
a gap somewhere. |
GapVector.java | Class | An implementation of a gapped buffer similar to that used by
emacs. |
GlyphPainter1.java | Class | A class to perform rendering of the glyphs.
This can be implemented to be stateless, or
to hold some information as a cache to
facilitate faster rendering and model/view
translation. |
GlyphPainter2.java | Class | A class to perform rendering of the glyphs.
This can be implemented to be stateless, or
to hold some information as a cache to
facilitate faster rendering and model/view
translation. |
GlyphView.java | Class | A GlyphView is a styled chunk of text that represents a view
mapped over an element in the text model. |
Highlighter.java | Interface | An interface for an object that allows one to mark up the background
with colored areas. |
IconView.java | Class | Icon decorator that implements the view interface. |
InternationalFormatter.java | Class | InternationalFormatter extends DefaultFormatter ,
using an instance of java.text.Format to handle the
conversion to a String, and the conversion from a String.
If getAllowsInvalid() is false, this will ask the
Format to format the current text on every edit.
You can specify a minimum and maximum value by way of the
setMinimum and setMaximum methods. |
JTextComponent.java | Class | JTextComponent is the base class for swing text
components. |
Keymap.java | Interface | A collection of bindings of KeyStrokes to actions. |
LabelView.java | Class | A LabelView is a styled chunk of text
that represents a view mapped over an element in the
text model. |
LayeredHighlighter.java | Class | |
LayoutQueue.java | Class | A queue of text layout tasks. |
MaskFormatter.java | Class | MaskFormatter is used to format and edit strings. |
MutableAttributeSet.java | Interface | A generic interface for a mutable collection of unique attributes. |
NavigationFilter.java | Class | NavigationFilter can be used to restrict where the cursor can
be positioned. |
NumberFormatter.java | Class | NumberFormatter subclasses InternationalFormatter
adding special behavior for numbers. |
ParagraphView.java | Class | View of a simple line-wrapping paragraph that supports
multiple fonts, colors, components, icons, etc. |
PasswordView.java | Class | Implements a View suitable for use in JPasswordField
UI implementations. |
PlainDocument.java | Class | A plain document that maintains no character attributes. |
PlainView.java | Class | Implements View interface for a simple multi-line text view
that has text in one font and color. |
Position.java | Interface | Represents a location within a document. |
Segment.java | Class | A segment of a character array representing a fragment
of text. |
SegmentCache.java | Class | SegmentCache caches Segment s to avoid continually creating
and destroying of Segment s. |
SimpleAttributeSet.java | Class | A straightforward implementation of MutableAttributeSet using a
hash table.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
StateInvariantError.java | Class | This exception is to report the failure of state invarient
assertion that was made. |
StringContent.java | Class | An implementation of the AbstractDocument.Content interface that is
a brute force implementation that is useful for relatively small
documents and/or debugging. |
Style.java | Interface | A collection of attributes to associate with an element in a document.
Since these are typically used to associate character and paragraph
styles with the element, operations for this are provided. |
StyleConstants.java | Class |
A collection of well known or common attribute keys
and methods to apply to an AttributeSet or MutableAttributeSet
to get/set the properties in a typesafe manner. |
StyleContext.java | Class | A pool of styles and their associated resources. |
StyledDocument.java | Interface | Interface for a generic styled document. |
StyledEditorKit.java | Class | This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document. |
TabableView.java | Interface | Interface for View s that have size dependent upon tabs. |
TabExpander.java | Interface | Simple interface to allow for different types of
implementations of tab expansion. |
TableView.java | Class |
Implements View interface for a table, that is composed of an
element structure where the child elements of the element
this view is responsible for represent rows and the child
elements of the row elements are cells. |
TabSet.java | Class | A TabSet is comprised of many TabStops. |
TabStop.java | Class | This class encapsulates a single tab stop (basically as tab stops
are thought of by RTF). |
TextAction.java | Class | An Action implementation useful for key bindings that are
shared across a number of different text components. |
TextLayoutStrategy.java | Class | A flow strategy that uses java.awt.font.LineBreakMeasureer to
produce java.awt.font.TextLayout for i18n capable rendering. |
Utilities.java | Class | A collection of methods to deal with various text
related activities. |
View.java | Class |
A very important part of the text package is the View class.
As the name suggests it represents a view of the text model,
or a piece of the text model. |
ViewFactory.java | Interface | A factory to create a view of some portion of document subject.
This is intended to enable customization of how views get
mapped over a document model. |
WrappedPlainView.java | Class | View of plain text (text with only one font and color)
that does line-wrapping. |
ZoneView.java | Class | ZoneView is a View implementation that creates zones for which
the child views are not created or stored until they are needed
for display or model/view translations. |