/** * Sets the viewer's foreground color to the given RGB value. * If the value is <code>null</code> the system's default foreground color is used. * @param foreground the foreground color or <code>null</code> to use the system's default foreground color * @since 2.0 */ public void setForegroundColor(RGB foreground) { fIsUsingSystemForeground= (foreground == null); fForeground= foreground; updateColors(null); }
/** * Sets the viewer's background color to the given RGB value. * If the value is <code>null</code> the system's default background color is used. * @param background the background color or <code>null</code> to use the system's default background color * @since 2.0 */ public void setBackgroundColor(RGB background) { fIsUsingSystemBackground= (background == null); fBackground= background; updateColors(null); }
/** * Sets the viewer's background color to the given RGB value. * If the value is <code>null</code> the system's default background color is used. * @param background the background color or <code>null</code> to use the system's default background color * @since 2.0 */ public void setBackgroundColor(RGB background) { fPollSystemBackground= (background == null); fBackground= background; updateColors(null); }
/** * Sets the viewer's foreground color to the given RGB value. * If the value is <code>null</code> the system's default foreground color is used. * @param foreground the foreground color or <code>null</code> to use the system's default foreground color * @since 2.0 */ public void setForegroundColor(RGB foreground) { fPollSystemForeground= (foreground == null); fForeground= foreground; updateColors(null); }
private void setColors() { fIsUsingSystemBackground= fPreferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT); if (!fIsUsingSystemBackground) fBackground= createColor(fPreferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND); fIsUsingSystemForeground= fPreferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT); if (!fIsUsingSystemForeground) fForeground= createColor(fPreferenceStore, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND); updateColors(null); }
private void checkForColorUpdate(Display display) { if (fPollSystemForeground) { RGB fg= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB(); if (fForeground == null || !fg.equals(fForeground)) { fForeground= fg; updateColors(display); } } if (fPollSystemBackground) { RGB bg= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB(); if (fBackground == null || !bg.equals(fBackground)) { fBackground= bg; updateColors(display); } } }
private void checkForColorUpdate(Display display) { if (fIsUsingSystemBackground) { RGB bg= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB(); if (!bg.equals(getBackground(display))) { updateColors(display); } } }
updateColors(null); invalidateLines(); invalidateTextPresentation();
updateColors(null); invalidateLines(); invalidateTextPresentation();