Difference between the Document classes

Posted by takoi on Stack Overflow See other posts from Stack Overflow or by takoi
Published on 2010-05-24T14:28:53Z Indexed on 2010/05/24 14:31 UTC
Read the original article Hit count: 144

Filed under:
|

I've been reading the javadocs trying to grasp around the swing Document API but I cant get something sensible out of it because there's so many classes: Document, StyledDocument, AbstractDocument, DefaultStyledDocument, PlainDocument, HTMLDocument, and someone mentioned DocumentFilter. This question is more on a general basis so can someone give an overview of the differences between the implementations and when the different interfaces and abstracts are for?

For my specific case what I want to achieve is a data structure that will:

  • hold three lines of text only. And
  • attributes must not be per line or document. I will have a couple of thousand of these in some other structure so
  • overhead is important.

Anything that i can use for this or is it better to extend something? If so, what?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing