private static Color getInformationForegroundColor(Display display) { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { return JFaceColors.getInformationViewerForegroundColor(display); } return foreground; }
public AntModelLabelProvider() { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); normalForeground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (normalForeground == null) { normalForeground = JFaceColors.getInformationViewerForegroundColor(Display.getDefault()); } defaultForeground = colorRegistry.get(JFacePreferences.ACTIVE_HYPERLINK_COLOR); if (defaultForeground == null) { defaultForeground = JFaceColors.getInformationViewerForegroundColor(Display.getDefault()); } }
Color fgcolor = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (fgcolor == null) { fgcolor = JFaceColors.getInformationViewerForegroundColor(Display.getDefault()); bgcolor = JFaceColors.getInformationViewerForegroundColor(Display.getDefault());
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); }
Display display= fShell.getDisplay(); Color foreground= JFaceColors.getInformationViewerForegroundColor(display); 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(); } }