PageRenderTime 65ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/excelgen/src/main/java/by/q64/promo/excelgen/service/marketing/MarketingReportCostEstimationGeneratorImpl.java

https://bitbucket.org/quadrate/promo
Java | 35 lines | 25 code | 7 blank | 3 comment | 0 complexity | 82a1615319658484140891d2e0597bd0 MD5 | raw file
  1. package by.q64.promo.excelgen.service.marketing;
  2. import by.q64.promo.excelgen.service.marketing.source.MarketingReportDataOneCity;
  3. import by.q64.promo.excelgen.service.marketing.source.settings.MarketingReportSettings;
  4. import org.apache.poi.xslf.usermodel.*;
  5. import org.springframework.stereotype.Service;
  6. import java.awt.*;
  7. import java.util.function.Function;
  8. /**
  9. * Created by Pavel on 26.12.2014.
  10. */
  11. @Service("marketingReportCostEstimationGenerator")
  12. public class MarketingReportCostEstimationGeneratorImpl implements MarketingReportPartGenerator {
  13. @Override
  14. public XMLSlideShow generate(XMLSlideShow ppt,MarketingReportSettings reportSettings,
  15. MarketingReportDataOneCity marketingReportDataOneCity, Function<String, byte[]> pictureGetter) {
  16. XSLFSlide slide1 = ppt.createSlide();
  17. XSLFTextBox txt1 = slide1.createTextBox();
  18. txt1.setAnchor(new java.awt.Rectangle(20, 40, 600, 50));
  19. XSLFTextParagraph p1 = txt1.addNewTextParagraph();
  20. XSLFTextRun r1 = p1.addNewTextRun();
  21. r1.setText("Cost estimation");
  22. r1.setFontFamily("Verdana");
  23. r1.setFontColor(new Color(255, 0, 102));
  24. r1.setFontSize(32);
  25. r1.setBold(true);
  26. return ppt;
  27. }
  28. }