Lines 60-66
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; |
|
|
64 |
import org.netbeans.modules.notifications.center.NotificationCenterManager; |
63 |
import org.netbeans.modules.notifications.center.NotificationCenterManager; |
65 |
import org.openide.awt.Notification; |
64 |
import org.openide.awt.Notification; |
66 |
import org.openide.awt.NotificationDisplayer.Category; |
65 |
import org.openide.awt.NotificationDisplayer.Category; |
Lines 239-249
Link Here
|
239 |
} |
238 |
} |
240 |
|
239 |
|
241 |
private JComponent createDetails(String text, ActionListener action) { |
240 |
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 |
|
245 |
try { |
241 |
try { |
246 |
text = (action == null ? "<html>" : "<html><font color=" + toRgbText(c.getRGB()) + "><a href=\"_blank\">") + XMLUtil.toElementContent(text); //NOI18N |
242 |
text = (action == null ? "<html>" : "<html><a href=\"_blank\">") + XMLUtil.toElementContent(text); //NOI18N |
247 |
} catch (CharConversionException ex) { |
243 |
} catch (CharConversionException ex) { |
248 |
throw new IllegalArgumentException(ex); |
244 |
throw new IllegalArgumentException(ex); |
249 |
} |
245 |
} |
Lines 285-297
Link Here
|
285 |
private JComponent createDate(Calendar dateCreated) { |
281 |
private JComponent createDate(Calendar dateCreated) { |
286 |
return new JLabel(Utils.getFullFormatedDate(dateCreated)); |
282 |
return new JLabel(Utils.getFullFormatedDate(dateCreated)); |
287 |
} |
283 |
} |
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 |
} |
297 |
} |
284 |
} |