private static Color getInformationBackgroundColor(Display display) { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color background = colorRegistry.get(JFacePreferences.INFORMATION_BACKGROUND_COLOR); if (background == null) { return JFaceColors.getInformationViewerBackgroundColor(display); } return background; } }
private void setInfoSystemColor() { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { foreground = JFaceColors.getInformationViewerForegroundColor(fShell.getDisplay()); } Color background = colorRegistry.get(JFacePreferences.INFORMATION_BACKGROUND_COLOR); if (background == null) { background = JFaceColors.getInformationViewerBackgroundColor(fShell.getDisplay()); } setForegroundColor(foreground); setBackgroundColor(background); }
Color background= JFaceColors.getInformationViewerBackgroundColor(display); setColor(fShell, foreground, background);
private static void cacheColors(Display display) { BG_COLOR_RGB= JFaceColors.getInformationViewerBackgroundColor(display).getRGB(); FG_COLOR_RGB= JFaceColors.getInformationViewerForegroundColor(display).getRGB(); Color hyperlinkText= JFaceColors.getHyperlinkText(display); if (hyperlinkText != null) { LINK_COLOR_RGB= hyperlinkText.getRGB(); } Color activeHyperlinkText= JFaceColors.getActiveHyperlinkText(display); if (activeHyperlinkText != null) { ACTIVE_LINK_COLOR_RGB= activeHyperlinkText.getRGB(); } }
Color background= colorRegistry.get(JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR); if (background == null) { background= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault()); foreground= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());
background= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault()); foreground= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());