Related to issue 29566: fixes deprecated method calls in ReportDesignBO
authorCarlos Aristu <carlos.aristu@openbravo.com>
Wed, 27 May 2015 16:31:12 +0200
changeset 26818 9eb109c1f121
parent 26817 83734f0b006e
child 26819 f89eff26d185
Related to issue 29566: fixes deprecated method calls in ReportDesignBO
src/org/openbravo/erpCommon/utility/ReportDesignBO.java
--- a/src/org/openbravo/erpCommon/utility/ReportDesignBO.java	Wed May 27 09:41:59 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/ReportDesignBO.java	Wed May 27 16:31:12 2015 +0200
@@ -61,7 +61,6 @@
     px += columnVO.getWidth();
   }
 
-  @SuppressWarnings("deprecation")
   private void addFieldHeader(GridColumnVO columnVO) {
     JRDesignBand bHeader = (JRDesignBand) jasperDesign.getColumnHeader();
     JRDesignStaticText text = new JRDesignStaticText();
@@ -71,7 +70,7 @@
     text.setX(px);
     // Set syle
     text.setFontName(gridReportVO.getHeaderBandStyle().getFontName());
-    text.setFontSize(gridReportVO.getHeaderBandStyle().getFontSize());
+    text.setFontSize(new Float(gridReportVO.getHeaderBandStyle().getFontSize()));
     text.setForecolor(gridReportVO.getHeaderBandStyle().getForeColor());
     text.setBold(gridReportVO.getHeaderBandStyle().isBold());
     text.setItalic(gridReportVO.getHeaderBandStyle().isItalic());
@@ -82,7 +81,6 @@
     bHeader.addElement(text);
   }
 
-  @SuppressWarnings("deprecation")
   private void addFieldValue(GridColumnVO columnVO) throws JRException {
     JRDesignBand bDetalle = (JRDesignBand) jasperDesign.getDetailSection().getBands()[0];
 
@@ -96,7 +94,6 @@
     chunk.setType(JRDesignExpressionChunk.TYPE_FIELD);
     JRDesignExpression expression = new JRDesignExpression();
     expression.addChunk(chunk);
-    expression.setValueClass(columnVO.getFieldClass());
     JRDesignTextField textField = new JRDesignTextField();
     textField.setWidth(columnVO.getWidth());
     textField.setHeight(bDetalle.getHeight());
@@ -104,7 +101,7 @@
     textField.setExpression(expression);
     textField.setBlankWhenNull(true);
     textField.setFontName(gridReportVO.getDetailBandStyle().getFontName());
-    textField.setFontSize(gridReportVO.getDetailBandStyle().getFontSize());
+    textField.setFontSize(new Float(gridReportVO.getDetailBandStyle().getFontSize()));
     textField.setForecolor(gridReportVO.getDetailBandStyle().getForeColor());
     textField.setBold(gridReportVO.getDetailBandStyle().isBold());
     textField.setItalic(gridReportVO.getDetailBandStyle().isItalic());