Class GFormula

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<GraphicE>

    public class GFormula
    extends Graphic
    This class represents a basic Formula.
    It translates a Calculable into a Graphic.
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      GFormula​(Calculable formula)
      Creates a new GFormula for the given Calculable object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void calculate​(double xs, double xf, double step)
      Calculates the formula, this method must be called before the method is printed in the canvas, otherwise it will print nothing.
      void calculate​(double xs, double xf, double step, GraphicE element)
      Calculates the formula, this method must be called before the method is printed in the canvas, otherwise it will print nothing.
      Note: The element must be in the position (0, 0) otherwise it the graphics will be in the incorrect position.
      void calculateArea​(double xs, double xf, double step)
      Calculates the formula, this method must be called before the method is printed in the canvas, otherwise it will print nothing.
      void calculatePath​(double xs, double xf, double step)
      Calculates the formula, this method must be called before the method is printed in the canvas, otherwise it will print nothing.
      void setAreaPaint​(java.awt.Paint paint)
      Sets the Paint used for the area below the curve
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait