This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205953 - BaseDocument.print uses DrawEngine
Summary: BaseDocument.print uses DrawEngine
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal (vote)
Assignee: Miloslav Metelka
Depends on: 205707 202230
  Show dependency tree
Reported: 2011-12-05 16:11 UTC by emi
Modified: 2016-07-07 07:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description emi 2011-12-05 16:11:03 UTC
BaseDocument.print(PrintContainer) still exists but uses the old DrawEngine (and on my unit test, it crashes).

Will that be migrated to PrintUtils or something from the View API?

I see that HtmlPrintContainer has addLines(List<AttributedCharacterIterator>) but that's not part of the PrintContainer signature. Shouldn't addLines() be moved into some AbstractPrintContainer so it can be reused by other PrintContainer-s?

I would need it, for example, to produce RTF output via a custom PrintContainer implementation.

I have a patch which just created a static HtmlPrintContainer.newAddLines(PrintContainer pc, Font defaultFont, Color defaultColor, Color defaultBackgroundColor, List<AttributedCharacterIterator> lines) method out of the original addLines(List<AttributedCharacterIterator> lines) method. This way I am still able to use the other PrintContainer, but it's just a workaround.
Comment 1 David Strupl 2012-11-06 15:18:42 UTC
Should this still be kept opened?
Comment 2 Martin Balin 2016-07-07 07:26:31 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss