JIDE 3.5.15

com.jidesoft.colormap
Class AbstractColorMap

java.lang.Object
  extended by com.jidesoft.colormap.AbstractColorMap
All Implemented Interfaces:
ColorMap
Direct Known Subclasses:
SimpleColorMap

public abstract class AbstractColorMap
extends Object
implements ColorMap

This class provides a skeletal implementation of the ColorMap interface to minimize the effort required to implement this interface.


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
protected AbstractColorMap()
           
 
Method Summary
 void addColorMapListener(ColorMapListener listener)
          Add a listener to the list that's notified each time a change to the colormap occurs.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
 void addWeakColorMapListener(ColorMapListener listener)
          Add a listener to the list that's notified each time a change to the colormap occurs.
protected  void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
          Support for reporting bound property changes for boolean properties.
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
          Support for reporting bound property changes for integer properties.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Support for reporting bound property changes for Object properties.
 PropertyChangeListener[] getPropertyChangeListeners()
          Returns an array of all the property change listeners registered on this component.
 PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
          Returns an array of all the listeners which have been associated with the named property.
protected  void notifyColorMapChanged(ColorMapEvent event)
           
 void removeColorMapListener(ColorMapListener listener)
          Remove a listener to the list that's notified each time a change to the colormap occurs.
 void removeColorMapListeners()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list for a specific property.
 
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
getAssignedValues, getBrightness, getColor, getColorCount, getInterval, getNullColor, getOverflowColor, getPalette, getSaturation, getUnderflowColor, isInverted, isOverflowColorSet, isUnderflowColorSet
 

Constructor Detail

AbstractColorMap

protected AbstractColorMap()
Method Detail

addColorMapListener

public void addColorMapListener(ColorMapListener listener)
Description copied from interface: ColorMap
Add a listener to the list that's notified each time a change to the colormap occurs.

Specified by:
addColorMapListener in interface ColorMap
Parameters:
listener - the ColorMapListener

addWeakColorMapListener

public void addWeakColorMapListener(ColorMapListener listener)
Description copied from interface: ColorMap
Add a listener to the list that's notified each time a change to the colormap occurs. The listener will automatically be disposed of should no other object have a reference to it.

Specified by:
addWeakColorMapListener in interface ColorMap
Parameters:
listener - the ColorMapListener

removeColorMapListener

public void removeColorMapListener(ColorMapListener listener)
Description copied from interface: ColorMap
Remove a listener to the list that's notified each time a change to the colormap occurs.

Specified by:
removeColorMapListener in interface ColorMap
Parameters:
listener - the ColorMapListener

removeColorMapListeners

public void removeColorMapListeners()

notifyColorMapChanged

protected void notifyColorMapChanged(ColorMapEvent event)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.

Specified by:
addPropertyChangeListener in interface ColorMap
Parameters:
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Specified by:
removePropertyChangeListener in interface ColorMap
Parameters:
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component.

Returns:
all of this component's PropertyChangeListeners or an empty array if no property change listeners are currently registered
Since:
1.4
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), PropertyChangeSupport.getPropertyChangeListeners()

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property.

Specified by:
addPropertyChangeListener in interface ColorMap
Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.

If listener is null, no exception is thrown and no action is performed.

Specified by:
removePropertyChangeListener in interface ColorMap
Parameters:
propertyName - a valid property name
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), removePropertyChangeListener(java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property.

Parameters:
propertyName - the property name
Returns:
all of the PropertyChangeListeners associated with the named property or an empty array if no listeners have been added
Since:
1.4
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners()

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
Support for reporting bound property changes for boolean properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)
Support for reporting bound property changes for integer properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

JIDE 3.5.15