Package javax.swing.text

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

Class Summary
AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.ElementEdit sample code for javax.swing.text.AbstractDocument.ElementEdit definition code for javax.swing.text.AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
AsyncBoxView sample code for javax.swing.text.AsyncBoxView definition code for javax.swing.text.AsyncBoxView A box that does layout asynchronously.
BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView A view that arranges its children into a box shape by tiling its children along an axis.
ComponentView sample code for javax.swing.text.ComponentView definition code for javax.swing.text.ComponentView Component decorator that implements the view interface.
CompositeView sample code for javax.swing.text.CompositeView definition code for javax.swing.text.CompositeView CompositeView is an abstract View implementation which manages one or more child views.
DateFormatter sample code for javax.swing.text.DateFormatter definition code for javax.swing.text.DateFormatter DateFormatter is an InternationalFormatter that does its formatting by way of an instance of java.text.DateFormat.
DefaultCaret sample code for javax.swing.text.DefaultCaret definition code for javax.swing.text.DefaultCaret A default implementation of Caret.
DefaultEditorKit sample code for javax.swing.text.DefaultEditorKit definition code for javax.swing.text.DefaultEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
DefaultEditorKit.BeepAction sample code for javax.swing.text.DefaultEditorKit.BeepAction definition code for javax.swing.text.DefaultEditorKit.BeepAction Creates a beep.
DefaultEditorKit.CopyAction sample code for javax.swing.text.DefaultEditorKit.CopyAction definition code for javax.swing.text.DefaultEditorKit.CopyAction Copies the selected region and place its contents into the system clipboard.
DefaultEditorKit.CutAction sample code for javax.swing.text.DefaultEditorKit.CutAction definition code for javax.swing.text.DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
DefaultEditorKit.DefaultKeyTypedAction sample code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction definition code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
DefaultEditorKit.InsertBreakAction sample code for javax.swing.text.DefaultEditorKit.InsertBreakAction definition code for javax.swing.text.DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
DefaultEditorKit.InsertContentAction sample code for javax.swing.text.DefaultEditorKit.InsertContentAction definition code for javax.swing.text.DefaultEditorKit.InsertContentAction Places content into the associated document.
DefaultEditorKit.InsertTabAction sample code for javax.swing.text.DefaultEditorKit.InsertTabAction definition code for javax.swing.text.DefaultEditorKit.InsertTabAction Places a tab character into the document.
DefaultEditorKit.PasteAction sample code for javax.swing.text.DefaultEditorKit.PasteAction definition code for javax.swing.text.DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
DefaultFormatter sample code for javax.swing.text.DefaultFormatter definition code for javax.swing.text.DefaultFormatter DefaultFormatter formats aribtrary objects.
DefaultFormatterFactory sample code for javax.swing.text.DefaultFormatterFactory definition code for javax.swing.text.DefaultFormatterFactory An implementation of JFormattedTextField.AbstractFormatterFactory.
DefaultHighlighter sample code for javax.swing.text.DefaultHighlighter definition code for javax.swing.text.DefaultHighlighter Implements the Highlighter interfaces.
DefaultHighlighter.DefaultHighlightPainter sample code for javax.swing.text.DefaultHighlighter.DefaultHighlightPainter definition code for javax.swing.text.DefaultHighlighter.DefaultHighlightPainter Simple highlight painter that fills a highlighted area with a solid color.
DefaultStyledDocument sample code for javax.swing.text.DefaultStyledDocument definition code for javax.swing.text.DefaultStyledDocument A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
DefaultStyledDocument.AttributeUndoableEdit sample code for javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit definition code for javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.
DefaultStyledDocument.ElementSpec sample code for javax.swing.text.DefaultStyledDocument.ElementSpec definition code for javax.swing.text.DefaultStyledDocument.ElementSpec Specification for building elements.
DefaultTextUI sample code for javax.swing.text.DefaultTextUI definition code for javax.swing.text.DefaultTextUI Deprecated.  
DocumentFilter sample code for javax.swing.text.DocumentFilter definition code for javax.swing.text.DocumentFilter DocumentFilter, as the name implies, is a filter for the Document mutation methods.
DocumentFilter.FilterBypass sample code for javax.swing.text.DocumentFilter.FilterBypass definition code for javax.swing.text.DocumentFilter.FilterBypass Used as a way to circumvent calling back into the Document to change it.
EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
ElementIterator sample code for javax.swing.text.ElementIterator definition code for javax.swing.text.ElementIterator ElementIterator, as the name suggests, iteratates over the Element tree.
FieldView sample code for javax.swing.text.FieldView definition code for javax.swing.text.FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
FlowView sample code for javax.swing.text.FlowView definition code for javax.swing.text.FlowView A View that tries to flow it's children into some partially constrained space.
FlowView.FlowStrategy sample code for javax.swing.text.FlowView.FlowStrategy definition code for javax.swing.text.FlowView.FlowStrategy Strategy for maintaining the physical form of the flow.
GapContent sample code for javax.swing.text.GapContent definition code for javax.swing.text.GapContent An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
GlyphView sample code for javax.swing.text.GlyphView definition code for javax.swing.text.GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
GlyphView.GlyphPainter sample code for javax.swing.text.GlyphView.GlyphPainter definition code for javax.swing.text.GlyphView.GlyphPainter A class to perform rendering of the glyphs.
IconView sample code for javax.swing.text.IconView definition code for javax.swing.text.IconView Icon decorator that implements the view interface.
InternationalFormatter sample code for javax.swing.text.InternationalFormatter definition code for javax.swing.text.InternationalFormatter InternationalFormatter extends DefaultFormatter, using an instance of java.text.Format to handle the conversion to a String, and the conversion from a String.
JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent JTextComponent is the base class for swing text components.
JTextComponent.KeyBinding sample code for javax.swing.text.JTextComponent.KeyBinding definition code for javax.swing.text.JTextComponent.KeyBinding Binding record for creating key bindings.
LabelView sample code for javax.swing.text.LabelView definition code for javax.swing.text.LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
LayeredHighlighter sample code for javax.swing.text.LayeredHighlighter definition code for javax.swing.text.LayeredHighlighter  
LayeredHighlighter.LayerPainter sample code for javax.swing.text.LayeredHighlighter.LayerPainter definition code for javax.swing.text.LayeredHighlighter.LayerPainter Layered highlight renderer.
LayoutQueue sample code for javax.swing.text.LayoutQueue definition code for javax.swing.text.LayoutQueue A queue of text layout tasks.
MaskFormatter sample code for javax.swing.text.MaskFormatter definition code for javax.swing.text.MaskFormatter MaskFormatter is used to format and edit strings.
NavigationFilter sample code for javax.swing.text.NavigationFilter definition code for javax.swing.text.NavigationFilter NavigationFilter can be used to restrict where the cursor can be positioned.
NavigationFilter.FilterBypass sample code for javax.swing.text.NavigationFilter.FilterBypass definition code for javax.swing.text.NavigationFilter.FilterBypass Used as a way to circumvent calling back into the caret to position the cursor.
NumberFormatter sample code for javax.swing.text.NumberFormatter definition code for javax.swing.text.NumberFormatter NumberFormatter subclasses InternationalFormatter adding special behavior for numbers.
ParagraphView sample code for javax.swing.text.ParagraphView definition code for javax.swing.text.ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
PasswordView sample code for javax.swing.text.PasswordView definition code for javax.swing.text.PasswordView Implements a View suitable for use in JPasswordField UI implementations.
PlainDocument sample code for javax.swing.text.PlainDocument definition code for javax.swing.text.PlainDocument A plain document that maintains no character attributes.
PlainView sample code for javax.swing.text.PlainView definition code for javax.swing.text.PlainView Implements View interface for a simple multi-line text view that has text in one font and color.
Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias A typesafe enumeration to indicate bias to a position in the model.
Segment sample code for javax.swing.text.Segment definition code for javax.swing.text.Segment A segment of a character array representing a fragment of text.
SimpleAttributeSet sample code for javax.swing.text.SimpleAttributeSet definition code for javax.swing.text.SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
StringContent sample code for javax.swing.text.StringContent definition code for javax.swing.text.StringContent An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
StyleConstants sample code for javax.swing.text.StyleConstants definition code for javax.swing.text.StyleConstants 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.
StyleConstants.CharacterConstants sample code for javax.swing.text.StyleConstants.CharacterConstants definition code for javax.swing.text.StyleConstants.CharacterConstants This is a typesafe enumeration of the well-known attributes that contribute to a character style.
StyleConstants.ColorConstants sample code for javax.swing.text.StyleConstants.ColorConstants definition code for javax.swing.text.StyleConstants.ColorConstants This is a typesafe enumeration of the well-known attributes that contribute to a color.
StyleConstants.FontConstants sample code for javax.swing.text.StyleConstants.FontConstants definition code for javax.swing.text.StyleConstants.FontConstants This is a typesafe enumeration of the well-known attributes that contribute to a font.
StyleConstants.ParagraphConstants sample code for javax.swing.text.StyleConstants.ParagraphConstants definition code for javax.swing.text.StyleConstants.ParagraphConstants This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
StyleContext sample code for javax.swing.text.StyleContext definition code for javax.swing.text.StyleContext A pool of styles and their associated resources.
StyledEditorKit sample code for javax.swing.text.StyledEditorKit definition code for javax.swing.text.StyledEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
StyledEditorKit.AlignmentAction sample code for javax.swing.text.StyledEditorKit.AlignmentAction definition code for javax.swing.text.StyledEditorKit.AlignmentAction An action to set paragraph alignment.
StyledEditorKit.BoldAction sample code for javax.swing.text.StyledEditorKit.BoldAction definition code for javax.swing.text.StyledEditorKit.BoldAction An action to toggle the bold attribute.
StyledEditorKit.FontFamilyAction sample code for javax.swing.text.StyledEditorKit.FontFamilyAction definition code for javax.swing.text.StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
StyledEditorKit.FontSizeAction sample code for javax.swing.text.StyledEditorKit.FontSizeAction definition code for javax.swing.text.StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
StyledEditorKit.ForegroundAction sample code for javax.swing.text.StyledEditorKit.ForegroundAction definition code for javax.swing.text.StyledEditorKit.ForegroundAction An action to set foreground color.
StyledEditorKit.ItalicAction sample code for javax.swing.text.StyledEditorKit.ItalicAction definition code for javax.swing.text.StyledEditorKit.ItalicAction An action to toggle the italic attribute.
StyledEditorKit.StyledTextAction sample code for javax.swing.text.StyledEditorKit.StyledTextAction definition code for javax.swing.text.StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
StyledEditorKit.UnderlineAction sample code for javax.swing.text.StyledEditorKit.UnderlineAction definition code for javax.swing.text.StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
TableView sample code for javax.swing.text.TableView definition code for javax.swing.text.TableView 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 sample code for javax.swing.text.TabSet definition code for javax.swing.text.TabSet A TabSet is comprised of many TabStops.
TabStop sample code for javax.swing.text.TabStop definition code for javax.swing.text.TabStop This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
TextAction sample code for javax.swing.text.TextAction definition code for javax.swing.text.TextAction An Action implementation useful for key bindings that are shared across a number of different text components.
Utilities sample code for javax.swing.text.Utilities definition code for javax.swing.text.Utilities A collection of methods to deal with various text related activities.
View sample code for javax.swing.text.View definition code for javax.swing.text.View A very important part of the text package is the View class.
WrappedPlainView sample code for javax.swing.text.WrappedPlainView definition code for javax.swing.text.WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
ZoneView sample code for javax.swing.text.ZoneView definition code for javax.swing.text.ZoneView 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.
 

Exception Summary
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
ChangedCharSetException sample code for javax.swing.text.ChangedCharSetException definition code for javax.swing.text.ChangedCharSetException ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.