Package org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper.StaticExcelColorSupport


    ExcelOutputProcessorMetaData metaData = new ExcelOutputProcessorMetaData(ExcelOutputProcessorMetaData.PAGINATION_FULL);
    metaData.initialize(report.getConfiguration());

    XSSFWorkbook hssfWorkbook = new XSSFWorkbook();
    ExcelColorProducer colorProducer = new StaticExcelColorSupport();
    ExcelFontFactory ff = new ExcelFontFactory(hssfWorkbook, colorProducer);
    CreationHelper ch = hssfWorkbook.getCreationHelper();
    ExcelTextExtractor te = new ExcelTextExtractor(metaData, colorProducer, ch, ff);

    Object compute = te.compute((RenderBox) second);
View Full Code Here


    ExpressionRuntime runtime = new GenericExpressionRuntime(new DefaultTableModel(), 0, new DefaultProcessingContext(report));

    RichTextStyleResolver.resolveStyle(report);

    XSSFWorkbook hssfWorkbook = new XSSFWorkbook();
    ExcelColorProducer colorProducer = new StaticExcelColorSupport();
    ExcelFontFactory ff = new ExcelFontFactory(hssfWorkbook, colorProducer);
    CreationHelper ch = hssfWorkbook.getCreationHelper();
    FastExcelTextExtractor te = new FastExcelTextExtractor(colorProducer, ff, ch);

    Element element = report.getReportHeader().getElement(0);
View Full Code Here

  public void testMapping()
  {
    System.out.println ("0xC6=" + 0xC6);
    final Color c = new Color(0xC6C3C6);
    final StaticExcelColorSupport colorSupport = new StaticExcelColorSupport();
    final short nearestColor = colorSupport.getNearestColor(c);
    assertEquals("Color: " + c + " -> " + colorSupport.getColor(nearestColor).getHexString(), 22, nearestColor);
  }
View Full Code Here

  }

  public void testMappingWhite()
  {
    final Color c = Color.WHITE;
    final StaticExcelColorSupport colorSupport = new StaticExcelColorSupport();
    final short nearestColor = colorSupport.getNearestColor(c);
    assertEquals(HSSFColor.WHITE.index, nearestColor);
  }
View Full Code Here

  }

  public void testMappingBlack()
  {
    final Color c = Color.BLACK;
    final StaticExcelColorSupport colorSupport = new StaticExcelColorSupport();
    final short nearestColor = colorSupport.getNearestColor(c);
    assertEquals(HSSFColor.BLACK.index, nearestColor);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper.StaticExcelColorSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.