Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.layoutmgr.table
Class ColumnSetup

    java.lang.Object
      org.apache.fop.layoutmgr.table.ColumnSetup

public class ColumnSetup
extends java.lang.Object

Class holding a number of columns making up the column setup of a row.

Constructor Summary
`ColumnSetup(Table table)` Main Constructor.

Method Summary
`float` | `computeTableUnit(PercentBaseContext percentBaseContext, int contentAreaIPD)` Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]
`protected double` | `computeTableUnit(TableLayoutManager tlm)` Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]
`TableColumn` | `getColumn(int index)` Returns a column.
`int` | `getColumnCount()`
`int` | `getSumOfColumnWidths(PercentBaseContext context)` Calculates the sum of all column widths.
`int` | `getXOffset(int col, PercentBaseContext context)`
`java.util.Iterator` | `iterator()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ColumnSetup

    public ColumnSetup(Table table)

  Main Constructor.

Parameters:
  `table` - the table to construct this column setup for

Method Detail

### getColumn

    public TableColumn getColumn(int index)

  Returns a column. If the index of the column is bigger than the number of explicitly defined columns the last column is returned.

  Parameters:
    `index` - index of the column (1 is the first column)
  Returns:
    the requested column

### toString

    public java.lang.String toString()

### getColumnCount

    public int getColumnCount()

  Returns:
    the number of columns in the setup.

### iterator

    public java.util.Iterator iterator()

  Returns:
    an Iterator over all columns

### computeTableUnit

    protected double computeTableUnit(TableLayoutManager tlm)

  Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]

  Parameters:
    `tlm` - the TableLayoutManager
  Returns:
    the computed base unit (in millipoint)

### computeTableUnit

    public float computeTableUnit(PercentBaseContext percentBaseContext,
                                  int contentAreaIPD)

  Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]

  Parameters:
    `percentBaseContext` - the percent base context for relative values
    `contentAreaIPD` - the IPD of the available content area
  Returns:
    the computed base unit (in millipoints)

### getXOffset

    public int getXOffset(int col,
                          PercentBaseContext context)

  Parameters:
    `col` - column index (1 is first column)
    `context` - the context for percentage based calculations
  Returns:
    the X offset of the requested column

### getSumOfColumnWidths

    public int getSumOfColumnWidths(PercentBaseContext context)

  Calculates the sum of all column widths.

  Parameters:
    `context` - the context for percentage based calculations
  Returns:
    the requested sum in millipoints

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.