net.sf.statcvs.util
Class OutputUtils

java.lang.Object
  extended bynet.sf.statcvs.util.OutputUtils

public class OutputUtils
extends java.lang.Object

Utility class for output related stuff.

Version:
$Id: OutputUtils.java,v 1.6 2003/04/15 23:47:25 cyganiak Exp $
Author:
Richard Cyganiak

Constructor Summary
OutputUtils()
           
 
Method Summary
static java.lang.String escapeHtml(java.lang.String text)
          Escapes HTML meta characters "&", "<", ">" and turns "\n" line breaks into HTML line breaks ("
");
static java.awt.Color getStringColor(java.lang.String s)
          Returns a distinct Color for a String argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputUtils

public OutputUtils()
Method Detail

getStringColor

public static java.awt.Color getStringColor(java.lang.String s)
Returns a distinct Color for a String argument. The algorithm tries to provide different colors for similar strings, and will return equal colors for equal strings. The colors will all have similar brightness and maximum intensity. Useful for chart coloring.

Parameters:
s - a String to get a color for
Returns:
a distinct Color for a String argument. The algorithm tries to provide different colors for similar strings, and will return equal colors for equal strings. The colors will all have similar brightness and maximum intensity. Useful for chart coloring.

escapeHtml

public static java.lang.String escapeHtml(java.lang.String text)
Escapes HTML meta characters "&", "<", ">" and turns "\n" line breaks into HTML line breaks ("
");

Parameters:
text - some string, for example "x > 0 && y < 100"
Returns:
HTML-escaped string, for example "x > 0 && y < 100"