All of the Document classes you list have the same base functionality and each expands based on a niche that needs to be filled. Really, it's just a matter of realizing what you need to do and use the appropriate document type. For instance, if I am editing an HTML file, then I would use the HTMLDocument class.
I included a brief description of each of the Document classes you requested in your question below.
Document
The Document interface represents the
entire HTML or XML document.
Conceptually, it is the root of the
document tree, and provides the
primary access to the document's data.
This is the interface that all other Document types will inherit from. It provides the contract for all other Document types to follow.
AbstractDocument
This class implements a locking
mechanism for the document it allows
multiple readers or one writer, and
writers must wait until all observers
of the document have been notified of
a previous change before beginning
another mutation to the document.
This class allows you to work with different types of documents and uses a very lose ruleset. This class is more difficult to implement because it is so generic.
StyledDocument
Another interface that provides a contract for all styled documents. DefaultStyledDocument implements this interface, so we'll get to that next.
DefaultStyledDocument
A document that can be marked up with
character and paragraph styles in a
manner similar to the Rich Text
Format. The element structure for this
document represents style crossings
for style runs. These style runs are
mapped into a paragraph element
structure (which may reside in some
other structure). The style runs break
at paragraph boundaries since logical
styles are assigned to paragraph
boundaries.
DefaultStyledDocument allows you to place special characters within the document to help with formatting etc... Think Microsoft Word when you think about DefaultStyledDocument.
DocumentFilter
hen a Document containing a
DocumentFilter is modified (either
through insert or remove), it forwards
the appropriate method invocation to
the DocumentFilter.
This is an extremely useful class that "listens" for events to occur against your document (i.e. modification) and will perform an action when each event occurs.
PlainDocument
implements AbstractDocument and does not contain any kind of formatting special characters (Think notepad vs. Word). You should use this when you just want to store text (log file, etc.)
HTMLDocument
A document that models HTML. The
purpose of this model is to support
both browsing and editing.
HTMLDocument should be used when you are creating/modifying documents that contain HTML code and are intended to be viewed in a browser.