org.radrails.rails.internal.ui
Class RailsUIColorProvider

java.lang.Object
  extended byorg.radrails.rails.internal.ui.RailsUIColorProvider

public class RailsUIColorProvider
extends java.lang.Object

Color provider for rails ui plugin.

Author:
mkent

Method Summary
 void dispose()
          Dispose the color resources held by the provider.
 org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)
          Creates a Color from the given RGB value.
 org.eclipse.swt.graphics.Color getColor(java.lang.String rgb)
          Creates a Color from the given string RGB value.
 org.eclipse.swt.graphics.Color getColorFromPreference(java.lang.String prefId)
          Creates a Color from a preference located in the RailsUIPlugin preference store.
static RailsUIColorProvider getInstance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RailsUIColorProvider getInstance()
Returns:
the singleton instance of the color provider

dispose

public void dispose()
Dispose the color resources held by the provider.


getColor

public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)
Creates a Color from the given RGB value.

Parameters:
rgb - the RGB value of the color
Returns:
a Color object

getColor

public org.eclipse.swt.graphics.Color getColor(java.lang.String rgb)
Creates a Color from the given string RGB value.

Parameters:
rgb - the string RGB value
Returns:
a Color object

getColorFromPreference

public org.eclipse.swt.graphics.Color getColorFromPreference(java.lang.String prefId)
Creates a Color from a preference located in the RailsUIPlugin preference store.

Parameters:
prefId - the identifier of the preference
Returns:
a Color object