-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.swingui.effect.api.DrawLayers
,it.unibo.alchemist.boundary.swingui.effect.api.Effect
,it.unibo.alchemist.boundary.swingui.effect.api.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 public RangedInteger
samples
public String
minLayerValue
public String
maxLayerValue
public String
molString
public RangedInteger
alpha
public RangedInteger
red
public RangedInteger
green
public RangedInteger
blue
public Integer
markerNodeID
-
Method Summary
Modifier and Type Method Description RangedInteger
getSamples()
void
setSamples(RangedInteger samples)
<T, P extends Position2D<P>> void
drawFunction(Function<out Object, out Number> function, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole)
static double
map(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.swingui.effect.impl.DrawLayersValues
drawLayers, getMaxLayerValue, getMinLayerValue, setMaxLayerValue, setMinLayerValue
-
Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.AbstractDrawLayers
drawLayers, getAlpha, getBlue, getColorSummary, getGreen, getMolString, getRed, isLayerFilter, setAlpha, setBlue, setGreen, setLayerFilter, setMolString, setRed
-
Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.AbstractDrawOnce
apply, getMarkerNodeID
-
Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.api.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)
-
-
-
-