JSR-209 (Final Release)

Package javax.swing.text

Provides classes and interfaces that deal with editable and noneditable text components.

See:
          Description

Interface Summary
AbstractDocument.AttributeContext An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
AbstractDocument.Content Interface to describe a sequence of character content that can be edited.
AttributeSet A collection of unique attributes.
AttributeSet.CharacterAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
AttributeSet.ColorAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
AttributeSet.FontAttribute 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.
AttributeSet.ParagraphAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
Caret A place within a document view that represents where things can be inserted into the document model.
Document The Document is a container for text that serves as the model for swing text components.
Element Interface to describe a structural piece of a document.
Highlighter An interface for an object that allows one to mark up the background with colored areas.
Highlighter.Highlight  
Highlighter.HighlightPainter Highlight renderer.
Keymap A collection of bindings of KeyStrokes to actions.
MutableAttributeSet A generic interface for a mutable collection of unique attributes.
Position Represents a location within a document.
Style A collection of attributes to associate with an element in a document.
StyledDocument Interface for a generic styled document.
TabableView Interface for Views that have size dependent upon tabs.
TabExpander Simple interface to allow for different types of implementations of tab expansion.
ViewFactory A factory to create a view of some portion of document subject.
 

Class Summary
AbstractDocument An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
DocumentFilter DocumentFilter, as the name implies, is a filter for the Document mutation methods.
DocumentFilter.FilterBypass Used as a way to circumvent calling back into the Document to change it.
EditorKit Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
JTextComponent JTextComponent is the base class for swing text components.
JTextComponent.KeyBinding Binding record for creating key bindings.
NavigationFilter NavigationFilter can be used to restrict where the cursor can be positioned.
NavigationFilter.FilterBypass Used as a way to circumvent calling back into the caret to position the cursor.
Position.Bias A typesafe enumeration to indicate bias to a position in the model.
Segment A segment of a character array representing a fragment of text.
View A very important part of the text package is the View class.
 

Exception Summary
BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
 

Package javax.swing.text Description

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

JSR-209 (Final Release)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.