jdbreport.model
Interface TableRow

All Superinterfaces:
Iterable<Cell>
All Known Implementing Classes:
NullReportRow, ReportRow, TemplateNullRow, TemplateRow

public interface TableRow
extends Iterable<Cell>

Interface for a row of the report

Version:
2.0 11.05.2011
Author:
Andrey Kholmanskih

Method Summary
 void addColumn(int index)
          Inserts the null cell at the specified position in this row
 void addColumn(int index, Cell cellItem)
          Inserts the Cell at the specified position in this row
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 Cell createCellItem(int column)
          Creates a new Cell for specified column in the current row
 Cell getCellItem(int column)
           
 int getColCount()
           
 RowsGroup getGroup()
          Returns parental group
 TableCellRenderer getHeaderRenderer()
          Returns renderer for the row's header
 Object getHeaderValue()
          Returns the value of the row's header
 int getHeight()
           
 float getNativeHeight()
           
 boolean isNull()
          If true, the row is null
 boolean isPageBreak()
          Returns true if this row is the end of the page.
 boolean isPageHeader()
          Determines an accessory of a row to page heading
 Iterator<Cell> iterator()
          Returns an iterator over the cells in this row in proper sequence.
 Cell removeCell(int index)
          Replaces the cell at the specified position by NullCell
 Cell removeColumn(int index)
          Removes the cell at the specified position in this row Makes the columns' count smaller
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void setCellItem(Cell cellItem, int column)
          Sets Cell for specified column
 void setColCount(int count)
          Sets column's count
 void setHeaderValue(Object value)
          Sets the value of the row's header
 void setHeight(int height)
          Sets the row's height
 void setHeight(int height, boolean dragging)
          Sets the row's height when resizing
 void setPageBreak(boolean b)
          Sets pageBreak property
 

Method Detail

getHeight

int getHeight()
Returns:
row's height in pixels

setHeight

void setHeight(int height)
Sets the row's height

Parameters:
height - new row's height

setHeight

void setHeight(int height,
               boolean dragging)
Sets the row's height when resizing

Parameters:
height - new row's height
dragging -

getNativeHeight

float getNativeHeight()
Returns:
row's height in points

getHeaderRenderer

TableCellRenderer getHeaderRenderer()
Returns renderer for the row's header

Returns:
TableCellRenderer

getCellItem

Cell getCellItem(int column)
Parameters:
column -
Returns:
Cell for specified column

setCellItem

void setCellItem(Cell cellItem,
                 int column)
Sets Cell for specified column

Parameters:
cellItem - - a new Cell
column - the column's index

createCellItem

Cell createCellItem(int column)
Creates a new Cell for specified column in the current row

Parameters:
column -
Returns:
created Cell

getColCount

int getColCount()
Returns:
column's count

setColCount

void setColCount(int count)
Sets column's count

Parameters:
count -

addColumn

void addColumn(int index)
Inserts the null cell at the specified position in this row

Parameters:
index - index at which the column is to be inserted.

addColumn

void addColumn(int index,
               Cell cellItem)
Inserts the Cell at the specified position in this row

Parameters:
index - index at which the specified Cell is to be inserted.
cellItem - Cell to be inserted.

removeColumn

Cell removeColumn(int index)
Removes the cell at the specified position in this row Makes the columns' count smaller

Parameters:
index - the index of the cell to removed.
Returns:
the Cell previously at the specified position.

removeCell

Cell removeCell(int index)
Replaces the cell at the specified position by NullCell

Parameters:
index - the index of the cell to removed.
Returns:
the Cell previously at the specified position.

isPageBreak

boolean isPageBreak()
Returns true if this row is the end of the page.

Returns:
pageBreak property

setPageBreak

void setPageBreak(boolean b)
Sets pageBreak property

Parameters:
b - if true, the sets horizontal page break after row

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.

Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

Parameters:
listener - the PropertyChangeListener to be removed

isNull

boolean isNull()
If true, the row is null

Returns:
if true, the row is null

getHeaderValue

Object getHeaderValue()
Returns the value of the row's header

Returns:
the value of the row's header

setHeaderValue

void setHeaderValue(Object value)
Sets the value of the row's header

Parameters:
value - new header's value

iterator

Iterator<Cell> iterator()
Returns an iterator over the cells in this row in proper sequence.

Specified by:
iterator in interface Iterable<Cell>
Returns:
iterator of cells

getGroup

RowsGroup getGroup()
Returns parental group

Returns:
parental group

isPageHeader

boolean isPageHeader()
Determines an accessory of a row to page heading

Returns:
истина, если строка в заголовке страницы, иначе ложь
Since:
2.0