public static Element createElement(final Document document, final String tag, final SVGColor fillColor, final String... attributes) { return createElement(document, tag, prepend(attributes, "fill", fillColor.getName())); }
public static Element createPath(final Document document, final SVGColor fillColor, final double strokeWidth, final SVGColor strokeColor, final String path, final String... attributes) { return createPath(document, fillColor.getName(), strokeWidth, strokeColor.getName(), path, attributes); }
public static Element createRect(final Document document, final double x, final double y, final double width, final double height, final SVGColor fillColor, final String... attributes) { return createRect(document, x, y, width, height, fillColor.getName(), attributes); }
public static Element createPath(final Document document, final String fill, final double strokeWidth, final String stroke, final String path, final String... attributes) { checkPositiveValues("strokeWidth", strokeWidth); final Element el = createElement(document, "path", prepend(attributes, "fill", fill, "stroke-width", strokeWidth, "stroke", stroke, "d", path)); return el; }
public static Element createUse(final Document document, final String id, final double x, final double y, final String... attributes) { checkNonNegativeValues("x, y", x, y); final Element el = createElement(document, "use", prepend(attributes, "xlink:href", id, "x", round(x), "y", round(y))); return el; }
public static Element createRect(final Document document, final double x, final double y, final double width, final double height, final SVGColor fillColor, final SVGColor strokeColor, final String... attributes) { return createRect(document, x, y, width, height, fillColor.getName(), prepend(attributes, "stroke", strokeColor.getName())); }
public static Element createLine(final Document document, final double x1, final double y1, final double x2, final double y2, final SVGColor strokeColor, final String... attributes) { return createLine(document, x1, y1, x2, y2, prepend(attributes, "stroke", strokeColor.getName())); }
@Override protected ContentProvider createNewContentProvider(final ExportWorkbook workbook) { return new MyXlsContentProvider(workbook); } }.setDefaultExportContext(new MyXlsExportContext()));
public ExportSheet addSheet(final String sheetTitle) { final ContentProvider contentProvider = new MyXlsContentProvider(getWorkbook()) { /** * @see org.projectforge.export.MyXlsContentProvider#getCustomizedCellFormat(CellFormat, java.lang.Object) */ @Override protected CellFormat getCustomizedCellFormat(final CellFormat format, final Object value) { return null; } }; return addSheet(contentProvider, sheetTitle); }
public MyXlsExportContext() { if (initialized == false) { initialized = true; ExportConfig.setInstance(new ExportConfig() { @Override protected ContentProvider createNewContentProvider(final ExportWorkbook workbook) { return new MyXlsContentProvider(workbook); } }.setDefaultExportContext(new MyXlsExportContext())); } }
public I18nExportColumn toI18nExportColumn() { return new I18nExportColumn(getCombinedName(), i18nKey, colWidth); }
@Test public void exportExcel() throws IOException { writeExcel("TestExcel_en.xls", Locale.ENGLISH, "DD/MM/YYYY"); }
public ExportZipArchive add(final String filename, final ExportJFreeChart exportJFreeChart) { zipFiles.add(new ExportZipFile(filename, exportJFreeChart)); return this; }
protected DOListExcelExporter createExcelExporter(final String filenameIdentifier) { return new DOListExcelExporter(filenameIdentifier); }
@Override protected List<ExportColumn> onBeforeSettingColumns(final ContentProvider sheetProvider, final List<ExportColumn> columns) { final List<ExportColumn> exportColumns = reorderAndRemoveOtherColumns(columns, fieldsToExport); // add the attr fields attrFieldsToExport .stream() .map(AttrColumnDescription::toI18nExportColumn) .forEach(exportColumns::add); return exportColumns; }
private DateHolder getDateHolder() { return new DateHolder(getDate(), DateHelper.UTC); }
/** * @see XlsContentProvider#newInstance() */ @Override public ContentProvider newInstance() { return new MyXlsContentProvider(this.workbook); }
@Test public void exportGermanExcel() throws IOException { writeExcel("TestExcel_de.xls", Locale.GERMAN, "DD.MM.YYYY"); }
public ExportZipArchive add(final String filename, final ExportWorkbook exportWorkbook) { zipFiles.add(new ExportZipFile(filename, exportWorkbook)); return this; }
@Override protected ContentProvider createNewContentProvider(final ExportWorkbook workbook) { return new MyXlsContentProvider(workbook); } }.setDefaultExportContext(new MyXlsExportContext()));