sonification.dataimport.visbards_resourcetoolkit.repository.category
Class DefaultColorPalette

java.lang.Object
  extended by sonification.dataimport.visbards_resourcetoolkit.repository.category.DefaultColorPalette
All Implemented Interfaces:
ColorPalette

public class DefaultColorPalette
extends java.lang.Object
implements ColorPalette

A simple color palette implementation. Constructed with a base color and adjusts its values based on the ratio.


Constructor Summary
DefaultColorPalette()
           
DefaultColorPalette(java.awt.Color base)
           
DefaultColorPalette(java.awt.Color start, java.awt.Color end)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.awt.Color getColor(float ratio)
          Returns the color for the given ratio.
 java.awt.Color getEndColor()
           
 java.awt.Color getStartColor()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultColorPalette

public DefaultColorPalette(java.awt.Color start,
                           java.awt.Color end)

DefaultColorPalette

public DefaultColorPalette(java.awt.Color base)

DefaultColorPalette

public DefaultColorPalette()
Method Detail

getStartColor

public java.awt.Color getStartColor()

getEndColor

public java.awt.Color getEndColor()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getColor

public java.awt.Color getColor(float ratio)
Returns the color for the given ratio.

Specified by:
getColor in interface ColorPalette