Package 

Class DrawLayersValues

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

    • Method Summary

      Modifier and Type Method Description
      <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.
      String getMinLayerValue()
      String getMaxLayerValue()
      void setMinLayerValue(String minLayerValue)
      void setMaxLayerValue(String maxLayerValue)
      • 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