org.jfree.report.data

Class StaticDataRow

public class StaticDataRow extends Object implements DataRow

This is a static datarow holding a value for each name in the datarow. This datarow does not hold dataflags and thus does not track the changes done to the data inside.

The StaticDataRow is a derived view and is used to provide a safe collection of the values of the previous datarow.

Author: Thomas Morgner

Constructor Summary
protected StaticDataRow()
protected StaticDataRow(StaticDataRow dataRow)
StaticDataRow(DataRow dataRow)
StaticDataRow(String[] names, Object[] values)
Method Summary
Objectget(int col)
Returns the value of the expression or column in the tablemodel using the given column number as index.
Objectget(String col)
Returns the value of the function, expression or column using its specific name.
intgetColumnCount()
Returns the number of columns, expressions and functions and marked ReportProperties in the report.
StringgetColumnName(int col)
Returns the name of the column, expression or function.
DataFlagsgetFlags(String col)
DataFlagsgetFlags(int col)
protected voidsetData(String[] names, Object[] values)
protected voidupdateData(Object[] values)

Constructor Detail

StaticDataRow

protected StaticDataRow()

StaticDataRow

protected StaticDataRow(StaticDataRow dataRow)

StaticDataRow

public StaticDataRow(DataRow dataRow)

StaticDataRow

public StaticDataRow(String[] names, Object[] values)

Method Detail

get

public Object get(int col)
Returns the value of the expression or column in the tablemodel using the given column number as index. For functions and expressions, the getValue() method is called and for columns from the tablemodel the tablemodel method getValueAt(row, column) gets called.

Parameters: col the item index.

Returns: the value.

Throws: IllegalStateException if the datarow detected a deadlock.

get

public Object get(String col)
Returns the value of the function, expression or column using its specific name. The given name is translated into a valid column number and the the column is queried. For functions and expressions, the getValue() method is called and for columns from the tablemodel the tablemodel method getValueAt(row, column) gets called.

Parameters: col the item index.

Returns: the value.

Throws: IllegalStateException if the datarow detected a deadlock.

getColumnCount

public int getColumnCount()
Returns the number of columns, expressions and functions and marked ReportProperties in the report.

Returns: the item count.

getColumnName

public String getColumnName(int col)
Returns the name of the column, expression or function. For columns from the tablemodel, the tablemodels getColumnName method is called. For functions, expressions and report properties the assigned name is returned.

Parameters: col the item index.

Returns: the name.

getFlags

public DataFlags getFlags(String col)

getFlags

public DataFlags getFlags(int col)

setData

protected void setData(String[] names, Object[] values)

updateData

protected void updateData(Object[] values)