Package rma.util
Class ColorContour
java.lang.Object
rma.util.ColorContour
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable,Cloneable
- Direct Known Subclasses:
AspectShadingColorContour,BandedColorContour,CategoricalColorContour,GrayscaleColorContour,LinearColorContour,PrecipColorContour,RGBColorContour,TerrainColorContour,TwoColorColorContour,WaterDepthColorContour
public abstract class ColorContour
extends Object
implements Cloneable, Serializable, AsciiSerializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected Clippingprotected doubleprotected doubleprotected Clippingprotected doubleprotected booleanprotected static Mapstatic final Stringstatic final Stringstatic final Stringprotected PropertyChangeSupportstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd a PropertyChangeListener to the listener list.clone()voidcopyInto(ColorContour cc) static ColorContourcreateContourFromAttributes(Map attributes) protected MapgetAttributes(Map map) doublegetColor(double val) getColor(double val, double lafc) getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.static ColorContourgetInstanceForType(Object type) doubledoubleintgetRGB(double[] rgb, double val, double lafc) intgetRGB(double val, double lafc) protected abstract voidgetRGB0(double[] rgb, double val, double minValue, double maxValue) protected abstract double[]getRGB0(double val, double minValue, double maxValue) doublebooleanstatic ObjectgetType(ColorContour cc) static Object[]getTypes()voidread(BufferedReader input) protected voidread0(String type, String param, BufferedReader input) voidprotected voidsetAttributes(Map attributes) voidsetBrightness(double d) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidvoidsetMaxValue(double d) voidvoidsetMinValue(double d) voidsetSaturation(double d) voidsetScaleToClipping(boolean b) Tells the color contour to scale the color gradient between the clipping areas.voidwrite(BufferedWriter output)
-
Field Details
-
ASPECT_SHADING_TYPE
- See Also:
-
PRECIPITATION_TYPE
- See Also:
-
GRAYSCALE_TYPE
- See Also:
-
RED_GREEN_BLUE_TYPE
- See Also:
-
TERRAIN_TYPE
- See Also:
-
LINEAR_TYPE
- See Also:
-
WATER_DEPTH_TYPE
- See Also:
-
_sat
protected double _sat -
_bright
protected double _bright -
_min
protected double _min -
_max
protected double _max -
_maxMinusMin
protected double _maxMinusMin -
_maxClip
-
_minClip
-
_scaleToClipping
protected boolean _scaleToClipping -
_typeToClass
-
mPropertyChangeSupport
-
-
Constructor Details
-
ColorContour
public ColorContour()
-
-
Method Details
-
addPropertyChangeListener
Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. Iflisteneris null, no exception is thrown and no action is taken.- Parameters:
listener- The PropertyChangeListener to be added
-
removePropertyChangeSupport
-
addExtras
-
getType
-
setScaleToClipping
public void setScaleToClipping(boolean b) Tells the color contour to scale the color gradient between the clipping areas.- Parameters:
b- boolean true to scale to the clipping area, false - scale to the max/min
-
getScaleToClipping
public boolean getScaleToClipping() -
getTypes
-
getInstanceForType
-
clone
-
copyInto
-
getMinValue
public double getMinValue() -
setMinValue
public void setMinValue(double d) -
getMaxValue
public double getMaxValue() -
setMaxValue
public void setMaxValue(double d) -
getSaturation
public double getSaturation() -
setSaturation
public void setSaturation(double d) -
getBrightness
public double getBrightness() -
setBrightness
public void setBrightness(double d) -
getMaxClipping
-
setMaxClipping
-
getMinClipping
-
setMinClipping
-
getRGB0
protected abstract double[] getRGB0(double val, double minValue, double maxValue) -
getRGB0
protected abstract void getRGB0(double[] rgb, double val, double minValue, double maxValue) -
getColor
-
getColor
-
getRGB
public int getRGB(double val, double lafc) -
getRGB
public int getRGB(double[] rgb, double val, double lafc) -
read
- Throws:
IOException
-
read0
- Throws:
IOException
-
write
- Throws:
IOException
-
createContourFromAttributes
-
setAttributes
-
getAttributes
-
getAttributes
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-