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; }
protected void internalDispose() { fText= null; fBrowser= null; if (fFontListener != null) { JFaceResources.getFontRegistry().removeListener(fFontListener); fFontListener= null; } }
@Override protected Color getForeground() { return JFaceResources.getColorRegistry().get( JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR); }
@Override public Object createResource(Device device) throws DeviceResourceException { Image result = createImage(false, device); if (result == null) { throw new DeviceResourceException(this); } return result; }
private synchronized ResourceManager getResourceManager() { if (fResourceManager == null) { fResourceManager = new LocalResourceManager(JFaceResources.getResources()); } return fResourceManager; }
/** * @see org.eclipse.ui.console.AbstractConsole#init() */ protected void init() { JFaceResources.getFontRegistry().addListener(propertyListener); }
/** * Returns the JFace's dialog font. Convenience method equivalent to * * <pre> * JFaceResources.getFontRegistry().get(JFaceResources.DIALOG_FONT) * </pre> * * @return the font */ public static Font getDialogFont() { return getFontRegistry().get(DIALOG_FONT); }
/** * Creates and returns a new image descriptor from a URL. * * @param url The URL of the image file. * @return a new image descriptor */ public static ImageDescriptor createFromURL(URL url) { if (url == null) { return getMissingImageDescriptor(); } return new URLImageDescriptor(url); }
/** * Returns the font descriptor for the JFace default font. * * @return the font descriptor for the JFace default font * @since 3.3 */ public FontDescriptor defaultFontDescriptor() { return FontDescriptor.createFrom(defaultFontData()); } }
/** * Undoes everything that was done by a call to {@link #createColor(RGB)}. * * @since 1.0 * * @param descriptor RGB value of the color to dispose */ public final void destroyColor(RGB descriptor) { destroyColor(new RGBColorDescriptor(descriptor)); }
@Override protected Color getBackground() { return JFaceResources.getColorRegistry().get( JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR); }
/** * Return the resourceManager used by this plug-in. * @return */ public ResourceManager getResourceManager() { if(resourceManager == null){ resourceManager = new LocalResourceManager(JFaceResources.getResources()); } return resourceManager; }
/** * Returns the JFace's header font. Convenience method equivalent to * * <pre> * JFaceResources.getFontRegistry().get(JFaceResources.HEADER_FONT) * </pre> * * @return the font */ public static Font getHeaderFont() { return getFontRegistry().get(HEADER_FONT); }
/** * @param display the display the color is from * @return the default color to use for displaying hyperlinks. * @see ColorRegistry#get(String) * @see JFacePreferences#HYPERLINK_COLOR */ public static Color getHyperlinkText(Display display) { return JFaceResources.getColorRegistry().get( JFacePreferences.HYPERLINK_COLOR); }
/** * Return a resource manager for the receiver. * * @return {@link ResourceManager} */ private ResourceManager getResourceManager() { if (resourceManager == null) resourceManager = new LocalResourceManager(JFaceResources .getResources()); return resourceManager; }
/** * Returns the JFace's header font. Convenience method equivalent to * * <pre> * JFaceResources.getFontRegistry().get(JFaceResources.HEADER_FONT) * </pre> * * @return the font */ public static Font getHeaderFont() { return getFontRegistry().get(HEADER_FONT); }
/** * @param display the display the color is from * @return the default color to use for displaying active hyperlinks. * @see ColorRegistry#get(String) * @see JFacePreferences#ACTIVE_HYPERLINK_COLOR */ public static Color getActiveHyperlinkText(Display display) { return JFaceResources.getColorRegistry().get( JFacePreferences.ACTIVE_HYPERLINK_COLOR); }
@Override public void applyStyles(final TextStyle textStyle) { textStyle.foreground = JFaceResources.getColorRegistry().get(JFacePreferences.COUNTER_COLOR); } };
/** * @param display the display the color is from * @return the default color to use for displaying errors. * @see ColorRegistry#get(String) * @see JFacePreferences#ERROR_COLOR */ public static Color getErrorText(Display display) { return JFaceResources.getColorRegistry().get( JFacePreferences.ERROR_COLOR); }
/** * @param display * the display the color is from * @return the default color to use for displaying active hyperlinks, or * <code>null</code> if the color definition does not exists. * @see ColorRegistry#get(String) * @see JFacePreferences#ACTIVE_HYPERLINK_COLOR */ public static Color getActiveHyperlinkText(Display display) { return JFaceResources.getColorRegistry().get( JFacePreferences.ACTIVE_HYPERLINK_COLOR); }