org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table
Class ColumnData

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.ColumnData

public final class ColumnData
extends java.lang.Object

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/renderkit/core/xhtml/table/ColumnData.java#0 $) $Date: 10-nov-2005.19:02:34 $
Author:
The Oracle ADF Faces Team

Field Summary
static int ICON_FORMAT
          corresponds to CoreColumn.ALIGN_CENTER
static int NUMBER_FORMAT
          corresponds to CoreColumn.ALIGN_RIGHT
static int SPECIAL_COLUMN_INDEX
          the logical index of a special column such as select,details,etc...
static int TEXT_FORMAT
          corresponds to CoreColumn.ALIGN_LEFT
 
Constructor Summary
ColumnData()
           
 
Method Summary
 int getColumnCount()
           
 java.lang.String getCurrentHeaderID()
           
 boolean getCurrentHeaderNoWrap()
          gets whether the current header should be wrapped
 java.awt.Dimension getCurrentSpan()
          Gets the row/colSpan that the current header node should use.
 java.lang.String getHeaderID(int physicalIndex)
          gets the id for this column
 java.lang.String getHeaderIDs(int physicalIndex)
          gets the list of header IDs that apply to the given column.
 boolean getHeaderNoWrap(int physicalIndex)
           
 int getHeaderRowSpan()
           
 int getLogicalColumnIndex()
           
 boolean getNoWrap(int physicalIndex)
           
 int getObjectNameColumnIndex()
          gets the physical index of the designated object name column.
 int getPhysicalColumnIndex()
           
 int getPhysicalIndexOfFirstFooter()
          gets the physical index of the first column with a footer
 int getRowIndex()
          gets the rowIndex for a columnHeader. this is used for rowSpanning in column headers.
 java.lang.Object getWidth(int physicalIndex)
           
 void incrementColumnIndex()
          increments both the physical and the logical column indices by one.
 boolean isColumnGroupHeader()
           
 boolean isRowHeader(int physicalIndex)
          returns true if the specified column's rowHeader attribute is true.
static java.lang.String selectFormat(TableRenderingContext tContext, java.lang.String textClass, java.lang.String numberClass, java.lang.String iconClass)
           
 void setColumnCount(int columns)
          sets the number of visible columns in the data part of this table.
 void setColumnData(java.lang.Object width, java.lang.Object align, boolean noWrap, boolean headerNoWrap, boolean separateRows, boolean rowHeader)
           
 void setColumnGroupHeader(boolean isColumnGroupHeader)
           
 void setColumnIndex(int physical, int logical)
          sets the (zero based) indices of the column that is currently being rendered
 void setCurrentColumnHasFooter()
          indicates that the current column has a footer
 void setCurrentHeaderID(java.lang.String id)
           
 void setCurrentHeaderNoWrap(boolean isNoWrap)
          sets whether the current header should be wrapped.
 void setCurrentSpan(int rowSpan, int colSpan)
          indicate to a header node what row/colSpan it should use.
 void setDataFormat(int physicalIndex, java.lang.Object format)
           
 void setHeaderID(int physicalIndex, java.lang.String headerID)
          sets the id for this column
 void setHeaderIDs(int physicalIndex, java.lang.String headerIDs)
          sets the list of IDs that apply to this column
 void setHeaderRowSpan(int span)
           
 void setRowIndex(int index)
          sets the rowIndex for a columnHeader. this is used for rowSpanning in column headers.
 void setSpecialColumnData(TableRenderingContext tContext, org.apache.myfaces.trinidad.context.RenderingContext arc, boolean noWrap, java.lang.String formatType)
           
 boolean useSeparateRows(int physicalIndex)
          returs true if the specified column's useSeparateRows attr is true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_FORMAT

public static final int TEXT_FORMAT
corresponds to CoreColumn.ALIGN_LEFT

See Also:
Constant Field Values

NUMBER_FORMAT

public static final int NUMBER_FORMAT
corresponds to CoreColumn.ALIGN_RIGHT

See Also:
Constant Field Values

ICON_FORMAT

public static final int ICON_FORMAT
corresponds to CoreColumn.ALIGN_CENTER

See Also:
Constant Field Values

SPECIAL_COLUMN_INDEX

public static final int SPECIAL_COLUMN_INDEX
the logical index of a special column such as select,details,etc...

See Also:
Constant Field Values
Constructor Detail

ColumnData

public ColumnData()
Method Detail

getRowIndex

public int getRowIndex()
gets the rowIndex for a columnHeader. this is used for rowSpanning in column headers.

Returns:

setRowIndex

public void setRowIndex(int index)
sets the rowIndex for a columnHeader. this is used for rowSpanning in column headers.

Parameters:
index -

getColumnCount

public int getColumnCount()
Returns:
the number of visible table columns.
See Also:
setColumnCount(int)

setColumnCount

public void setColumnCount(int columns)
sets the number of visible columns in the data part of this table. The column count must NOT include special columns like select and details.


