Package uk.ac.starlink.ttools.plot
Interface DataColorTweaker
- All Superinterfaces:
ColorTweaker
- All Known Implementing Classes:
ShaderTweaker
ColorTweaker which can adjust plotting colours on the
basis of a supplied array of values (auxiliary data coordinates).
- Since:
- 5 Jun 2007
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the size of coordinate array which should be submitted tosetCoords(double[])
.boolean
setCoords
(double[] coords) Configures this object with a coordinate array which determines what colour adjustments subsequent calls toColorTweaker.tweakColor(java.awt.Color)
will perform.Methods inherited from interface uk.ac.starlink.ttools.plot.ColorTweaker
tweakColor, tweakColor
-
Method Details
-
setCoords
boolean setCoords(double[] coords) Configures this object with a coordinate array which determines what colour adjustments subsequent calls toColorTweaker.tweakColor(java.awt.Color)
will perform.The return value indicates whether the supplied coordinates are within the visible data ranges; iff they are outside this range false will be returned. Null auxiliary coordinates do not cause a false return, and neither do they cause any change to the input colour. In case of a false return this object is left in an undefined state, so
tweakColor
should only be called following a successful (true) call of this method.- Parameters:
coords
- full coordinate array- Returns:
- true iff this object has been set to a usable state
-
getNcoord
int getNcoord()Returns the size of coordinate array which should be submitted tosetCoords(double[])
.- Returns:
- coordinate size array
-