Class PdfGraphBox

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Identified

@Component public class PdfGraphBox extends PdfBox
This class extends PdfBox and implements the management of a box with a graph inside.
See Also:
  • Constructor Details

    • PdfGraphBox

      public PdfGraphBox()
  • Method Details

    • setDATA

      public void setDATA(double[] al)
      Sets the graph datas.
      Parameters:
      al - A double array with the graph's datas.
    • setLABEL

      public void setLABEL(String[] al)
      Sets the label list for the graph's datas.
      Parameters:
      al - The Strng array containng the labels.
    • setUNITLABEL

      public void setUNITLABEL(String cmp)
      Sets the measure unit label.
      Parameters:
      cmp - The label to set.
    • setXLABEL

      public void setXLABEL(String cmp)
      Sets the labe for the x axis.
      Parameters:
      cmp - The label to set.
    • setYLABEL

      public void setYLABEL(String cmp)
      Sets the labe for the y axis.
      Parameters:
      cmp - The label to set.
    • setTYPE

      public void setTYPE(String c)
      Sets the chart's type.
      Parameters:
      c - The type to set.S
    • setTITLE

      public void setTITLE(String s)
      Sets the chart's title.
      Parameters:
      s - The title to set.
    • setLEGEND

      public void setLEGEND(boolean l)
      Sets whether the chart legend must be present or not
      Parameters:
      l - true if the legend must be present, false otherwise.
    • setORIENTATION

      public void setORIENTATION(org.jfree.chart.plot.PlotOrientation p)
      Sets the graph orientation.
      Parameters:
      p - The PlotOrientation to set.
    • setORIENTATION

      public void setORIENTATION(char c)
      Sets the graph orientation.
      Parameters:
      c - possible value are:
      • 'V' - Vertical
      • 'H' - Horizontal
    • getDATA

      public double[] getDATA()
      Gets the graph datas.
      Returns:
      The
      invalid reference
      double
      array containing the graph datas.
    • getLABEL

      public Comparable[] getLABEL()
      gets the labels list of the graph datas.
      Returns:
      The Comparable array containing the label list of the graph datas.
    • getUNITLABEL

      public String getUNITLABEL()
      Gets the measure unit label.
      Returns:
      The measure unit label.
    • getXLABEL

      public String getXLABEL()
      Gets the label of the x axis.
      Returns:
      The label of the x axis.
    • getYLABEL

      public String getYLABEL()
      Gets the label of the y axis.
      Returns:
      The label of the y axis.
    • getTYPE

      public String getTYPE()
      Returns:
      Gets chart type.
    • getTITLE

      public String getTITLE()
      Returns:
      The chart title.
    • getLEGEND

      public boolean getLEGEND()
      Returns:
      true if the legend is present, false otherwise.
    • getORIENTATION

      public org.jfree.chart.plot.PlotOrientation getORIENTATION()
      Returns:
      The PlotOrientation of the graph.
    • drawInsideFront

      public void drawInsideFront(Report r, float x, float y, float w, float h)
      Draw the graph inside the box of the pdf.
      Overrides:
      drawInsideFront in class PdfBox
      Parameters:
      r - The report where draw the graph box.
      x - The x coordinate from which start draw.
      y - The y coordinate from which start draw.
      w - The width of the box.
      h - The height of the box.
    • getPieChart

      public org.jfree.chart.JFreeChart getPieChart()
      Crate a Pie chart whith datas,title and legend of this instance.
      Returns:
      A JFreeChart Pie Chart whith datas,title and legend of this instance.
    • getBarChart

      public org.jfree.chart.JFreeChart getBarChart()
      Crate a Bar chart whith datas,title,legend, orientations and label of this instance.
      Returns:
      A JFreeChart Bar Chart whith datas,title,legend and label orientations and label of this instance.
    • getXYChart

      public org.jfree.chart.JFreeChart getXYChart()
      Crate a XY chart whith datas,title,legend, orientations, x-label and y-label of this instance.
      Returns:
      A JFreeChart XY Chart whith datas,title,legend, x-label and y-label orientations and label of this instance.