1 /**********************************************************************
2 * Copyright (c) 2005, 2008, 2011 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 * $Id: ColorImpl.java,v 1.3 2008/01/24 02:28:50 apnan Exp $
10 * IBM - Initial API and implementation
11 * Bernd Hufmann - Updated for TMF
12 **********************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.impl
;
15 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.IColor
;
16 import org
.eclipse
.swt
.graphics
.Color
;
17 import org
.eclipse
.swt
.widgets
.Display
;
23 public class ColorImpl
implements IColor
{
25 protected Color col
= null;
26 protected boolean manageColor
= true;
28 public ColorImpl(Display display
, int r
, int g
, int b
) {
29 col
= new Color(display
, r
, g
, b
);
32 protected ColorImpl(Color color
) {
37 public static ColorImpl
getSystemColor(int color
) {
38 return new ColorImpl(Display
.getDefault().getSystemColor(color
));
42 public Object
getColor() {
47 public void dispose() {
48 if ((col
!= null) && (manageColor
))
This page took 0.031746 seconds and 6 git commands to generate.