net.sf.statcvs.util
Class OutputUtils
java.lang.Object
net.sf.statcvs.util.OutputUtils
- public class OutputUtils
- extends 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
Method Summary |
static String |
escapeHtml(String text)
Escapes HTML meta characters "&", "<", ">" and turns "\n" line breaks
into HTML line breaks (" "); |
static Color |
getStringColor(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 |
OutputUtils
public OutputUtils()
getStringColor
public static Color getStringColor(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 String escapeHtml(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"