1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 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 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.jface.text.source; 12 13 import org.eclipse.swt.graphics.Color; 14 import org.eclipse.swt.graphics.RGB; 15 16 17 /** 18 * Manages SWT color objects. Until the <code>dispose</code> method is called, 19 * the same color object is returned for equal <code>RGB</code> values. 20 * <p> 21 * This interface may be implemented by clients. 22 * </p> 23 * 24 * @since 2.1 25 */ 26 public interface ISharedTextColors { 27 28 /** 29 * Returns the color object for the value represented by the given 30 * <code>RGB</code> object. 31 * 32 * @param rgb the RBG color specification 33 * @return the color object for the given RGB value 34 */ 35 Color getColor(RGB rgb); 36 37 /** 38 * Tells this object to dispose all its managed colors. 39 */ 40 void dispose(); 41 } 42