E
Elliot
Hi
I currently use a lot of code to parse and print a multi-page document
with a lot of Graphics2D objects. I need to display the same document
in a JTextPane. I would like to create a new class that could be used
by either the repaginate() and print() routines for the print job or
by a new paint() routine for the Swing components.
I would like to add the Graphics2D objects to a DefaultStyledDocument
and then add the styled document to a JTextPane. I think this would be
the fastest way to draw everything.
First, is it possible to add paint graphic 2d on a StyledDocument?
Second, I do not want to duplicate any of the existing complex parsing
code for the print job. I need to figure out how to create a new class
containing this logic that could be used by either the current
repaginate() and print() methods or new paint() method.
Any ideas would be really welcome.
Thanks
Elliot
I currently use a lot of code to parse and print a multi-page document
with a lot of Graphics2D objects. I need to display the same document
in a JTextPane. I would like to create a new class that could be used
by either the repaginate() and print() routines for the print job or
by a new paint() routine for the Swing components.
I would like to add the Graphics2D objects to a DefaultStyledDocument
and then add the styled document to a JTextPane. I think this would be
the fastest way to draw everything.
First, is it possible to add paint graphic 2d on a StyledDocument?
Second, I do not want to duplicate any of the existing complex parsing
code for the print job. I need to figure out how to create a new class
containing this logic that could be used by either the current
repaginate() and print() methods or new paint() method.
Any ideas would be really welcome.
Thanks
Elliot