com.fdsapi
Class DataSetCellAlternating

java.lang.Object
  |
  +--com.fdsapi.DataSet
        |
        +--com.fdsapi.DataSetCellBase
              |
              +--com.fdsapi.DataSetCellAlternating
All Implemented Interfaces:
java.lang.Cloneable

public class DataSetCellAlternating
extends DataSetCellBase

Used when different text is required for every other row or cell (or any other Template Tag). Sample use in a template that would use a stylesheet entry of to specify different colors for odd and even rows.

<!-- BODY_ROW_PREFIX -->Type==Alternating
Odd== <tr class="odd">
Even== <tr class="even">
<!-- BODY_ROW_PREFIX -->

Every odd row will use <tr class="odd">, and every even row will use <tr class="even">

View Code


Field Summary
 
Fields inherited from class com.fdsapi.DataSet
dataSetParm, templateTagType, variables
 
Constructor Summary
DataSetCellAlternating()
           
 
Method Summary
 DataSet createFactoryInstance()
          A Factory method that creates a clone of this DataSet (see gang of 4 "Factory method" pattern).
 void execute(int y)
          Use modulo math to determine if this element (which could be a row, col etc) is odd or even and take appropriate action by placing the "odd" or "even" template variable contents into the text buffer.
 
Methods inherited from class com.fdsapi.DataSetCellBase
createDataIterator, getIncrementData, getType
 
Methods inherited from class com.fdsapi.DataSet
clone, createFactoryInstance, execute, getCellData, getDataSetParm, getMiscDataMap, getStringBuffer, getTabularData, getTemplateVariables, getVariableValue, initialize, log, next, setDataSetParm, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSetCellAlternating

public DataSetCellAlternating()
Method Detail

createFactoryInstance

public DataSet createFactoryInstance()
Description copied from class: DataSet
A Factory method that creates a clone of this DataSet (see gang of 4 "Factory method" pattern). This allows the type of DataSet to be determined at runtime.

Specified by:
createFactoryInstance in class DataSet

execute

public void execute(int y)
Use modulo math to determine if this element (which could be a row, col etc) is odd or even and take appropriate action by placing the "odd" or "even" template variable contents into the text buffer.

Specified by:
execute in class DataSet