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 62762 - It's impossible to override customized colors in JEditorPane
Summary: It's impossible to override customized colors in JEditorPane
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks: 61801 62485 62564
  Show dependency tree
 
Reported: 2005-08-22 12:06 UTC by Martin Entlicher
Modified: 2011-08-10 13:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2005-08-22 12:06:22 UTC
In debugger module, we have several dialogs with one-line JEditorPanes with Java
mime type, because we need to provide code-completion.
However, the ugly side-effect of this is, that customized colors are propagated
into that JEditorPane. And also the active line is displayed, which has no
purpose in a single-line document.

This looks strange, because other fields in the dialogs are white. We need some
way to use the default colors and also supress the active line highlighting.
Comment 1 Martin Entlicher 2005-08-22 12:08:20 UTC
Submitted as an enhancement, but we need this to be implemented for 4.2, because
of issues #61801, #62485 and #62564.
Comment 2 Vitezslav Stejskal 2006-12-04 23:21:10 UTC
We are thinking of supporting this in some way in the new Highlighting SPI. What
highlightings would you wanna leave on your JEPs - syntax coloring only, maybe
also new java semantic coloring, anything else? Are your usecases going to be
more like 'I want everything except of active line highlighting' or would they
be more like 'I want java syntax coloring only'?
Comment 3 Vitezslav Stejskal 2008-03-19 17:34:40 UTC
Particular highlighting layers can be filtered out by setting a client property on you JEditorPane. See javadoc for
details,
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/package-summary.html#usecase5

I'm not closing this, because I think that in general editor coloring profiles should not be applied to nomadic
JEditorPanes unless explicitly specified.
Comment 4 Miloslav Metelka 2011-08-10 13:43:39 UTC
With the new view hierarchy respects if the component.setFont() setForeground() setBackground() are set explicitly.