com.jidesoft.colormap
Class SimpleColorMap
java.lang.Object
com.jidesoft.colormap.AbstractColorMap
com.jidesoft.colormap.SimpleColorMap
- All Implemented Interfaces:
- ColorMap, MutableColorMap
public class SimpleColorMap
- extends AbstractColorMap
- implements MutableColorMap
Default data model for color maps.
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 |
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 |
SimpleColorMap
public SimpleColorMap(MutableInterval interval,
MutablePalette palette)
SimpleColorMap
public SimpleColorMap(Set values,
boolean cyclic,
MutablePalette palette)
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