Package org.projectforge.excel

Examples of org.projectforge.excel.I18nExportColumn


    final String sheetTitle = PFUserContext.getLocalizedString("hr.plannings");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { //
        new I18nExportColumn(Col.USER, "timesheet.user", MyXlsContentProvider.LENGTH_USER),
        new I18nExportColumn(Col.PROJEKT, "fibu.projekt", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 4),
        new I18nExportColumn(Col.PRIORITY, "resourceplanning.priority", 8),
        new I18nExportColumn(Col.PROBABILITY, "resourceplanning.probability", 16),
        new I18nExportColumn(Col.UNASSIGNEDHOURS, "resourceplanning.unassignedHours", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.MONDAYHOURS, "calendar.shortday.monday", 4),
        new I18nExportColumn(Col.TUESDAYHOURS, "calendar.shortday.tuesday", 4),
        new I18nExportColumn(Col.WEDNESDAYHOURS, "calendar.shortday.wednesday", 4),
        new I18nExportColumn(Col.THURSDAYHOURS, "calendar.shortday.thursday", 4),
        new I18nExportColumn(Col.FRIDAYHOURS, "calendar.shortday.friday", 4),
        new I18nExportColumn(Col.WEEKENDHOURS, "resourceplanning.weekend", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.DESCRIPTION, "timesheet.description", MyXlsContentProvider.LENGTH_EXTRA_LONG)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
View Full Code Here


    final String sheetTitle = PFUserContext.getLocalizedString("exportKWProjects");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 12),
        new I18nExportColumn(Col.PROJEKT, "fibu.projekt", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.TOTAL_DURATION, "timesheet.totalDuration", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WORKDAYS, "resourceplanning.workdays", MyXlsContentProvider.LENGTH_STD)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
View Full Code Here

    final String sheetTitle = PFUserContext.getLocalizedString("exportKWUsers");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 12),
        new I18nExportColumn(Col.USER, "timesheet.user", MyXlsContentProvider.LENGTH_USER),
        new I18nExportColumn(Col.TOTAL_DURATION, "timesheet.totalDuration", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WORKDAYS, "resourceplanning.workdays", MyXlsContentProvider.LENGTH_STD)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
