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 246199
Collapse All | Expand All

(-)a/notifications/src/org/netbeans/modules/notifications/NotificationImpl.java (-1 / +14 lines)
Lines 60-65 Link Here
60
import javax.swing.JComponent;
60
import javax.swing.JComponent;
61
import javax.swing.JLabel;
61
import javax.swing.JLabel;
62
import javax.swing.JPanel;
62
import javax.swing.JPanel;
63
import javax.swing.UIManager;
63
import org.netbeans.modules.notifications.center.NotificationCenterManager;
64
import org.netbeans.modules.notifications.center.NotificationCenterManager;
64
import org.openide.awt.Notification;
65
import org.openide.awt.Notification;
65
import org.openide.awt.NotificationDisplayer.Category;
66
import org.openide.awt.NotificationDisplayer.Category;
Lines 238-245 Link Here
238
    }
239
    }
239
240
240
    private JComponent createDetails(String text, ActionListener action) {
241
    private JComponent createDetails(String text, ActionListener action) {
242
        
243
        Color c = UIManager.getColor("nb.html.link.foreground") == null ? Color.BLUE : UIManager.getColor("nb.html.link.foreground");
244
        
241
        try {
245
        try {
242
            text = (action == null ? "<html>" : "<html><a href=\"_blank\">") + XMLUtil.toElementContent(text); //NOI18N
246
            text = (action == null ? "<html>" : "<html><font color=" + toRgbText(c.getRGB()) + "><a href=\"_blank\">") + XMLUtil.toElementContent(text); //NOI18N
243
        } catch (CharConversionException ex) {
247
        } catch (CharConversionException ex) {
244
            throw new IllegalArgumentException(ex);
248
            throw new IllegalArgumentException(ex);
245
        }
249
        }
Lines 281-284 Link Here
281
    private JComponent createDate(Calendar dateCreated) {
285
    private JComponent createDate(Calendar dateCreated) {
282
        return new JLabel(Utils.getFullFormatedDate(dateCreated));
286
        return new JLabel(Utils.getFullFormatedDate(dateCreated));
283
    }
287
    }
288
    
289
    private static String toRgbText(int rgb) {
290
        if (rgb > 0xFFFFFF)
291
            rgb = 0xFFFFFF;
292
        if (rgb < 0)
293
            rgb = 0;
294
        String str = "000000" + Integer.toHexString(rgb); //NOI18N
295
        return "#" + str.substring(str.length() - 6); //NOI18N
296
    }
284
}
297
}

Return to bug 246199