org.hackystat.projectbrowser.page.telemetry.datapanel
Class RandomColorGenerator

java.lang.Object
  extended by org.hackystat.projectbrowser.page.telemetry.datapanel.RandomColorGenerator

public class RandomColorGenerator
extends java.lang.Object

Color generator to generate colors with maximum distinguish.

Author:
Shaoxuan Zhang

Constructor Summary
RandomColorGenerator()
           
 
Method Summary
static java.util.List<java.awt.Color> generateRandomColor(int n)
          Generate n random colors, guarantee them have maximum difference from each other.
static java.util.List<java.lang.String> generateRandomColorInHex(int n)
          Generate n random colors as Strings in RRGGBB format, guarantee them have maximum difference from each other.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomColorGenerator

public RandomColorGenerator()
Method Detail

generateRandomColor

public static java.util.List<java.awt.Color> generateRandomColor(int n)
Generate n random colors, guarantee them have maximum difference from each other.

Parameters:
n - the number of colors to generate.
Returns:
a list of Color instances.

generateRandomColorInHex

public static java.util.List<java.lang.String> generateRandomColorInHex(int n)
Generate n random colors as Strings in RRGGBB format, guarantee them have maximum difference from each other.

Parameters:
n - the number of colors to generate.
Returns:
a list of Strings that represent the colors.