|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdbreport.model.ReportRowModel
public class ReportRowModel
| Field Summary | |
|---|---|
protected ChangeEvent |
changeEvent
Change event (only one needed) |
protected EventListenerList |
listenerList
|
protected ArrayList<TableRow> |
rowList
|
protected int |
rowMargin
|
| Fields inherited from interface jdbreport.model.TableRowModel |
|---|
maxHeight, minHeight |
| Constructor Summary | |
|---|---|
ReportRowModel(JReportModel reportModel)
|
|
| Method Summary | |
|---|---|
void |
addColumn(int column)
Adds column in the model |
TableRow |
addRow()
Adds the new row |
TableRow |
addRow(int row)
Adds the row at the specified position |
int |
addRow(int arow,
TableRow tableRow)
Adds the row at the specified position |
int |
addRow(RowsGroup group,
int indexInGroup)
Adds the row to the group |
int |
addRow(RowsGroup group,
int indexInGroup,
TableRow tableRow)
Adds the row to the group |
void |
addRowModelListener(TableRowModelListener x)
Adds a listener for report row model events. |
int |
addRows(int count,
int index)
Adds rows' count to the index of the model. |
protected void |
clearPageHeader(int startRow)
removes all page headers and page footers from report |
void |
clearUnion(int topRow,
int leftCol,
int bottomRow,
int rightCol)
Clears the unions of the selected cells |
protected RootGroup |
createRootGroup()
|
TableRow |
createTableRow()
Creates new default TableRow |
void |
disableSpan()
Clears all cells unions before moving of rows or columns |
void |
enableSpan()
Restores all cells unions after moving of rows or columns |
void |
endUpdate()
Allows notification of listeners after updates of model |
protected void |
fireRowAdded(TableRowModelEvent e)
|
protected void |
fireRowMarginChanged()
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireRowMoved(TableRowModelEvent e)
|
protected void |
fireRowRemoved(TableRowModelEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireRowResizing(int row,
boolean dragging)
|
protected void |
fireRowSelectionChanged(ListSelectionEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireRowUpdated()
|
CellCoord |
getCellPosition(Cell cell)
|
int |
getColCount()
Returns columns' count in the model |
int |
getFirstPageNumber()
Returns number of the first page |
RowsGroup |
getGroup(int row)
Returns the group which contains the TableRow by specified row index |
Group |
getGroup(int[] path)
|
RowsGroup |
getGroup(TableRow row)
Returns the group which contains the tableRow |
int |
getGroupRowIndex(Group group)
Returns the index of the first group's row in rowList |
Object |
getHeaderValue(int row)
Returns value for row's header |
int |
getMaxRowHeight()
Returns the maximum height of a report row, in pixels. |
int |
getMinRowHeight()
Returns the minimum height of a report row, in pixels. |
protected TableRow |
getNullRow()
|
int |
getOwnerRow(Cell cell,
int row,
int column)
|
int |
getPageCount()
Returns count of pages |
int |
getPageHeight()
|
Integer |
getPageNumber(int row,
int column)
Returns number of page for a cell on a row and a column |
int |
getPreferredRowHeight()
Returns the preferred height of a report row, in pixels. |
RootGroup |
getRootGroup()
|
TableRow |
getRow(int row)
Returns the TableRow from the specified position |
int |
getRowCount()
Returns rows' count in the model |
int |
getRowHeight(int row)
Returns the height, in pixels, of the row. |
int |
getRowIndex(TableRow row)
Returns row's position in the model |
int |
getRowIndexAtY(int y)
Returns the index of the row that lies on the vertical point, y; or -1 if it lies outside the any of the row's bounds. |
int |
getRowMargin()
Returns the row between the cells in each row. |
TableRowModelListener[] |
getRowModelListeners()
|
int |
getTotalRowHeight()
Returns the total height of all the rows. |
protected void |
hideGroup(Group group)
|
boolean |
isCanHideGroup()
|
boolean |
isCanUpdatePages()
Returns the possibility of calculation of pages' size |
boolean |
isCollapse(Group group)
|
protected boolean |
isDirtyHeader()
|
boolean |
isPrintLeftToRight()
Direction of an output of pages on the printer. |
boolean |
isUpdate()
|
Iterator<TableRow> |
iterator()
|
void |
moveColumn(int columnIndex,
int newIndex)
Moves the column at columnIndex to newIndex. |
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 |
propertyChange(PropertyChangeEvent evt)
|
protected void |
recalcHeightCache()
|
void |
removeColumn(int column)
Removes column from the model |
protected void |
removeGroup(Group group)
|
void |
removeRowModelListener(TableRowModelListener x)
Removes a listener for report row model events. |
void |
removeRows()
Removes all rows |
void |
removeRows(int count,
int index)
Removes rows' count begining with the index from the model. |
protected void |
setCanHideGroup(boolean canHideGroup)
|
void |
setCanUpdatePages(boolean b)
Sets canUpdatePages property |
void |
setColCount(int colcount)
Sets the columns' count in the model If the columns' count is bigger than parameter, the columns are removed from the model If the columns' count is smaller than parameter, the columns are added to the model |
protected void |
setDirtyHeader(boolean dirtyHeader)
|
void |
setFirstPageNumber(int firstPageNumber)
Sets number of the first page |
void |
setPageHeight(int pageHeight)
|
void |
setPreferredRowHeight(int preferredHeight)
Sets the preferred height for row. |
void |
setPrintLeftToRight(boolean value)
Direction of an output of pages on the printer. |
void |
setRowCount(int value)
|
void |
setRowHeight(int row,
double h)
Sets the height for row to h. |
void |
setRowHeight(int row,
int rowHeight)
Sets the height for row to rowHeight. |
void |
setRowHeight(TableRow row,
int newHeight)
Sets the height for tableRow to newHeight. |
void |
setRowMargin(int newMargin)
Sets the row margin to newMargin. |
void |
setShowPageNumber(boolean show)
|
void |
setVisibleGroup(Group group,
boolean b)
If parameter b is true, sets the group that is visible in report, otherwise removes rows containing in the group from report |
protected void |
showGroup(Group group)
|
void |
startUpdate()
Bans notification of listeners before updates of model |
void |
unionCells(int topRow,
int leftColumn,
int bottomRow,
int rightColumn)
Unions the cells by coordinates |
protected void |
updateCellChild(BaseRowGroup group)
|
protected void |
updateHeaderValue()
|
void |
updatePages(int startRow,
int pageHeight)
Calculates pages' size |
void |
valueChanged(ListSelectionEvent e)
A ListSelectionListener that forwards
ListSelectionEvents when there is a column selection change. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int rowMargin
protected ArrayList<TableRow> rowList
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
| Constructor Detail |
|---|
public ReportRowModel(JReportModel reportModel)
| Method Detail |
|---|
public int getColCount()
TableRowModel
getColCount in interface TableRowModelpublic void setColCount(int colcount)
TableRowModel
setColCount in interface TableRowModelcolcount - new columns' countpublic TableRow getRow(int row)
TableRowModel
getRow in interface TableRowModelrow - the row's number
protected TableRow getNullRow()
public void addColumn(int column)
TableRowModel
addColumn in interface TableRowModelcolumn - the specified position in this modelpublic void removeColumn(int column)
TableRowModel
removeColumn in interface TableRowModelcolumn - the index of the removing columnpublic TableRow createTableRow()
TableRowModel
createTableRow in interface TableRowModel
public int addRows(int count,
int index)
TableRowModel
addRows in interface TableRowModelcount - rows' countindex - the row index of the rows to be inserted
public TableRow addRow()
TableRowModel
addRow in interface TableRowModelpublic TableRow addRow(int row)
TableRowModel
addRow in interface TableRowModelrow - index at which the row is to be inserted.
public int addRow(RowsGroup group,
int indexInGroup)
TableRowModel
addRow in interface TableRowModelindexInGroup - index in group
public int addRow(RowsGroup group,
int indexInGroup,
TableRow tableRow)
TableRowModel
addRow in interface TableRowModel
public int addRow(int arow,
TableRow tableRow)
TableRowModel
addRow in interface TableRowModelarow - the row's numbertableRow - the TableRow object
public boolean isUpdate()
public void startUpdate()
TableRowModel
startUpdate in interface TableRowModelpublic void endUpdate()
TableRowModel
endUpdate in interface TableRowModelpublic void removeRows()
TableRowModel
removeRows in interface TableRowModelprotected void removeGroup(Group group)
group -
public void removeRows(int count,
int index)
TableRowModel
removeRows in interface TableRowModelcount - rows' countindex - index of the first removed rowpublic int getRowCount()
TableRowModel
getRowCount in interface TableRowModelpublic void setRowCount(int value)
public int getTotalRowHeight()
TableRowModel
getTotalRowHeight in interface TableRowModelprotected void recalcHeightCache()
public void addRowModelListener(TableRowModelListener x)
TableRowModel
addRowModelListener in interface TableRowModelx - a TableRowModelListener objectpublic void removeRowModelListener(TableRowModelListener x)
TableRowModel
removeRowModelListener in interface TableRowModelx - a TableRowModelListener objectpublic TableRowModelListener[] getRowModelListeners()
public int getRowIndexAtY(int y)
TableRowModel
getRowIndexAtY in interface TableRowModely - y coordinate of point
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
public void moveDraggedRow(int rowIndex,
int newIndex)
TableRowModel
moveDraggedRow in interface TableRowModelrowIndex - the index of row to be movednewIndex - index of the row's new location
public void moveRow(int rowIndex,
int newIndex)
TableRowModel
moveRow in interface TableRowModelrowIndex - the index of row to be movednewIndex - index of the row's new locationpublic boolean isCollapse(Group group)
public void moveColumn(int columnIndex,
int newIndex)
TableRowModel
moveColumn in interface TableRowModelcolumnIndex - the index of column to be movednewIndex - index of the column's new locationpublic void enableSpan()
TableRowModel
enableSpan in interface TableRowModelpublic void disableSpan()
TableRowModel
disableSpan in interface TableRowModel
public void clearUnion(int topRow,
int leftCol,
int bottomRow,
int rightCol)
TableRowModel
clearUnion in interface TableRowModeltopRow - the number of the top rowleftCol - the number of the left columnbottomRow - the number of the bottom rowrightCol - the number of the right column
public void unionCells(int topRow,
int leftColumn,
int bottomRow,
int rightColumn)
TableRowModel
unionCells in interface TableRowModeltopRow - the number of the top rowleftColumn - the number of the left columnbottomRow - the number of the bottom rowrightColumn - the number of the right columnprotected void updateCellChild(BaseRowGroup group)
public void setRowMargin(int newMargin)
newMargin. This method also posts a
rowMarginChanged event to its listeners.
newMargin - the new margin width, in pixelsgetRowMargin(),
getTotalRowHeight()public void valueChanged(ListSelectionEvent e)
ListSelectionListener that forwards
ListSelectionEvents when there is a column selection change.
valueChanged in interface ListSelectionListenere - the change eventprotected void fireRowUpdated()
protected void fireRowResizing(int row,
boolean dragging)
protected void fireRowAdded(TableRowModelEvent e)
e - the event receivedEventListenerListprotected void fireRowRemoved(TableRowModelEvent e)
e - the event receivedprotected void fireRowSelectionChanged(ListSelectionEvent e)
e - the event receivedEventListenerListprotected void fireRowMarginChanged()
EventListenerListprotected void fireRowMoved(TableRowModelEvent e)
public int getRowMargin()
TableRowModel
getRowMargin in interface TableRowModelpublic int getMinRowHeight()
TableRowModel
getMinRowHeight in interface TableRowModelpublic int getMaxRowHeight()
TableRowModel
getMaxRowHeight in interface TableRowModelpublic int getPreferredRowHeight()
TableRowModel
getPreferredRowHeight in interface TableRowModelpublic void setPreferredRowHeight(int preferredHeight)
TableRowModel
setPreferredRowHeight in interface TableRowModelpreferredHeight - new preferred row height, in pixelspublic int getRowHeight(int row)
TableRowModel
getRowHeight in interface TableRowModelrow - the row whose height is to be returned
public void setRowHeight(int row,
int rowHeight)
TableRowModel
setRowHeight in interface TableRowModelrow - the row whose height is being changedrowHeight - new row height, in pixels
public void setRowHeight(TableRow row,
int newHeight)
TableRowModel
setRowHeight in interface TableRowModelrow - the row whose height is being changednewHeight - new row height, in pixelspublic RootGroup getRootGroup()
getRootGroup in interface TableRowModelprotected RootGroup createRootGroup()
public RowsGroup getGroup(int row)
TableRowModel
getGroup in interface TableRowModelrow - the row's index in rowList
public RowsGroup getGroup(TableRow row)
TableRowModel
getGroup in interface TableRowModelrow - the TableRow object
protected void showGroup(Group group)
protected void hideGroup(Group group)
public void setVisibleGroup(Group group,
boolean b)
TableRowModel
setVisibleGroup in interface TableRowModelgroup - Group objectb - visible propertypublic int getRowIndex(TableRow row)
TableRowModel
getRowIndex in interface TableRowModelrow - TableRow to search for.
public int getGroupRowIndex(Group group)
TableRowModel
getGroupRowIndex in interface TableRowModelgroup - the Group object
public Object getHeaderValue(int row)
TableRowModel
getHeaderValue in interface TableRowModelrow - the row's number
protected void updateHeaderValue()
protected void clearPageHeader(int startRow)
public CellCoord getCellPosition(Cell cell)
public void updatePages(int startRow,
int pageHeight)
TableRowModel
updatePages in interface TableRowModelstartRow - the first row for calculationpageHeight - page height in pixels
public int getOwnerRow(Cell cell,
int row,
int column)
public Group getGroup(int[] path)
getGroup in interface TableRowModelpublic void setPageHeight(int pageHeight)
pageHeight - The pageHeight to set.public int getPageHeight()
public void setRowHeight(int row,
double h)
TableRowModel
setRowHeight in interface TableRowModelrow - the row whose height is being changedh - new row height, in 1/72 of inchprotected void setCanHideGroup(boolean canHideGroup)
canHideGroup - the canHideGroup to setpublic boolean isCanHideGroup()
isCanHideGroup in interface TableRowModelprotected void setDirtyHeader(boolean dirtyHeader)
dirtyHeader - the dirtyHeader to setprotected boolean isDirtyHeader()
public boolean isCanUpdatePages()
TableRowModel
isCanUpdatePages in interface TableRowModelpublic void setCanUpdatePages(boolean b)
TableRowModel
setCanUpdatePages in interface TableRowModelb - the canUpdatePages propertypublic int getFirstPageNumber()
TableRowModel
getFirstPageNumber in interface TableRowModelpublic void setFirstPageNumber(int firstPageNumber)
TableRowModel
setFirstPageNumber in interface TableRowModelfirstPageNumber - number of the first page
public Integer getPageNumber(int row,
int column)
TableRowModel
getPageNumber in interface TableRowModelpublic boolean isPrintLeftToRight()
TableRowModel
isPrintLeftToRight in interface TableRowModelpublic void setPrintLeftToRight(boolean value)
TableRowModel
setPrintLeftToRight in interface TableRowModelpublic int getPageCount()
TableRowModel
getPageCount in interface TableRowModelpublic Iterator<TableRow> iterator()
iterator in interface Iterable<TableRow>public void setShowPageNumber(boolean show)
setShowPageNumber in interface TableRowModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||