Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hi, I got some questions about javax.swing.text.DefaultStyledDocument. * Is it possible to use DefaultStyledDocument with own implementations (say MyElement) of the Element interface? MyElement implements Element, AttributeSet and MutableAttributeSet (just like AbstractDocument.AbstractElement) but not AbstractDocument.AbstractElement itself. Most of the public and protected methods of DefaultStyledDocument use interface-types, only the method createDefaultRoot returns an AbstractDocument.AbstractElement. As far as I see, this method is called in the constructor in DefaultStyledDocument. * Does anyone know what exactly happens in the constructor? Then I could implement my own constructor that does not use the createRootElement method, but a corresponding one that returns of type MyElement? * Does DefaultStyledDocument really need Elements of type AbstractDocument.AbstractElement for other operations? Background: Why not use an inheritant of AbstractDocument.AbstractElement? * Has anyone detailed information about DefaultStyledDocument especially how it works internally? * If this one will not work: Does anyone have information about ElementBuffer and ElementSpec (I've already read the ElementBuffer atricle on the swing connection) * Is there anyone who has some experience on DefaultStyledDocument and can advise me to skip this whole DefaultStyledDocument-thing and reimplement the StyledDocument interface? I need all this stuff for my Diplomarbeit (master thesis) in computer sciences which I study at the Frankfurt university, Germany. Thank you *very*very* much in advance, Replies: |
Sponsored Links
|