Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 39070 Details for
Bug 135344
ColorConstants colors are initialized using Display.getCurrent().getSystemColor()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
colorpatch.txt (text/plain), 4.93 KB, created by
Randy Hudson
on 2006-04-20 13:29:49 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Randy Hudson
Created:
2006-04-20 13:29:49 EDT
Size:
4.93 KB
patch
obsolete
>Index: src/org/eclipse/draw2d/ColorConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/ColorConstants.java,v >retrieving revision 1.12 >diff -u -r1.12 ColorConstants.java >--- src/org/eclipse/draw2d/ColorConstants.java 10 Apr 2006 20:43:30 -0000 1.12 >+++ src/org/eclipse/draw2d/ColorConstants.java 20 Apr 2006 17:18:18 -0000 >@@ -19,100 +19,120 @@ > */ > public interface ColorConstants { > >+class Internal { >+ private static Color getSystemColor(final int which) { >+ Display display = Display.getCurrent(); >+ if (display != null) >+ return display.getSystemColor(which); >+ display = Display.getDefault(); >+ final Color result[] = new Color[1]; >+ display.syncExec(new Runnable() { >+ public void run() { >+ synchronized (result) { >+ result[0] = Display.getCurrent().getSystemColor(which); >+ } >+ } >+ }); >+ synchronized (result) { >+ return result[0]; >+ } >+ } >+} >+ > /** > * @see SWT#COLOR_WIDGET_HIGHLIGHT_SHADOW > */ > Color buttonLightest >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); > /** > * @see SWT#COLOR_WIDGET_BACKGROUND > */ > Color button >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); > /** > * @see SWT#COLOR_WIDGET_NORMAL_SHADOW > */ > Color buttonDarker >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); > /** > * @see SWT#COLOR_WIDGET_DARK_SHADOW > */ > Color buttonDarkest >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW); > > /** > * @see SWT#COLOR_LIST_BACKGROUND > */ > Color listBackground >- = Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND); >+ = Internal.getSystemColor(SWT.COLOR_LIST_BACKGROUND); > /** > * @see SWT#COLOR_LIST_FOREGROUND > */ > Color listForeground >- = Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_LIST_FOREGROUND); > > /** > * @see SWT#COLOR_WIDGET_BACKGROUND > */ > Color menuBackground >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); > /** > * @see SWT#COLOR_WIDGET_FOREGROUND > */ > Color menuForeground >- = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND); > /** > * @see SWT#COLOR_LIST_SELECTION > */ > Color menuBackgroundSelected >- = Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION); >+ = Internal.getSystemColor(SWT.COLOR_LIST_SELECTION); > /** > * @see SWT#COLOR_LIST_SELECTION_TEXT > */ > Color menuForegroundSelected >- = Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT); >+ = Internal.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT); > > /** > * @see SWT#COLOR_TITLE_BACKGROUND > */ > Color titleBackground >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_BACKGROUND); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_BACKGROUND); > /** > * @see SWT#COLOR_TITLE_BACKGROUND_GRADIENT > */ > Color titleGradient >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT); > /** > * @see SWT#COLOR_TITLE_FOREGROUND > */ > Color titleForeground >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_FOREGROUND); > /** > * @see SWT#COLOR_TITLE_INACTIVE_FOREGROUND > */ > Color titleInactiveForeground >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); > /** > * @see SWT#COLOR_TITLE_INACTIVE_FOREGROUND > */ > Color titleInactiveBackground >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); > /** > * @see SWT#COLOR_TITLE_INACTIVE_FOREGROUND > */ > Color titleInactiveGradient >- = Display.getDefault().getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND); > > /** > * @see SWT#COLOR_INFO_FOREGROUND > */ > Color tooltipForeground >- = Display.getDefault().getSystemColor(SWT.COLOR_INFO_FOREGROUND); >+ = Internal.getSystemColor(SWT.COLOR_INFO_FOREGROUND); > /** > * @see SWT#COLOR_INFO_BACKGROUND > */ > Color tooltipBackground >- = Display.getDefault().getSystemColor(SWT.COLOR_INFO_BACKGROUND); >+ = Internal.getSystemColor(SWT.COLOR_INFO_BACKGROUND); > > /* > * Misc. colors
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 135344
:
39070
|
39089