Module java.desktop

Package javax.swing.text


package 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 Concurrency in Swing, a section in The Java Tutorial.

For overviews, tutorials, examples, guides, and tool documentation, please see:
Since:
1.2
  • Class
    Description
    An implementation of the document interface to serve as a basis for implementing various kinds of documents.
    An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
    Interface to describe a sequence of character content that can be edited.
    An implementation of ElementChange that can be added to the document event.
    AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
    A box that does layout asynchronously.
    A collection of unique attributes.
    This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
    This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
    This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text.
    This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
    This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
    A view that arranges its children into a box shape by tiling its children along an axis.
    A place within a document view that represents where things can be inserted into the document model.
    ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.
    Component decorator that implements the view interface.
    CompositeView is an abstract View implementation which manages one or more child views.
    DateFormatter is an InternationalFormatter that does its formatting by way of an instance of java.text.DateFormat.
    A default implementation of Caret.
    This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
    Creates a beep.
    Copies the selected region and place its contents into the system clipboard.
    Cuts the selected region and place its contents into the system clipboard.
    The action that is executed by default if a key typed event is received and there is no keymap entry.
    Places a line/paragraph break into the document.
    Places content into the associated document.
    Places a tab character into the document.
    Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
    DefaultFormatter formats arbitrary objects.
    An implementation of JFormattedTextField.AbstractFormatterFactory.
    Implements the Highlighter interfaces.
    Simple highlight painter that fills a highlighted area with a solid color.
    A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
    An UndoableEdit used to remember AttributeSet changes to an Element.
    Specification for building elements.
    Deprecated. 
    The Document is a container for text that serves as the model for swing text components.
    DocumentFilter, as the name implies, is a filter for the Document mutation methods.
    Used as a way to circumvent calling back into the Document to change it.
    Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
    Interface to describe a structural piece of a document.
    ElementIterator, as the name suggests, iterates over the Element tree.
    Extends the multi-line plain text view to be suitable for a single-line editor view.
    A View that tries to flow it's children into some partially constrained space.
    Strategy for maintaining the physical form of the flow.
    An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
    A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
    A class to perform rendering of the glyphs.
    An interface for an object that allows one to mark up the background with colored areas.
    A highlight.
    Highlight renderer.
    Icon decorator that implements the view interface.
    InternationalFormatter extends DefaultFormatter, using an instance of java.text.Format to handle the conversion to a String, and the conversion from a String.
    JTextComponent is the base class for swing text components.
    Represents a drop location for JTextComponents.
    Binding record for creating key bindings.
    A collection of bindings of KeyStrokes to actions.
    A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
    Implementation of Highlighter interface to mark up the background of leaf views with colored areas.
    Layered highlight renderer.
    A queue of text layout tasks.
    MaskFormatter is used to format and edit strings.
    A generic interface for a mutable collection of unique attributes.
    NavigationFilter can be used to restrict where the cursor can be positioned.
    Used as a way to circumvent calling back into the caret to position the cursor.
    NumberFormatter subclasses InternationalFormatter adding special behavior for numbers.
    View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
    Implements a View suitable for use in JPasswordField UI implementations.
    A plain document that maintains no character attributes.
    Implements View interface for a simple multi-line text view that has text in one font and color.
    Represents a location within a document.
    A typesafe enumeration to indicate bias to a position in the model.
    A segment of a character array representing a fragment of text.
    A straightforward implementation of MutableAttributeSet using a hash table.
    An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
    A collection of attributes to associate with an element in a document.
    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.
    This is a typesafe enumeration of the well-known attributes that contribute to a character style.
    This is a typesafe enumeration of the well-known attributes that contribute to a color.
    This is a typesafe enumeration of the well-known attributes that contribute to a font.
    This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
    A pool of styles and their associated resources.
    Interface for a generic styled document.
    This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
    An action to set paragraph alignment.
    An action to toggle the bold attribute.
    An action to set the font family in the associated JEditorPane.
    An action to set the font size in the associated JEditorPane.
    An action to set foreground color.
    An action to toggle the italic attribute.
    An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
    An action to toggle the underline attribute.
    Interface for Views that have size dependent upon tabs.
    Simple interface to allow for different types of implementations of tab expansion.
    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.
    A TabSet is comprised of many TabStops.
    This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
    An Action implementation useful for key bindings that are shared across a number of different text components.
    A collection of methods to deal with various text related activities.
    A very important part of the text package is the View class.
    A factory to create a view of some portion of document subject.
    View of plain text (text with only one font and color) that does line-wrapping.
    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.