Package overit.geocall.basic.ui.report
Class PdfJFCSerieBox
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.basic.ui.report.PdfComponent
overit.geocall.basic.ui.report.PdfBox
overit.geocall.basic.ui.report.PdfJFCSerieBox
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Identified
This class extends
PdfBox and implements the management of a box with a Serie graph inside.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayListprotected Stringprotected ArrayListprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected com.lowagie.text.Imageprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected JFCSerieprotected JFCStyleprotected Stringprotected Stringprotected Stringprotected ArrayListprotected Stringprotected Stringprotected ArrayListprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringstatic final StringFields inherited from class overit.geocall.basic.ui.report.PdfBox
_bc, _bkg, _bs, _bw, _h, _px, _py, _sx, _sy, _w, _xx, _yyFields inherited from class overit.geocall.basic.ui.report.PdfComponent
_identity, _name, _visible -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSerie(char type, overit.geocall.charts.Serie s) Add a dataSerieto the graph.protected voidvoiddrawInsideFront(Report r, float x, float y, float w, float h) Draw the Serie graph inside the box of the report.protected JFCStylegetTitle()gets the graph title.voidDefines, only for the area charts, if the areas must be stacked or notprotected voidsetAttributes(JFCSerie chart) voidDefines, only for the bar charts, if the bars must be stacked or notvoidSets the bar width of the chartvoidDefines if the chart will have a three dimensional design or notvoidSets the font for the labels of the values on the domain (x) axisvoidSets if the grid lines of the domain (x) axis will be visible (default value) or notvoidSets the labels of the elements of the domain (x) axis for each serievoidSets the margin between the values on the domain (x) axisvoidSets the colors of the markers for elements of the domain (x) axis for each serievoidSets the font of the markers for the elements of the domain (x) axisvoidSets the labels of the markers for the elements of the domain (x) axis for each serievoidSets the position of the labels of the markers for the elements of the domain (x) axisvoidSets the degrees of the rotation for the labels of the values on the domain (x) axisvoidSets the label for the domain (x) axisvoidSets the font for the label of the domain (x) axisvoidDefines the format of the image that will be createdvoidSets the graph height.voidSets the background color of the data area of the chartvoidSets the background color of the data inset area of the chart (only if the chart has a three dimensional design)voidSets the font used for the label of the items of the chartvoidSets theTextFormatused for the labels of the elements of each serievoidSets the position of the labels of the elements of the serievoidSets the degrees of the rotation of the labels of the elements of the serievoidsetJFCSerie(JFCSerie pie) Sets theJFCSeriechart.voidsetJFCStyle(JFCStyle jfcs) Sets theJFCStyleused to draw the serie chart elementsvoidSets the labels used in the legend boxvoidDefines the characteristics of the legend boxvoidSets the font for the text item in the legend.voidSets the lower margin for the value (y) axis.protected voidvoidsetROUNDED(String s) Defines if the chart will have a rounded design or notvoidSets the graph shadowvoidSets the graph titlevoidSets the graph title font.voidSets the upper margin for the value (y) axis.voidSets the font for the values of the value (y) axisvoidSets if the grid lines of the value (y) axis will be visible or not (default value)voidSets the colors of the markers for elements of the value (y) axis for each serievoidSets the font of the markers for the elements of the value (y) axisvoidSets the labels of the markers for the elements of the value (y) axis for each serievoidSets the position of the labels of the markers for the elements of the value (y) axisvoidSets the sizes of the markers for the elements of the value (y) axis for each serie.voidSets the values of the markers for the elements of the value (y) axis for each serievoidSets the maximum value for the value (y) axis.voidSets the minimum value for the value (y) axis.voidDefines the format of the valuesvoidSets the step between the values for the value (y) axis.voidSets the label of the value (y) axisvoidSets the font for the label of the value (y) axisvoidDefines if the values of the value (y) axis must have a vertical orientation or not (default)voidDefines the chart orientation (vertical, that is the default value, or horizontal)voidSets the graph width.Methods inherited from class overit.geocall.basic.ui.report.PdfBox
absX, absY, drawInsideBack, getBC, getBC, getBKG, getBS, getBS, getBW, getBW, getH, getPX, getPY, getSX, getSY, getW, setBC, setBC, setBKG, setBS, setBS, setBW, setBW, setH, setPX, setPX, setPY, setPY, setSX, setSX, setSY, setSY, setWMethods inherited from class overit.geocall.basic.ui.report.PdfComponent
drawInside, getBoolean, getColor, getColor, getfloat, getfloat, getFont, getIdentity, getint, getint, getNAME, getString, setIdentity, setNAME, setV
-
Field Details
-
FACTORY_PATH
- See Also:
-
_img
protected com.lowagie.text.Image _img -
_format
-
_width
-
_height
-
_title
-
_titleFont
-
_vertical
-
_ddd
-
_shadow
-
_rounded
-
_labels
-
_upperMargin
-
_lowerMargin
-
_barWidth
-
_barStacked
-
_areaStacked
-
_domainTitle
-
_domainTitleFont
-
_domainLabels
-
_domainFont
-
_domainRotation
-
_domainMargin
-
_domainMarkerColor
-
_domainMarkerFont
-
_domainMarkerLabel
-
_domainMarkerPosition
-
_domainGridLine
-
_valuesGridLine
-
_valuesMin
-
_valuesMax
-
_valuesStep
-
_valuesVertical
-
_valuesTitle
-
_valuesTitleFont
-
_valuesFont
-
_valuesNumberFormat
-
_valuesMarkerValue
-
_valuesMarkerSize
-
_valuesMarkerColor
-
_valuesMarkerFont
-
_valuesMarkerLabel
-
_valuesMarkerPosition
-
_itemLabelRotation
-
_itemLabelPosition
-
_itemLabelFont
-
_itemBackgroundColor
-
_itemInsetBackgroundColor
-
_itemLabelFormat
-
_legendFont
-
_legendBox
-
_jfcSerie
-
_jfcStyle
-
_series
-
_barseries
-
_areaseries
-
_lineseries
-
_serieIds
-
-
Constructor Details
-
PdfJFCSerieBox
public PdfJFCSerieBox()
-
-
Method Details
-
setFORMAT
Defines the format of the image that will be created- Parameters:
s-JFCRaw.PNGto create a PNG image,JFCRaw.JPEGto create a JPEG image. The default value isJFCRaw.PNG
-
setWIDTH
Sets the graph width.- Parameters:
s- The Graph width.
-
setHEIGHT
Sets the graph height.- Parameters:
s- The Graph height.
-
setDDD
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 isfalse
-
setTITLE
Sets the graph title- Parameters:
s- The Graph title.
-
setTITLEFONT
Sets the graph title font.- Parameters:
s- The Graph title font.
-
getTitle
gets the graph title.- Returns:
- The Graph title.
-
setDOMAINLABELS
Sets the labels of the elements of the domain (x) axis for each serie- Parameters:
s- A list that contains the labels
-
setDOMAINFONT
Sets the font for the labels of the values on the domain (x) axis- Parameters:
s- A string that defines the font, with the format:name,variant,dimension,color. SeeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setDOMAINTITLE
Sets the label for the domain (x) axis- Parameters:
s- The string that represents the label for the domain (x) axis
-
setDOMAINTITLEFONT
Sets the font for the label of the domain (x) axis- Parameters:
s- A string that defines the font, with the format:name,variant,dimension,color.
The possible values for the variation of the font are:i(italic) andb(bold).
It is possible to use both the values, likeiborbito obtain the font both bold and italic.
The format for the color is described in theJFCStyleclass.
You can omit some values, in which case you fall back to the default ones. The default font setting is:Tahoma,plain,12,#000000
-
setDOMAINROTATION
Sets the degrees of the rotation for the labels of the values on the domain (x) axis- Parameters:
s- An integer value that defines the rotation
-
setDOMAINMARGIN
Sets the margin between the values on the domain (x) axis- Parameters:
s- A double that defines the margin between the values on the domain (x) axis
-
setBARWIDTH
Sets the bar width of the chart- Parameters:
s- The width to set.
-
setBARSTACKED
Defines, only for the bar charts, if the bars must be stacked 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 one, that isfalse
-
setAREASTACKED
Defines, only for the area charts, if the areas must be stacked 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 one, that isfalse
-
setSHADOW
Sets the graph shadow- Parameters:
s- The shadow to set.
-
setVERTICAL
Defines the chart orientation (vertical, that is the default value, or horizontal)- 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 one, that istrue
-
setROUNDED
Defines if the chart will have a rounded 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 isfalse
-
setUPPERMARGIN
Sets the upper margin for the value (y) axis.- Parameters:
s- A double value that represents the upper margin for the y axis
-
setLOWERMARGIN
Sets the lower margin for the value (y) axis.- Parameters:
s- A double value that represents the lower margin for the y axis
-
setDOMAINGRIDLINE
Sets if the grid lines of the domain (x) axis will be visible (default value) 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 one, that istrue
-
setVALUESGRIDLINE
Sets if the grid lines of the value (y) axis will be visible or not (default value)- 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 one, that isfalse
-
setVALUESMIN
Sets the minimum value for the value (y) axis.- Parameters:
s- A double value that represents the minimum value for the y axis
-
setVALUESMAX
Sets the maximum value for the value (y) axis.- Parameters:
s- A double value that represents the maximum value for the y axis
-
setVALUESSTEP
Sets the step between the values for the value (y) axis.- Parameters:
s- A double value that represents the step between the values
-
setVALUESVERTICAL
Defines if the values of the value (y) axis must have a vertical orientation or not (default)- 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 one, that isfalse
-
setVALUESTITLE
Sets the label of the value (y) axis- Parameters:
s- A string that represents the label for the value (y) axis
-
setVALUESTITLEFONT
Sets the font for the label of the value (y) axis- Parameters:
s- A string that defines the font. For the font definition seeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setVALUESFONT
Sets the font for the values of the value (y) axis- Parameters:
s- A string that defines the font. For the font definition seeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setVALUESNUMBERFORMAT
Defines the format of the values- Parameters:
s- A string that represents a decimal format. The default value is,##0.###
-
setDOMAINMARKERCOLOR
Sets the colors of the markers for elements of the domain (x) axis for each serie- Parameters:
s- A list taht contains the colors. The format for the colors is described in theJFCStyleclass.
-
setDOMAINMARKERFONT
Sets the font of the markers for the elements of the domain (x) axis- Parameters:
s- A string that defines the font. For the font definition seeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setDOMAINMARKERLABEL
Sets the labels of the markers for the elements of the domain (x) axis for each serie- Parameters:
s- A list that contains the labels
-
setDOMAINMARKERPOSITION
Sets the position of the labels of the markers for the elements of the domain (x) axis- Parameters:
s- A string that defines the position. The possible values are: 'top' or 'bottom'
-
setVALUESMARKERVALUE
Sets the values of the markers for the elements of the value (y) axis for each serie- Parameters:
s- A list that defines the values of the markers for each serie
-
setVALUESMARKERSIZE
Sets the sizes of the markers for the elements of the value (y) axis for each serie.- Parameters:
s- A list that defines the sizes of the markers for each serie
-
setVALUESMARKERCOLOR
Sets the colors of the markers for elements of the value (y) axis for each serie- Parameters:
s- A list that contains the colors. The format for the colors is described in theJFCStyleclass.
-
setVALUESMARKERFONT
Sets the font of the markers for the elements of the value (y) axis- Parameters:
s- A string that defines the font. For the font definition seeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setVALUESMARKERLABEL
Sets the labels of the markers for the elements of the value (y) axis for each serie- Parameters:
s- A list that contains the labels
-
setVALUESMARKERPOSITION
Sets the position of the labels of the markers for the elements of the value (y) axis- Parameters:
s- A string that defines the position. For the format of the string that defines the position seeJFCSerie.setITEMLABELPOSITION(java.lang.String)
-
setITEMLABELROTATION
Sets the degrees of the rotation of the labels of the elements of the serie- Parameters:
s- An integer value that defines the rotation
-
setITEMLABELPOSITION
Sets the position of the labels of the elements of the serie- Parameters:
s- A string that defines the position of the labels. The format that must be used is composed by two lowercase letters followed by two uppercase letters; the first ones defines the angle of rest of the element (that can be an element of the serie or a marker), the second ones the angle of rest of the label. The possible values (for both the lowercase and uppercase letters) are: (t)op, (m)iddle, (b)ottom for the height and (l)eft, (c)enter, (r)ight for the width. For example:mlTR.To allow a better management of the positioning of the labels of a bar chart, it is possible to indicate another letter, that is the letter
i. The introduction of this letter serves to indicate that the label will be inserted inside the elements rather than outside. If the letteriis indicated, the labels will appear only if they are entirely contained within the element.
-
setITEMLABELFONT
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. SeeJFCSerie.setDOMAINTITLEFONT(java.lang.String)
-
setITEMBACKGROUNDCOLOR
Sets the background color of the data area of the chart- Parameters:
s- The background color. The format for the color is described in theJFCStyleclass.
-
setITEMINSETBACKGROUNDCOLOR
Sets the background color of the data inset area of the chart (only if the chart has a three dimensional design)- Parameters:
s- The background color. The format for the color is described in theJFCStyleclass.
-
setITEMLABELFORMAT
Sets theTextFormatused for the labels of the elements of each serie- Parameters:
s- A LIST} in which every element, separated from the others by the | character, represents the format used for the labels of the elements of the corresponding serie
-
setLEGENDFONT
Sets the font for the text item in the legend.- Parameters:
s- The font to set.
-
setLEGENDBOX
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 theJFCStyleclass.
The thickness value must be a number.
You can omit some values, in which case you fall back to the default ones
-
setLABELS
Sets the labels used in the legend box- Parameters:
s- A list in which every element, separated from the others by the | character, represents the label that will appear in the legend box
-
setJFCSerie
Sets theJFCSeriechart.- Parameters:
pie- The chart to set.
-
setJFCStyle
Sets theJFCStyleused to draw the serie chart elements- Parameters:
jfcs- The style used to draw the elements of the chart
-
getJFCStyle
-
addSerie
public void addSerie(char type, overit.geocall.charts.Serie s) Add a dataSerieto the graph.- Parameters:
type- The possible type values are:- 'b' - bar serie
- 'a' - area serie
- 'l' - line serie
s- The Serie to add.
-
drawInsideFront
Draw the Serie graph inside the box of the report.- Overrides:
drawInsideFrontin classPdfBox- Parameters:
r- The report where draw the Serie 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
-
addSeries
-