Class PdfJFCPieBox

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

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

    • FACTORY_PATH

      public static final String FACTORY_PATH
      See Also:
    • _img

      protected com.lowagie.text.Image _img
    • _format

      protected String _format
    • _width

      protected String _width
    • _height

      protected String _height
    • _ddd

      protected String _ddd
    • _legend

      protected String _legend
    • _title

      protected String _title
    • _titleFont

      protected String _titleFont
    • _explodes

      protected String _explodes
    • _values

      protected String _values
    • _labels

      protected String _labels
    • _itemLabelFormat

      protected String _itemLabelFormat
    • _itemLabelFont

      protected String _itemLabelFont
    • _itemLabelBox

      protected String _itemLabelBox
    • _ring

      protected String _ring
    • _legendFont

      protected String _legendFont
    • _legendBox

      protected String _legendBox
    • _serie

      protected overit.geocall.charts.Serie _serie
    • _jfcStyle

      protected JFCStyle _jfcStyle
    • _jfcPie

      protected JFCPie _jfcPie
  • Constructor Details

    • PdfJFCPieBox

      public PdfJFCPieBox()
  • Method Details

    • setFORMAT

      public void setFORMAT(String s)
      Sets the format of the graph.
      Parameters:
      s - JFCRaw.PNG to create a PNG image, JFCRaw.JPEG to create a JPEG image. The default value is JFCRaw.PNG
    • setWIDTH

      public void setWIDTH(String s)
      Sets the Graph width.
      Parameters:
      s - The Graph width.
    • setHEIGHT

      public void setHEIGHT(String s)
      Sets the Graph height.
      Parameters:
      s - The Graph height.
    • setDDD

      public void setDDD(String s)
      Defines if the chart will have a three dimensional design or not.
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0").
      If the string is not recognized as a boolean value, it will be used the default value, that is false
    • setLEGEND

      public void setLEGEND(String s)
      Sets the Graph legend.
      Parameters:
      s - The Graph legend.
    • setTITLE

      public void setTITLE(String s)
      Sets the Graph title.
      Parameters:
      s - The Graph title.
    • setTITLEFONT

      public void setTITLEFONT(String s)
      Sets the title font.
      Parameters:
      s - The title font to set.
    • getTitle

      public String getTitle()
      Gets the graph title.
      Returns:
      The graph title.
    • setEXPLODES

      public void setEXPLODES(String s)
      Defines which are the elements of the pie chart that must be exploded
      Parameters:
      s - A list in which every element, separated from the others by the | character, represents the exploded state of the corresponding item.
      If the number of the elements of the list is less then the number of the items of the data serie, the last value will be replicated for all the remaining items.
    • setVALUES

      public void setVALUES(String s)
      Sets the values for the graph.
      Parameters:
      s - The values to set.
    • setLABELS

      public void setLABELS(String s)
      Sets the dats labels.
      Parameters:
      s - The list containing the labels.
    • setITEMLABELFORMAT

      public void setITEMLABELFORMAT(String s)
      Sets the TextFormat used for the labels of the elements of the chart
      Parameters:
      s - A string that defines the format used for the labels. The pie chart has only a single serie of data, therefore the format is unique.
    • setITEMLABELFONT

      public void setITEMLABELFONT(String s)
      Sets the font used for the label of the items of the chart
      Parameters:
      s - A string that defines the font, with the format: name,variant,dimension,color. See JFCPie.setLEGENDFONT(java.lang.String)
    • setITEMLABELBACKGROUNDCOLOR

      public void setITEMLABELBACKGROUNDCOLOR(String s)
      Defines the characteristics of the label boxes
      Parameters:
      s - A string in the format: background-color,shadow color,border thickness,link thickness,link color.
      The format for the colors is described in the JFCStyle class.
      The thickness values must be numbers.
      You can omit some values, in which case you fall back to the default ones
    • setRING

      public void setRING(String s)
      Defines if the chart will be a ring chart, and the size of the ring's section
      Parameters:
      s - A value that defines the size of the ring's section. If the value is "0" (that is the default value), the chart will be a pie chart, otherwise it will be a ring chart
    • setLEGENDFONT

      public void setLEGENDFONT(String s)
      Sets the legend text font.
      Parameters:
      s - The font to set.
    • setLEGENDBOX

      public void setLEGENDBOX(String s)
      Defines the characteristics of the legend box
      Parameters:
      s - A string that defines the format.
      It must be composed by a serie of strings, separated by the comma, with the following meaning: position,background color,border thickness,border color.
      The possible values for the position are: t (top), b (bottom), l (left), r (right).
      The format for the colors is described in the JFCStyle class.
      The thickness value must be a number.
      You can omit some values, in which case you fall back to the default ones
    • setJFCPie

      public void setJFCPie(JFCPie pie)
      Sets the JFCPie chart.
      Parameters:
      pie - The chart to set.
    • setJFCStyle

      public void setJFCStyle(JFCStyle jfcs)
      Sets the JFCStyle used to draw the pie chart elements
      Parameters:
      jfcs - The style used to draw the elements of the chart
    • getJFCStyle

      protected JFCStyle getJFCStyle()
      Gets the JFCStyle used to draw the pie chart elements.
      Returns:
      The style used to draw the elements of the chart
    • setSerie

      public void setSerie(overit.geocall.charts.Serie serie)
      Sets the data Serie of the chart
      Parameters:
      serie - The data serie that contains the values of the chart
    • drawInsideFront

      public void drawInsideFront(Report r, float x, float y, float w, float h)
      Draw the Pie graph inside the box of the report.
      Overrides:
      drawInsideFront in class PdfBox
      Parameters:
      r - The report where draw the pie 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.
    • setMinimumImgSize

      protected void setMinimumImgSize()
    • setAttributes

      protected void setAttributes(JFCPie chart)