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.

View | Details | Raw Unified | Return to bug 216833
Collapse All | Expand All

(-)a/jumpto/src/org/netbeans/modules/jumpto/common/HighlightingNameFormatter.java (-4 / +2 lines)
Lines 98-104 Link Here
98
 */
98
 */
99
public class HighlightingNameFormatter {
99
public class HighlightingNameFormatter {
100
100
101
    private static final String COLOR_FORMAT_PATTERN = "<font style=\"background-color:%s; font-weight:bold; color:%s; white-space:nowrap\">%s</font>"; //NOI18N
101
    private static final String COLOR_FORMAT_PATTERN = "<font color=\"#%s\"style=\"white-space:nowrap\">%s</font>"; //NOI18N
102
    private static final String BOLD_FORMAT_PATTERN = "<b>%s</b>";    //NOI18N
102
    private static final String BOLD_FORMAT_PATTERN = "<b>%s</b>";    //NOI18N
103
    private String formatPattern;
103
    private String formatPattern;
104
104
Lines 175-186 Link Here
175
175
176
    @NonNull
176
    @NonNull
177
    public static HighlightingNameFormatter createColorFormatter(
177
    public static HighlightingNameFormatter createColorFormatter(
178
            @NonNull final Color bgColor,
179
            @NonNull final Color fgColor) {
178
            @NonNull final Color fgColor) {
180
        final String bgColorHighlight = Integer.toHexString(bgColor.getRGB()).substring(2);
181
        final String fgColorHighlight = Integer.toHexString(fgColor.getRGB()).substring(2);
179
        final String fgColorHighlight = Integer.toHexString(fgColor.getRGB()).substring(2);
182
        return new HighlightingNameFormatter(
180
        return new HighlightingNameFormatter(
183
            String.format(COLOR_FORMAT_PATTERN, bgColorHighlight, fgColorHighlight, "%s"));  //NOI18N
181
            String.format(COLOR_FORMAT_PATTERN, fgColorHighlight, "%s"));  //NOI18N
184
    }
182
    }
185
183
186
    @NonNull
184
    @NonNull
(-)a/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java (-2 / +3 lines)
Lines 657-663 Link Here
657
        private JList jList;
657
        private JList jList;
658
        private String searchText = "";
658
        private String searchText = "";
659
        private boolean caseSensitive;
659
        private boolean caseSensitive;
660
        private final HighlightingNameFormatter typeNameFormatter;
660
        private HighlightingNameFormatter typeNameFormatter;
661
661
662
        @SuppressWarnings("LeakingThisInConstructor")
662
        @SuppressWarnings("LeakingThisInConstructor")
663
        public Renderer(
663
        public Renderer(
Lines 735-741 Link Here
735
                            );
735
                            );
736
            bgSelectionColor = list.getSelectionBackground();
736
            bgSelectionColor = list.getSelectionBackground();
737
            fgSelectionColor = list.getSelectionForeground();
737
            fgSelectionColor = list.getSelectionForeground();
738
            this.typeNameFormatter = HighlightingNameFormatter.createBoldFormatter();
739
            nameFieldDocument.addDocumentListener(this);
738
            nameFieldDocument.addDocumentListener(this);
740
            caseSensitive.addActionListener(this);
739
            caseSensitive.addActionListener(this);
741
        }
740
        }
Lines 764-775 Link Here
764
                jlPkg.setForeground(fgSelectionColor);
763
                jlPkg.setForeground(fgSelectionColor);
765
                jlPrj.setForeground(fgSelectionColor);
764
                jlPrj.setForeground(fgSelectionColor);
766
                rendererComponent.setBackground(bgSelectionColor);
765
                rendererComponent.setBackground(bgSelectionColor);
766
                this.typeNameFormatter = HighlightingNameFormatter.createColorFormatter(fgSelectionColor);
767
            }
767
            }
768
            else {
768
            else {
769
                jlName.setForeground(fgColor);
769
                jlName.setForeground(fgColor);
770
                jlPkg.setForeground(fgColorLighter);
770
                jlPkg.setForeground(fgColorLighter);
771
                jlPrj.setForeground(fgColor);                
771
                jlPrj.setForeground(fgColor);                
772
                rendererComponent.setBackground( index % 2 == 0 ? bgColor : bgColorDarker );
772
                rendererComponent.setBackground( index % 2 == 0 ? bgColor : bgColorDarker );
773
                this.typeNameFormatter = HighlightingNameFormatter.createColorFormatter(bgSelectionColor);
773
            }
774
            }
774
            
775
            
775
            if ( value instanceof TypeDescriptor ) {
776
            if ( value instanceof TypeDescriptor ) {

Return to bug 216833