com.rapidminer.gui.plotter
Class ColorProvider

java.lang.Object
  extended by com.rapidminer.gui.plotter.ColorProvider

public class ColorProvider
extends java.lang.Object

This class delivers colors according to the user settings.

Author:
Ingo Mierswa

Constructor Summary
ColorProvider()
           
 
Method Summary
 java.awt.Color getMaxLegendColor()
           
 java.awt.Color getMinLegendColor()
           
 java.awt.Color getPointBorderColor(DataTable table, DataTableRow row, int column)
           
 java.awt.Color getPointColor(double value)
          Returns a color for the given value.
 java.awt.Color getPointColor(double value, int alpha)
          Returns a color for the given value.
 double getPointColorValue(DataTable table, DataTableRow row, int column, double min, double max)
          Helper methods which can be used to deliver a value for the point color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorProvider

public ColorProvider()
Method Detail

getMinLegendColor

public java.awt.Color getMinLegendColor()

getMaxLegendColor

public java.awt.Color getMaxLegendColor()

getPointColorValue

public double getPointColorValue(DataTable table,
                                 DataTableRow row,
                                 int column,
                                 double min,
                                 double max)
Helper methods which can be used to deliver a value for the point color. For nominal values with two classes, this method tries to search another column with a name xxx(name) and changes the color a bit to the opponent color if the values are not the same. This might be nice for example in case of a predicted value and a real value.


getPointBorderColor

public java.awt.Color getPointBorderColor(DataTable table,
                                          DataTableRow row,
                                          int column)

getPointColor

public java.awt.Color getPointColor(double value)
Returns a color for the given value. The value must be normalized, i.e. between zero and one.


getPointColor

public java.awt.Color getPointColor(double value,
                                    int alpha)
Returns a color for the given value. The value must be normalized, i.e. between zero and one. Please note that high alpha values are more transparent.



Copyright © 2001-2009 by Rapid-I