JIDE 3.5.15

com.jidesoft.colormap
Class SimpleColorMap

java.lang.Object
  extended by com.jidesoft.colormap.AbstractColorMap
      extended by com.jidesoft.colormap.SimpleColorMap
All Implemented Interfaces:
ColorMap, MutableColorMap

public class SimpleColorMap
extends AbstractColorMap
implements MutableColorMap

Default data model for color maps.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jidesoft.colormap.ColorMap
ColorMap.Assignments, ColorMap.Matching
 
Field Summary
 
Fields inherited from interface com.jidesoft.colormap.ColorMap
PROPERTY_ASSIGNMENTS, PROPERTY_BRIGHTNESS, PROPERTY_COLORCOUNT, PROPERTY_INTERVAL, PROPERTY_INVERTED, PROPERTY_MATCHING, PROPERTY_NULLCOLOR, PROPERTY_OVERCOLOR, PROPERTY_PALETTE, PROPERTY_SATURATION, PROPERTY_UNDERCOLOR
 
Constructor Summary
SimpleColorMap(MutableInterval interval, MutablePalette palette)
           
SimpleColorMap(Set values, boolean cyclic, MutablePalette palette)
           
 
Method Summary
 void assignColors(Iterable<Object> values)
           
 void assignColors(Object... values)
           
 void assignColors(Set values, boolean cyclic)
           
 void clearAssignedColor()
           
 Set<Object> getAssignedValues()
           
 int getBrightness()
           
 Color getColor(Object value)
           
 int getColorCount()
           
protected  double getHighestFraction()
           
 MutableInterval getInterval()
           
protected  double getLowestFraction()
           
 Color getNullColor()
          Get color to be used for null values.
 Color getOverflowColor()
          Get color to be used for high out-of-range values
 MutablePalette getPalette()
           
 int getSaturation()
           
 Color getUnderflowColor()
          Get color to be used for low out-of-range values
 boolean isInverted()
           
 boolean isOverflowColorSet()
           
 boolean isUnderflowColorSet()
           
 void setAssignments(ColorMap.Assignments assignments)
           
 void setBrightness(int brightness)
           
 void setColor(Object value, Color color)
           
 void setColorCount(int colorCount)
           
 void setInterval(MutableInterval interval)
           
 void setInverted(boolean inverted)
           
 void setMatching(ColorMap.Matching matching)
           
 void setNullColor(Color nullColor)
           
 void setOverColor(Color overColor)
           
 void setPalette(MutablePalette palette)
           
 void setProperty(String property, Object value)
           
 void setSaturation(int saturation)
           
 void setUnderColor(Color underColor)
           
 
Methods inherited from class com.jidesoft.colormap.AbstractColorMap
addColorMapListener, addPropertyChangeListener, addPropertyChangeListener, addWeakColorMapListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, notifyColorMapChanged, removeColorMapListener, removeColorMapListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.colormap.ColorMap
addColorMapListener, addPropertyChangeListener, addPropertyChangeListener, addWeakColorMapListener, removeColorMapListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

SimpleColorMap

public SimpleColorMap(MutableInterval interval,
                      MutablePalette palette)

SimpleColorMap

public SimpleColorMap(Set values,
                      boolean cyclic,
                      MutablePalette palette)
Method Detail

getColor

public Color getColor(Object value)
Specified by:
getColor in interface ColorMap

getLowestFraction

protected double getLowestFraction()

getHighestFraction

protected double getHighestFraction()

getInterval

public MutableInterval getInterval()
Specified by:
getInterval in interface ColorMap
Specified by:
getInterval in interface MutableColorMap

setInterval

public void setInterval(MutableInterval interval)
Specified by:
setInterval in interface MutableColorMap

getPalette

public MutablePalette getPalette()
Specified by:
getPalette in interface ColorMap
Specified by:
getPalette in interface MutableColorMap

setPalette

public void setPalette(MutablePalette palette)
Specified by:
setPalette in interface MutableColorMap

setMatching

public void setMatching(ColorMap.Matching matching)
Specified by:
setMatching in interface MutableColorMap

setAssignments

public void setAssignments(ColorMap.Assignments assignments)
Specified by:
setAssignments in interface MutableColorMap

getNullColor

public Color getNullColor()
Description copied from interface: ColorMap
Get color to be used for null values.

Specified by:
getNullColor in interface ColorMap
Returns:
the color for null values

setNullColor

public void setNullColor(Color nullColor)
Specified by:
setNullColor in interface MutableColorMap

getUnderflowColor

public Color getUnderflowColor()
Description copied from interface: ColorMap
Get color to be used for low out-of-range values

Specified by:
getUnderflowColor in interface ColorMap
Returns:
the low out-of-range color

setUnderColor

public void setUnderColor(Color underColor)
Specified by:
setUnderColor in interface MutableColorMap

getOverflowColor

public Color getOverflowColor()
Description copied from interface: ColorMap
Get color to be used for high out-of-range values

Specified by:
getOverflowColor in interface ColorMap
Returns:
the high out-of-range color

setOverColor

public void setOverColor(Color overColor)
Specified by:
setOverColor in interface MutableColorMap

isOverflowColorSet

public boolean isOverflowColorSet()
Specified by:
isOverflowColorSet in interface ColorMap

isUnderflowColorSet

public boolean isUnderflowColorSet()
Specified by:
isUnderflowColorSet in interface ColorMap

isInverted

public boolean isInverted()
Specified by:
isInverted in interface ColorMap

setInverted

public void setInverted(boolean inverted)
Specified by:
setInverted in interface MutableColorMap

getColorCount

public int getColorCount()
Specified by:
getColorCount in interface ColorMap

setColorCount

public void setColorCount(int colorCount)
Specified by:
setColorCount in interface MutableColorMap

getBrightness

public int getBrightness()
Specified by:
getBrightness in interface ColorMap

setBrightness

public void setBrightness(int brightness)
Specified by:
setBrightness in interface MutableColorMap

getSaturation

public int getSaturation()
Specified by:
getSaturation in interface ColorMap

setSaturation

public void setSaturation(int saturation)
Specified by:
setSaturation in interface MutableColorMap

assignColors

public void assignColors(Set values,
                         boolean cyclic)
Specified by:
assignColors in interface MutableColorMap

assignColors

public void assignColors(Object... values)
Specified by:
assignColors in interface MutableColorMap

assignColors

public void assignColors(Iterable<Object> values)
Specified by:
assignColors in interface MutableColorMap

setColor

public void setColor(Object value,
                     Color color)
Specified by:
setColor in interface MutableColorMap

clearAssignedColor

public void clearAssignedColor()
Specified by:
clearAssignedColor in interface MutableColorMap

getAssignedValues

public Set<Object> getAssignedValues()
Specified by:
getAssignedValues in interface ColorMap

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface MutableColorMap

JIDE 3.5.15