Package org.pentaho.reporting.engine.classic.core.layout.model.table.columns

Examples of org.pentaho.reporting.engine.classic.core.layout.model.table.columns.TableColumnModel


    final MinorAxisTableContext tableContext = getTableContext();
    final TableCellRenderBox tableCellRenderBox = (TableCellRenderBox) box;

    // This is slightly different for table cells ...
    final int columnIndex = tableCellRenderBox.getColumnIndex();
    final TableColumnModel columnModel = tableContext.getColumnModel();

    // cell-size does not include border spacing
    final long startOfRowX = nodeContext.getParentX1();

    final long x = startOfRowX + columnModel.getCellPosition(columnIndex);
    final long insetsLeft = Math.max(box.getInsetsLeft(), columnModel.getBorderSpacing() / 2);
    final long insetsRight = Math.max(box.getInsetsRight(), columnModel.getBorderSpacing() / 2);
    final long width = computeCellWidth(tableCellRenderBox);
    nodeContext.setArea(x, insetsLeft, insetsRight, width);
    return true;
  }
View Full Code Here


    if (box.getNodeType() != LayoutNodeTypes.TYPE_BOX_TABLE)
    {
      return false;
    }

    final TableColumnModel columnModel = tableContext.getTable().getColumnModel();
    if (tableContext.isStructureValidated() == false)
    {
      columnModel.validateSizes((TableRenderBox) box);
      tableContext.setStructureValidated(true);
    }
    box.setCachedWidth(columnModel.getCachedSize());
    tableContext = tableContext.pop();
    return true;
  }
View Full Code Here

  protected long computeCellWidth(final TableCellRenderBox tableCellRenderBox)
  {
    final MinorAxisTableContext tableContext = getTableContext();
    final int columnIndex = tableCellRenderBox.getColumnIndex();
    final TableColumnModel columnModel = tableContext.getColumnModel();

    final int colSpan = tableCellRenderBox.getColSpan();
    if (colSpan <= 0)
    {
      throw new InvalidReportStateException("A cell cannot have a col-span of zero or less");
    }

    long cellSizeFromModel = 0;
    for (int i = 0; i < colSpan; i++)
    {
      cellSizeFromModel += columnModel.getEffectiveColumnSize(columnIndex + i);
      cellSizeFromModel += columnModel.getBorderSpacing();
    }
    cellSizeFromModel -= columnModel.getBorderSpacing();
    return cellSizeFromModel;
  }
View Full Code Here

    final MinorAxisTableContext tableContext = getTableContext();
    final TableCellRenderBox tableCellRenderBox = (TableCellRenderBox) box;

    // This is slightly different for table cells ...
    final int columnIndex = tableCellRenderBox.getColumnIndex();
    final TableColumnModel columnModel = tableContext.getColumnModel();

    // cell-size does not include border spacing
    final long startOfRowX = nodeContext.getParentX1();

    final long x = startOfRowX + columnModel.getCellPosition(columnIndex);
    final long insetsLeft = Math.max(box.getInsetsLeft(), columnModel.getBorderSpacing() / 2);
    final long insetsRight = Math.max(box.getInsetsRight(), columnModel.getBorderSpacing() / 2);
    final long width = computeCellWidth(tableCellRenderBox);
    nodeContext.setArea(x, insetsLeft, insetsRight, width);
    return true;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.table.columns.TableColumnModel

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.