Package 

Class DrawLayersValues

  • 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 DrawLayersValues
    extends AbstractDrawLayers implements FunctionDrawer
                        

    This is a basic class for all the effects meant to draw it.unibo.alchemist.model.interfaces.Layers values in different points of the view. One effect could draw isolines, whereas another could represent different values with a gradient. Normally, drawing a layer's values only makes sense for "numerical" layers (i.e. layers for which the values are Numbers). However, one could have a "non-numerical" layer whose getValue return type is an object from which a value can be extracted somehow. In the end, drawing a layer's values makes sense as long as there is a way to map those values to Numbers. More generally, a LayerToFunctionMapper is needed. As this class is not aware of which mapper to use, this responsibility is left to subclasses. When drawing layers values, it can be important to know the min and max layer values that will be drawn. This class declares gui controls that allow the user to specify such boundaries.

    • 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
      String getMinLayerValue()
      void setMinLayerValue(String minLayerValue)
      String getMaxLayerValue()
      void setMaxLayerValue(String maxLayerValue)
      <T, P extends Position2D<P>> void drawLayers(Collection<Layer<T, P>> toDraw, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole)
      abstract <T, P extends Position2D<P>> void drawFunction(Function<out Object, out Number> function, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole) Draw the provided function.
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.AbstractDrawLayers

        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