\r
package org.eclipse.linuxtools.tmf.ui.views.colors;\r
\r
-import org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode;\r
+import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
import org.eclipse.swt.SWT;\r
import org.eclipse.swt.graphics.Color;\r
import org.eclipse.swt.graphics.RGB;\r
import org.eclipse.swt.widgets.Display;\r
import org.eclipse.ui.themes.ColorUtil;\r
\r
+/**\r
+ * Application code must explicitly invoke the ColorSetting.dispose() method to release the operating system\r
+ * resources managed by each instance when those instances are no longer required. \r
+ */\r
+\r
public class ColorSetting {\r
\r
private RGB fForegroundRGB;\r
private int fTickColorIndex;\r
private ITmfFilterTreeNode fFilter;\r
\r
+ /**\r
+ * You must dispose the color setting when it is no longer required.\r
+ */\r
public ColorSetting(RGB foreground, RGB background, int tickColorIndex, ITmfFilterTreeNode filter) {\r
fForegroundRGB = foreground;\r
fBackgroundRGB = background;\r
fBackgroundRGB, display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB()));\r
}\r
\r
+ /**\r
+ * Dispose the color setting resources\r
+ */\r
+ public void dispose() {\r
+ fForegroundColor.dispose();\r
+ fBackgroundColor.dispose();\r
+ fDimmedForegroundColor.dispose();\r
+ fDimmedBackgroundColor.dispose();\r
+ }\r
+ \r
/**\r
* @return the foreground\r
*/\r