Modelers

org.topcased.modeler
Class ColorRegistry

java.lang.Object
  extended by org.topcased.modeler.ColorRegistry

public final class ColorRegistry
extends java.lang.Object

This registry manages all the allocated colors and dispose its when the current display is disposed.

creation : 8 oct. 2004


Method Summary
 org.eclipse.swt.graphics.Color get(org.eclipse.swt.graphics.RGB rgb)
          Returns the color associated with the given RGB object, or null if no such definition exists.
 org.eclipse.swt.graphics.Color get(java.lang.String symbolicName)
          Returns the color associated with the given symbolic color name, or null if no such definition exists.
static ColorRegistry getInstance()
          Returns the singleton registry instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ColorRegistry getInstance()
Returns the singleton registry instance

Returns:
the registry

get

public org.eclipse.swt.graphics.Color get(java.lang.String symbolicName)
Returns the color associated with the given symbolic color name, or null if no such definition exists.

Parameters:
symbolicName - symbolic color name
Returns:
the Color or null

get

public org.eclipse.swt.graphics.Color get(org.eclipse.swt.graphics.RGB rgb)
Returns the color associated with the given RGB object, or null if no such definition exists.

Parameters:
rgb - the rgb color
Returns:
the Color or null

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.