Runtime

org.eclipse.gmf.runtime.diagram.ui.l10n
Class DiagramColorRegistry

java.lang.Object
  extended byorg.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry

public class DiagramColorRegistry
extends java.lang.Object

Manages color resources.


Method Summary
 Color getColor(java.lang.Integer id)
          Returns the Color based on the id.
 Color getColor(RGB rgb)
          Returns the Color based on the RGB.
static DiagramColorRegistry getInstance()
          Return singleton instance of the color registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DiagramColorRegistry getInstance()
Return singleton instance of the color registry.

Returns:
the color registry

getColor

public Color getColor(java.lang.Integer id)
Returns the Color based on the id. If the color does not exist in the cache, creates a new one and caches.

Parameters:
id - - the integer representation of a color
Returns:
Color

getColor

public Color getColor(RGB rgb)
Returns the Color based on the RGB. If the color does not exist in the cache, creates a new one and caches.

Returns:
Color

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.