Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jfor.jfor.converter
Class TableContext  view TableContext download TableContext.java

java.lang.Object
  extended byorg.jfor.jfor.converter.TableContext
All Implemented Interfaces:
org.jfor.jfor.interfaces.ITableColumnsInfo

class TableContext
extends java.lang.Object
implements org.jfor.jfor.interfaces.ITableColumnsInfo

Used when handling fo:table to hold information common to several builders that collaborate to build the table.


Field Summary
private  int m_colIndex
           
private  java.util.ArrayList m_colRowSpanningAttrs
          Added by Peter Herweg on 2002-06-29 If there has a vertical merged cell to be created, its attributes are inherited from the corresponding MERGE_START-cell.
private  java.util.ArrayList m_colRowSpanningNumber
          Added by Peter Herweg on 2002-06-29 This ArrayList contains one element for each column in the table.
private  java.util.ArrayList m_colWidths
           
private  BuilderContext m_context
           
 
Fields inherited from interface org.jfor.jfor.interfaces.ITableColumnsInfo
INVALID_COLUM_WIDTH
 
Constructor Summary
(package private) TableContext(BuilderContext ctx)
           
 
Method Summary
 void decreaseRowSpannings()
          Added by Peter Herweg on 2002-06-29 This function is called after each finished table-row.
 int getColumnIndex()
          Added by Boris Poudérous on 07/22/2002
(package private)  org.jfor.jfor.rtflib.rtfdoc.RtfAttributes getColumnRowSpanningAttrs()
           
(package private)  java.lang.Integer getColumnRowSpanningNumber()
           
 float getColumnWidth()
          get current column width according to column iteration index
 int getNumberOfColumns()
          Added by Boris Poudérous on 07/22/2002
 void selectFirstColumn()
          reset the column iteration index, meant to be called when creating a new row The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing
 void selectNextColumn()
          increment the column iteration index The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing
(package private)  void setCurrentColumnRowSpanning(java.lang.Integer iRowSpanning, org.jfor.jfor.rtflib.rtfdoc.RtfAttributes attrs)
           
 void setNextColumnRowSpanning(java.lang.Integer iRowSpanning, org.jfor.jfor.rtflib.rtfdoc.RtfAttributes attrs)
           
(package private)  void setNextColumnWidth(java.lang.String strWidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_context

private final BuilderContext m_context

m_colWidths

private final java.util.ArrayList m_colWidths

m_colIndex

private int m_colIndex

m_colRowSpanningNumber

private final java.util.ArrayList m_colRowSpanningNumber
Added by Peter Herweg on 2002-06-29 This ArrayList contains one element for each column in the table. value == 0 means there is no row-spanning value > 0 means there is row-spanning Each value in the list is decreased by 1 after each finished table-row


m_colRowSpanningAttrs

private final java.util.ArrayList m_colRowSpanningAttrs
Added by Peter Herweg on 2002-06-29 If there has a vertical merged cell to be created, its attributes are inherited from the corresponding MERGE_START-cell. For this purpose the attributes of a cell are stored in this array, as soon as a number-rows-spanned attribute has been found.

Constructor Detail

TableContext

TableContext(BuilderContext ctx)
Method Detail

setNextColumnWidth

void setNextColumnWidth(java.lang.String strWidth)
                  throws ValueConversionException

getColumnRowSpanningAttrs

org.jfor.jfor.rtflib.rtfdoc.RtfAttributes getColumnRowSpanningAttrs()

getColumnRowSpanningNumber

java.lang.Integer getColumnRowSpanningNumber()

setCurrentColumnRowSpanning

void setCurrentColumnRowSpanning(java.lang.Integer iRowSpanning,
                                 org.jfor.jfor.rtflib.rtfdoc.RtfAttributes attrs)
                           throws ValueConversionException

setNextColumnRowSpanning

public void setNextColumnRowSpanning(java.lang.Integer iRowSpanning,
                                     org.jfor.jfor.rtflib.rtfdoc.RtfAttributes attrs)

decreaseRowSpannings

public void decreaseRowSpannings()
Added by Peter Herweg on 2002-06-29 This function is called after each finished table-row. It decreases all values in m_colRowSpanningNumber by 1. If a value reaches 0 row-spanning is finished, and the value won't be decreased anymore.


selectFirstColumn

public void selectFirstColumn()
reset the column iteration index, meant to be called when creating a new row The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing

Specified by:
selectFirstColumn in interface org.jfor.jfor.interfaces.ITableColumnsInfo

selectNextColumn

public void selectNextColumn()
increment the column iteration index The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing

Specified by:
selectNextColumn in interface org.jfor.jfor.interfaces.ITableColumnsInfo

getColumnWidth

public float getColumnWidth()
get current column width according to column iteration index

Specified by:
getColumnWidth in interface org.jfor.jfor.interfaces.ITableColumnsInfo

getColumnIndex

public int getColumnIndex()
Added by Boris Poudérous on 07/22/2002

Specified by:
getColumnIndex in interface org.jfor.jfor.interfaces.ITableColumnsInfo

getNumberOfColumns

public int getNumberOfColumns()
Added by Boris Poudérous on 07/22/2002

Specified by:
getNumberOfColumns in interface org.jfor.jfor.interfaces.ITableColumnsInfo