Package org.pentaho.reporting.engine.classic.core.util

Examples of org.pentaho.reporting.engine.classic.core.util.TypedMetaTableModel


    columnNames[2] = "boolean";
    columnTypes[2] = Boolean.class;
    columnNames[3] = "date";
    columnTypes[3] = Date.class;

    final TypedMetaTableModel metaTableModel = new TypedMetaTableModel(columnNames, columnTypes);
    for (int idx = 0; idx < 4; idx += 1)
    {
      metaTableModel.setColumnAttribute
          (idx, MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.LABEL, "Label " + columnNames[idx]);

      // these don't seem to get picked up
      metaTableModel.setColumnAttribute
          (idx, MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.FORMAT, "#,###.00");

      metaTableModel.setColumnAttribute
          (idx, MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.HORIZONTAL_ALIGNMENT, ElementAlignment.CENTER);

      metaTableModel.setColumnAttribute
          (idx, MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.ITALIC, Boolean.TRUE);
    }
    return metaTableModel;
  }
View Full Code Here


  public TableModel queryDesignTimeStructure(final String queryName,
                                             final DataRow parameter) throws ReportDataFactoryException
  {
    final Query queryObject = parseQuery(queryName);
    List<Selection> selections = queryObject.getSelections();
    TypedMetaTableModel tableModel = new TypedMetaTableModel();
    for (final Selection selection : selections)
    {
      LogicalColumn logicalColumn = selection.getLogicalColumn();
      String id = logicalColumn.getId();
      DataType dataType = logicalColumn.getDataType();
      tableModel.addColumn(id, mapDataType(dataType));
    }
    return new PmdMetaTableModel(tableModel, selections);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.TypedMetaTableModel

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.