-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.gui.effects.DrawLayers,it.unibo.alchemist.boundary.gui.effects.Effect,it.unibo.alchemist.boundary.gui.effects.FunctionDrawer,java.io.Serializable
public abstract class DrawLayersGradient extends DrawLayersValues
Draw layers values as background in the gui. The higher is the layer concentration in a point, the higher is the alpha channel for the background in that point. The user must specify: - the number of samples for each side, basically more samples correspond to a smoother and more detailed background - the min layer value - the max layer value The purpose and structure of this class is similar to DrawLayersIsolines.
-
-
Field Summary
Fields Modifier and Type Field Description private RangedIntegersamples
-
Method Summary
Modifier and Type Method Description RangedIntegergetSamples()voidsetSamples(RangedInteger samples)<T, P extends Position2D<P>> voiddrawFunction(Function<out Object, out Number> function, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole)static doublemap(double x, double xmin, double xmax, double ymin, double ymax)Map x from [xmin, xmax] to [ymin, ymax]. -
Methods inherited from class it.unibo.alchemist.boundary.gui.effects.DrawLayersValues
drawLayers, getMaxLayerValue, getMinLayerValue, setMaxLayerValue, setMinLayerValue -
Methods inherited from class it.unibo.alchemist.boundary.gui.effects.AbstractDrawLayers
drawLayers, getAlpha, getBlue, getColorSummary, getGreen, getMolString, getRed, isLayerFilter, setAlpha, setBlue, setGreen, setLayerFilter, setMolString, setRed -
Methods inherited from class it.unibo.alchemist.boundary.gui.effects.DrawOnce
apply, getMarkerNodeID -
Methods inherited from class it.unibo.alchemist.boundary.gui.effects.Effect
apply, apply, equals, hashCode -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getSamples
RangedInteger getSamples()
-
setSamples
void setSamples(RangedInteger samples)
- Parameters:
samples- to set
-
drawFunction
<T, P extends Position2D<P>> void drawFunction(Function<out Object, out Number> function, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole)
-
map
static double map(double x, double xmin, double xmax, double ymin, double ymax)
Map x from [xmin, xmax] to [ymin, ymax].
- Parameters:
x- - xxmin- - the lower bound of the actual x scale (included)xmax- - the upper bound of the actual x scale (included)ymin- - the lower bound of the new x scale (included)ymax- - the upper bound of the new x scale (included)
-
-
-
-