View Full Code Here

    final ExportColumn[] cols = new ExportColumn[6];
    int i = 0;
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "datum");
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "faelligkeit");
    cols[i] = new I18nExportColumn("gross", "fibu.rechnung.bruttoBetrag", 10);
    exporter.putCurrencyFormat(sheetProvider, cols[i++]);
    cols[i++] = new I18nExportColumn("number", "fibu.rechnung.nummer", 6);
    cols[i++] = new I18nExportColumn("debitor", "fibu.common.debitor", 60);
    cols[i++] = new I18nExportColumn("subject", PropUtils.getI18nKey(AbstractRechnungDO.class, "betreff"), 100);
    // column property names
    sheet.setColumns(cols);
    final PropertyMapping mapping = new PropertyMapping();
    for (final RechnungDO entry : list) {
      entry.recalculate();
View Full Code Here

    final ExportColumn[] cols = new ExportColumn[5];
    int i = 0;
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "datum");
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "faelligkeit");
    cols[i] = new I18nExportColumn("gross", "fibu.rechnung.bruttoBetrag", 10);
    exporter.putCurrencyFormat(sheetProvider, cols[i++]);
    cols[i++] = new I18nExportColumn("creditor", "fibu.common.creditor", 60);
    cols[i++] = new I18nExportColumn("subject", PropUtils.getI18nKey(AbstractRechnungDO.class, "betreff"), 100);
    // column property names
    sheet.setColumns(cols);
    final PropertyMapping mapping = new PropertyMapping();
    for (final EingangsrechnungDO entry : list) {
      entry.recalculate();
View Full Code Here

  private I18nExportColumn createColumn(final ExcelExporter exporter, final ExportSheet sheet, final Class< ? > clazz, final String property)
  {
    final Field field = PropUtils.getField(clazz, property);
    final PropertyInfo propInfo = PropUtils.get(field);
    final I18nExportColumn exportColumn = new I18nExportColumn(property, propInfo.i18nKey(), 100);
    exporter.putFieldFormat(sheet, field, propInfo, exportColumn);
    return exportColumn;
  }
View Full Code Here

  @Override
  protected ExportColumn[] createColumns()
  {
    return new ExportColumn[] { //
        new I18nExportColumn(Col.NAME, "name", 20),
        new I18nExportColumn(Col.FIRST_NAME, "firstName", 20),
        new I18nExportColumn(Col.FORM, "address.form", 8),
        new I18nExportColumn(Col.TITLE, "address.title", 10),
        new I18nExportColumn(Col.CONTACT_STATUS, "address.contactStatus", 10),
        new I18nExportColumn(Col.ORGANIZATION, "organization", LENGTH_STD),
        new I18nExportColumn(Col.DIVISION, "address.division", LENGTH_STD),
        new I18nExportColumn(Col.POSITION, "address.positionText", LENGTH_STD), //
        new I18nExportColumn(Col.COMMUNICATION_LANG, "address.communication", LENGTH_STD), //
        new I18nExportColumn(Col.ADDRESS_CAMPAIGN_VALUE, "value", LENGTH_STD),
        new I18nExportColumn(Col.ADDRESS_CAMPAIGN_COMMENT, "comment", LENGTH_STD),
        new I18nExportColumn(Col.EMAIL, "email", LENGTH_EMAIL),
        new I18nExportColumn(Col.WEBSITE, "address.website", LENGTH_STD),
        new I18nExportColumn(Col.MAILING_ADDRESS, "address.addressText", LENGTH_STD),
        new I18nExportColumn(Col.MAILING_ZIPCODE, "address.zipCode", LENGTH_ZIPCODE),
        new I18nExportColumn(Col.MAILING_CITY, "address.city", LENGTH_STD),
        new I18nExportColumn(Col.MAILING_COUNTRY, "address.country", LENGTH_STD),
        new I18nExportColumn(Col.MAILING_STATE, "address.state", LENGTH_STD),
        new I18nExportColumn(Col.ADDRESS, "address.addressText", LENGTH_STD),
        new I18nExportColumn(Col.ZIPCODE, "address.zipCode", LENGTH_ZIPCODE), //
        new I18nExportColumn(Col.CITY, "address.city", LENGTH_STD),
        new I18nExportColumn(Col.COUNTRY, "address.country", LENGTH_STD), //
        new I18nExportColumn(Col.STATE, "address.state", LENGTH_STD),
        new I18nExportColumn(Col.POSTAL_ADDRESS, "address.postalAddressText", LENGTH_STD),
        new I18nExportColumn(Col.POSTAL_ZIPCODE, "address.zipCode", LENGTH_ZIPCODE),
        new I18nExportColumn(Col.POSTAL_CITY, "address.city", LENGTH_STD),
        new I18nExportColumn(Col.POSTAL_COUNTRY, "address.country", LENGTH_STD),
        new I18nExportColumn(Col.POSTAL_STATE, "address.state", LENGTH_STD),
        new I18nExportColumn(Col.ADDRESS_STATUS, "address.addressStatus", 12),
        new I18nExportColumn(Col.BUSINESS_PHONE, "address.phoneType.business", LENGTH_PHONENUMBER),
        new I18nExportColumn(Col.FAX, "address.phoneType.fax", LENGTH_PHONENUMBER),
        new I18nExportColumn(Col.MOBILE_PHONE, "address.phoneType.mobile", LENGTH_PHONENUMBER),
        new I18nExportColumn(Col.PRIVATE_ADDRESS, "address.privateAddressText", LENGTH_STD),
        new I18nExportColumn(Col.PRIVATE_ZIPCODE, "address.zipCode", LENGTH_ZIPCODE),
        new I18nExportColumn(Col.PRIVATE_CITY, "address.city", LENGTH_STD),
        new I18nExportColumn(Col.PRIVATE_COUNTRY, "address.country", LENGTH_STD),
        new I18nExportColumn(Col.PRIVATE_STATE, "address.state", LENGTH_STD),
        new I18nExportColumn(Col.PRIVATE_EMAIL, "address.privateEmail", LENGTH_EMAIL),
        new I18nExportColumn(Col.PRIVATE_PHONE, "address.phoneType.private", LENGTH_PHONENUMBER),
        new I18nExportColumn(Col.PRIVATE_MOBILE, "address.phoneType.privateMobile", LENGTH_PHONENUMBER),
        new I18nExportColumn(Col.BIRTHDAY, "address.birthday", DATE_LENGTH), //
        new I18nExportColumn(Col.MODIFIED, "modified", DATE_LENGTH), //
        new I18nExportColumn(Col.ID, "id", LENGTH_ZIPCODE)};
  }
View Full Code Here

    sheet.createFreezePane(0, 1);

    final ExportColumn[] cols = new ExportColumn[InvoicesCol.values().length];
    int i = 0;
    for (final InvoicesCol col : InvoicesCol.values()) {
      cols[i++] = new I18nExportColumn(col, col.theTitle, col.width);
    }

    // column property names
    sheet.setColumns(cols);
View Full Code Here

    sheet.createFreezePane(0, 1);

    final ExportColumn[] cols = new ExportColumn[AccountsCol.values().length];
    int i = 0;
    for (final AccountsCol col : AccountsCol.values()) {
      cols[i++] = new I18nExportColumn(col, col.theTitle, col.width);
    }

    // column property names
    sheet.setColumns(cols);
View Full Code Here

    final ExportWorkbook xls = new ExportWorkbook();
    final ContentProvider contentProvider = new MyXlsContentProvider(xls);
    xls.setContentProvider(contentProvider);
    final ExportSheet sheet = xls.addSheet(PFUserContext.getLocalizedString("fibu.kost1.kost1s"));
    final ExportColumn[] cols = new ExportColumn[] { //
        new I18nExportColumn(Col.KOST, "fibu.kost1", MyXlsContentProvider.LENGTH_KOSTENTRAEGER),
        new I18nExportColumn(Col.DESCRIPTION, "description", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.STATUS, "status", MyXlsContentProvider.LENGTH_STD)};
    sheet.setColumns(cols);
    final PropertyMapping mapping = new PropertyMapping();
    for (final Kost1DO kost : kost1List) {
      mapping.add(Col.KOST, kost.getFormattedNumber());
      mapping.add(Col.STATUS, kost.getKostentraegerStatus());
View Full Code Here

TOP

Related Classes of org.projectforge.excel.I18nExportColumn

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.