org.infoglue.deliver.util.graphics
Class ColorHelper

java.lang.Object
  extended by org.infoglue.deliver.util.graphics.ColorHelper

public class ColorHelper
extends java.lang.Object

This class is an attempt to give template-coders access to the Color-class in some ways. Basically used to enable good control in the templates.


Constructor Summary
ColorHelper()
           
 
Method Summary
 java.awt.Color getColor(int r, int g, int b)
          Used to get a color-object
static java.awt.Color getColor(java.lang.String colonSeparatedRGBA)
          Creates a Color object from a comma separated string like "12:34:6:154" values 0-255 and in order R,G,B,A
static java.awt.Color getColor(java.lang.String separatedRGBA, java.lang.String delimiter)
          Creates a Color object from a separated string like "12-34-6-154" values 0-255 and in order R,G,B,A
 java.awt.Color getHexColor(java.lang.String hexadecimalValue)
          Used to create a new color-object by hex-values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorHelper

public ColorHelper()
Method Detail

getColor

public java.awt.Color getColor(int r,
                               int g,
                               int b)
Used to get a color-object


getHexColor

public java.awt.Color getHexColor(java.lang.String hexadecimalValue)
Used to create a new color-object by hex-values.


getColor

public static java.awt.Color getColor(java.lang.String colonSeparatedRGBA)
Creates a Color object from a comma separated string like "12:34:6:154" values 0-255 and in order R,G,B,A

Parameters:
colonSeparatedRGBA - a string
Returns:
a Color object

getColor

public static java.awt.Color getColor(java.lang.String separatedRGBA,
                                      java.lang.String delimiter)
Creates a Color object from a separated string like "12-34-6-154" values 0-255 and in order R,G,B,A

Parameters:
separatedRGBA - a string
delimiter - a delimiter
Returns:
a Color object


Copyright © 2005 InfoGlue.org All Rights Reserved.