Package 

Class DrawLayersGradient

  • 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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
    • Constructor Detail

    • Method Detail

      • map

         static double map(double x, double xmin, double xmax, double ymin, double ymax)

        Map x from [xmin, xmax] to [ymin, ymax].

        Parameters:
        x - - x
        xmin - - 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)