blob: 66dce7b8c72d568c3b63e9dfe3d0a0054ca9c9f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*******************************************************************************
* Copyright (c) 2006 Sybase, Inc. and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Sybase, Inc. - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.pagedesigner.css2.color;
/**
* @author mengbo
*/
public class CSSColorManager {
private static CSSColorManager _instance;
private CSSColorManager() {
// no external instantiation
}
/**
* @return the single instance
*/
public static CSSColorManager getInstance() {
if (_instance == null) {
_instance = new CSSColorManager();
}
return _instance;
}
/**
* return Color or RGB. If return color, then the returned color is system
* color, caller should NOT dispose the returned color
*
* @param cssText
* @return the color object for cssText
*/
public Object getColor(String cssText) {
return CSSColorConverter.getInstantce().getCSSColor(cssText);
}
}
|