Roedy Green said:
It uses the Document interface for the model part which would be
implemented for example by HTMLDocument.
Yes, but in a quite profound sense, Jeff is right. JTextPane is NOT a
data structure. It's an interface, and with some effort can be
implemented to provide a way of accessing information from any number of
data structures.
For example, I have a back-burner project for work right now. We want
to implement Swing's Document to provide a transparent adapter to a W3C
DOM, such that the authoritative copy of the data is kept in the W3C
DOM, and the Swing Document class is only used to get data from there to
the JEditorPane for display. I could do the same thing for a different
data structure format that's not even remotely tree-based at all. If
so, you just make up the tree structure synthetically inside the model
adapter.
So no, JTextPane really isn't a data structure, nor does it imply any
specific data structure.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation