diff options
author | Alexander Kurtakov | 2013-10-02 07:49:45 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2013-10-02 11:45:30 +0000 |
commit | 3bdc32d39608349803f647e491f9d68bc3b3b8d0 (patch) | |
tree | c9576fd4e00ac07f5228a40295ab26e9393f89d8 | |
parent | 5ca20cea23aec08024895766e87af281b697399b (diff) | |
download | org.eclipse.linuxtools-3bdc32d39608349803f647e491f9d68bc3b3b8d0.tar.gz org.eclipse.linuxtools-3bdc32d39608349803f647e491f9d68bc3b3b8d0.tar.xz org.eclipse.linuxtools-3bdc32d39608349803f647e491f9d68bc3b3b8d0.zip |
systemtap: Use system colors where possible.
If one creates new Color it needs to be disposed manually which is not
an option with these static fields. For now just replace with system
color which are properly disposed by SWT itself. Not fixing the issue
entirely but at least minimizes it.
Change-Id: I0f9fe214df1c5d8f14f8e471e4ffc029f0c36583
Reviewed-on: https://git.eclipse.org/r/16946
Tested-by: Hudson CI
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
IP-Clean: Alexander Kurtakov <akurtako@redhat.com>
Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java index c58dd80f55..32b20f2caf 100644 --- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java +++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java @@ -46,18 +46,18 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL protected int xseries; protected int[] yseries; - protected static final Color WHITE = new Color(Display.getDefault(), 255, 255, 255); - protected static final Color BLACK = new Color(Display.getDefault(), 0, 0, 0); - protected static final Color RED = new Color(Display.getDefault(), 255, 0, 0); + protected static final Color WHITE = Display.getDefault().getSystemColor(SWT.COLOR_WHITE); + protected static final Color BLACK = Display.getDefault().getSystemColor(SWT.COLOR_BLACK); + protected static final Color RED = Display.getDefault().getSystemColor(SWT.COLOR_RED); protected static final Color[] COLORS = { - new Color(Display.getDefault(), 255, 0, 0), - new Color(Display.getDefault(), 0, 255, 0), - new Color(Display.getDefault(), 0, 0, 255), - new Color(Display.getDefault(), 255, 255, 0), - new Color(Display.getDefault(), 255, 0, 255), - new Color(Display.getDefault(), 0, 255, 255), - new Color(Display.getDefault(), 0, 0, 0), + RED, + Display.getDefault().getSystemColor(SWT.COLOR_GREEN), + Display.getDefault().getSystemColor(SWT.COLOR_BLUE), + Display.getDefault().getSystemColor(SWT.COLOR_YELLOW), + Display.getDefault().getSystemColor(SWT.COLOR_MAGENTA), + Display.getDefault().getSystemColor(SWT.COLOR_CYAN), + BLACK, new Color(Display.getDefault(), 64, 128, 128), new Color(Display.getDefault(), 255, 165, 0), new Color(Display.getDefault(), 128, 128, 128), |