getObjectNameColumnIndex

public int getObjectNameColumnIndex()
gets the physical index of the designated object name column.

Returns:

getPhysicalIndexOfFirstFooter

public int getPhysicalIndexOfFirstFooter()
gets the physical index of the first column with a footer


setCurrentColumnHasFooter

public void setCurrentColumnHasFooter()
indicates that the current column has a footer


getPhysicalColumnIndex

public int getPhysicalColumnIndex()
See Also:
setColumnIndex(int, int)

getLogicalColumnIndex

public int getLogicalColumnIndex()
See Also:
setColumnIndex(int, int)

setColumnIndex

public void setColumnIndex(int physical,
                           int logical)
sets the (zero based) indices of the column that is currently being rendered

Parameters:
physical - this is the index of the column as it appears visually on the screen. rowHeaders will always have a physical index of zero.
logical - this is the index of the indexed child (of the table) being used to render this column
See Also:
getPhysicalColumnIndex(), getLogicalColumnIndex(), incrementColumnIndex()

incrementColumnIndex

public void incrementColumnIndex()
increments both the physical and the logical column indices by one.

See Also:
setColumnIndex(int,int)

setCurrentSpan

public void setCurrentSpan(int rowSpan,
                           int colSpan)
indicate to a header node what row/colSpan it should use.


getCurrentSpan

public java.awt.Dimension getCurrentSpan()
Gets the row/colSpan that the current header node should use.


getHeaderRowSpan

public int getHeaderRowSpan()
Returns:
the rowSpan of this table's entire columnHeader. the default value is one.
See Also:
setHeaderRowSpan(int)

setHeaderRowSpan

public void setHeaderRowSpan(int span)
Parameters:
span - the rowSpan of the entire column header. The span will only be set if it is greater than the current span.

getHeaderIDs

public java.lang.String getHeaderIDs(int physicalIndex)
gets the list of header IDs that apply to the given column.


getHeaderID

public java.lang.String getHeaderID(int physicalIndex)
gets the id for this column

Parameters:
physicalIndex -
Returns:

setHeaderID

public void setHeaderID(int physicalIndex,
                        java.lang.String headerID)
sets the id for this column

Parameters:
physicalIndex -
headerID -

setHeaderIDs

public void setHeaderIDs(int physicalIndex,
                         java.lang.String headerIDs)
sets the list of IDs that apply to this column

Parameters:
physicalIndex -
headerIDs -

setCurrentHeaderID

public void setCurrentHeaderID(java.lang.String id)

getCurrentHeaderID

public java.lang.String getCurrentHeaderID()

setCurrentHeaderNoWrap

public void setCurrentHeaderNoWrap(boolean isNoWrap)
sets whether the current header should be wrapped. this is to pass information from a columnGroup to a sortableHeader.


getCurrentHeaderNoWrap

public boolean getCurrentHeaderNoWrap()
gets whether the current header should be wrapped


useSeparateRows

public boolean useSeparateRows(int physicalIndex)
returs true if the specified column's useSeparateRows attr is true.


isRowHeader

public boolean isRowHeader(int physicalIndex)
returns true if the specified column's rowHeader attribute is true.


setColumnData

public void setColumnData(java.lang.Object width,
                          java.lang.Object align,
                          boolean noWrap,
                          boolean headerNoWrap,
                          boolean separateRows,
                          boolean rowHeader)

setSpecialColumnData

public void setSpecialColumnData(TableRenderingContext tContext,
                                 org.apache.myfaces.trinidad.context.RenderingContext arc,
                                 boolean noWrap,
                                 java.lang.String formatType)

getWidth

public java.lang.Object getWidth(int physicalIndex)

getNoWrap

public boolean getNoWrap(int physicalIndex)
Parameters:
physicalIndex - the physical index of the column.
Returns:
true, if this column should have text wrapping turned off

getHeaderNoWrap

public boolean getHeaderNoWrap(int physicalIndex)
Parameters:
physicalIndex - the physical index of the column.
Returns:
true, if this column should have text wrapping turned off for the header

isColumnGroupHeader

public boolean isColumnGroupHeader()
Returns:
true if we are currently rendering the column group header

setColumnGroupHeader

public void setColumnGroupHeader(boolean isColumnGroupHeader)
Parameters:
isColumnGroupHeader - true if we are currently rendering the column group header

setDataFormat

public void setDataFormat(int physicalIndex,
                          java.lang.Object format)

selectFormat

public static java.lang.String selectFormat(TableRenderingContext tContext,
                                            java.lang.String textClass,
                                            java.lang.String numberClass,
                                            java.lang.String iconClass)
Parameters:
tContext - the column being processed is the one at the physicalColumnIndex in this table context.
textClass - the styleClass to return if the column align is "left"
numberClass - the styleClass to return if the column align is "right"
iconClass - the string to return if the column align is "center".
Returns:
a column style class to use depending on the type of data in that column.


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.