jdbreport.design.model
Class TemplateRowModel

java.lang.Object
  extended by jdbreport.model.ReportRowModel
      extended by jdbreport.design.model.TemplateRowModel
All Implemented Interfaces:
PropertyChangeListener, Serializable, Iterable<TableRow>, EventListener, ListSelectionListener, TableRowModel

public class TemplateRowModel
extends ReportRowModel

Version:
2.0 18.05.2011
Author:
Andrey Kholmanskih
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jdbreport.model.ReportRowModel
changeEvent, listenerList, rowList, rowMargin
 
Fields inherited from interface jdbreport.model.TableRowModel
maxHeight, minHeight
 
Constructor Summary
TemplateRowModel(JReportModel reportModel)
           
 
Method Summary
 int addRows(int count, int ind, int type)
           
protected  void clearPageHeader(int startRow)
          removes all page headers and page footers from report
protected  RootGroup createRootGroup()
           
 TableRow createTableRow()
          Creates new default TableRow
protected  TableRow getNullRow()
           
 void moveDraggedRow(int rowIndex, int newIndex)
          Moves the dragged row and its header at rowIndex to newIndex.
 void moveRow(int rowIndex, int newIndex)
          Moves the row and its header at rowIndex to newIndex.
 void setRowType(int[] selectedRows, int type)
          Sets type of the selected rows
protected  void updateHeaderValue()
           
 void updatePages(int startRow, int pageHeight)
          Calculates pages' size
 
Methods inherited from class jdbreport.model.ReportRowModel
addColumn, addRow, addRow, addRow, addRow, addRow, addRowModelListener, addRows, clearUnion, disableSpan, enableSpan, endUpdate, fireRowAdded, fireRowMarginChanged, fireRowMoved, fireRowRemoved, fireRowResizing, fireRowSelectionChanged, fireRowUpdated, getCellPosition, getColCount, getFirstPageNumber, getGroup, getGroup, getGroup, getGroupRowIndex, getHeaderValue, getMaxRowHeight, getMinRowHeight, getOwnerRow, getPageCount, getPageHeight, getPageNumber, getPreferredRowHeight, getRootGroup, getRow, getRowCount, getRowHeight, getRowIndex, getRowIndexAtY, getRowMargin, getRowModelListeners, getTotalRowHeight, hideGroup, isCanHideGroup, isCanUpdatePages, isCollapse, isDirtyHeader, isPrintLeftToRight, isUpdate, iterator, moveColumn, propertyChange, recalcHeightCache, removeColumn, removeGroup, removeRowModelListener, removeRows, removeRows, setCanHideGroup, setCanUpdatePages, setColCount, setDirtyHeader, setFirstPageNumber, setPageHeight, setPreferredRowHeight, setPrintLeftToRight, setRowCount, setRowHeight, setRowHeight, setRowHeight, setRowMargin, setShowPageNumber, setVisibleGroup, showGroup, startUpdate, unionCells, updateCellChild, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateRowModel

public TemplateRowModel(JReportModel reportModel)
Method Detail

createTableRow

public TableRow createTableRow()
Description copied from interface: TableRowModel
Creates new default TableRow

Specified by:
createTableRow in interface TableRowModel
Overrides:
createTableRow in class ReportRowModel
Returns:
the TableRow object

updateHeaderValue

protected void updateHeaderValue()
Overrides:
updateHeaderValue in class ReportRowModel

createRootGroup

protected RootGroup createRootGroup()
Overrides:
createRootGroup in class ReportRowModel

clearPageHeader

protected void clearPageHeader(int startRow)
Description copied from class: ReportRowModel
removes all page headers and page footers from report

Overrides:
clearPageHeader in class ReportRowModel

updatePages

public void updatePages(int startRow,
                        int pageHeight)
Description copied from interface: TableRowModel
Calculates pages' size

Specified by:
updatePages in interface TableRowModel
Overrides:
updatePages in class ReportRowModel
Parameters:
startRow - the first row for calculation
pageHeight - page height in pixels

setRowType

public void setRowType(int[] selectedRows,
                       int type)
Sets type of the selected rows

Parameters:
selectedRows - - the selected rows
type - - the row's type

getNullRow

protected TableRow getNullRow()
Overrides:
getNullRow in class ReportRowModel

moveDraggedRow

public void moveDraggedRow(int rowIndex,
                           int newIndex)
Description copied from interface: TableRowModel
Moves the dragged row and its header at rowIndex to newIndex.

Specified by:
moveDraggedRow in interface TableRowModel
Overrides:
moveDraggedRow in class ReportRowModel
Parameters:
rowIndex - the index of row to be moved
newIndex - index of the row's new location

moveRow

public void moveRow(int rowIndex,
                    int newIndex)
Description copied from interface: TableRowModel
Moves the row and its header at rowIndex to newIndex. The old row at rowIndex will now be found at newIndex. The row that used to be at newIndex is shifted top or bottom to make room. This will not move any rows if rowIndex equals newIndex. This method posts a rowMoved event to its listeners.

Specified by:
moveRow in interface TableRowModel
Overrides:
moveRow in class ReportRowModel
Parameters:
rowIndex - the index of row to be moved
newIndex - index of the row's new location

addRows

public int addRows(int count,
                   int ind,
                   int type)
Parameters:
count - the rows count
ind - the row's index
type - the group's type
Returns:
the inserting row's index