|
||||||||||
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 TableRowModel
public void setColCount(int colcount)
TableRowModel
setColCount
in interface TableRowModel
colcount
- new columns' countpublic TableRow getRow(int row)
TableRowModel
getRow
in interface TableRowModel
row
- the row's number
protected TableRow getNullRow()
public void addColumn(int column)
TableRowModel
addColumn
in interface TableRowModel
column
- the specified position in this modelpublic void removeColumn(int column)
TableRowModel
removeColumn
in interface TableRowModel
column
- the index of the removing columnpublic TableRow createTableRow()
TableRowModel
createTableRow
in interface TableRowModel
public int addRows(int count, int index)
TableRowModel
addRows
in interface TableRowModel
count
- rows' countindex
- the row index of the rows to be inserted
public TableRow addRow()
TableRowModel
addRow
in interface TableRowModel
public TableRow addRow(int row)
TableRowModel
addRow
in interface TableRowModel
row
- index at which the row is to be inserted.
public int addRow(RowsGroup group, int indexInGroup)
TableRowModel
addRow
in interface TableRowModel
indexInGroup
- 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 TableRowModel
arow
- the row's numbertableRow
- the TableRow object
public boolean isUpdate()
public void startUpdate()
TableRowModel
startUpdate
in interface TableRowModel
public void endUpdate()
TableRowModel
endUpdate
in interface TableRowModel
public void removeRows()
TableRowModel
removeRows
in interface TableRowModel
protected void removeGroup(Group group)
group
- public void removeRows(int count, int index)
TableRowModel
removeRows
in interface TableRowModel
count
- rows' countindex
- index of the first removed rowpublic int getRowCount()
TableRowModel
getRowCount
in interface TableRowModel
public void setRowCount(int value)
public int getTotalRowHeight()
TableRowModel
getTotalRowHeight
in interface TableRowModel
protected void recalcHeightCache()
public void addRowModelListener(TableRowModelListener x)
TableRowModel
addRowModelListener
in interface TableRowModel
x
- a TableRowModelListener objectpublic void removeRowModelListener(TableRowModelListener x)
TableRowModel
removeRowModelListener
in interface TableRowModel
x
- a TableRowModelListener objectpublic TableRowModelListener[] getRowModelListeners()
public int getRowIndexAtY(int y)
TableRowModel
getRowIndexAtY
in interface TableRowModel
y
- y coordinate of point
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void moveDraggedRow(int rowIndex, int newIndex)
TableRowModel
moveDraggedRow
in interface TableRowModel
rowIndex
- the index of row to be movednewIndex
- index of the row's new locationpublic void moveRow(int rowIndex, int newIndex)
TableRowModel
moveRow
in interface TableRowModel
rowIndex
- 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 TableRowModel
columnIndex
- the index of column to be movednewIndex
- index of the column's new locationpublic void enableSpan()
TableRowModel
enableSpan
in interface TableRowModel
public void disableSpan()
TableRowModel
disableSpan
in interface TableRowModel
public void clearUnion(int topRow, int leftCol, int bottomRow, int rightCol)
TableRowModel
clearUnion
in interface TableRowModel
topRow
- the number of the top rowleftCol
- the number of the left columnbottomRow
- the number of the bottom rowrightCol
- the number of the right columnpublic void unionCells(int topRow, int leftColumn, int bottomRow, int rightColumn)
TableRowModel
unionCells
in interface TableRowModel
topRow
- 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 ListSelectionListener
e
- the change eventprotected void fireRowUpdated()
protected void fireRowResizing(int row, boolean dragging)
protected void fireRowAdded(TableRowModelEvent e)
e
- the event receivedEventListenerList
protected void fireRowRemoved(TableRowModelEvent e)
e
- the event receivedprotected void fireRowSelectionChanged(ListSelectionEvent e)
e
- the event receivedEventListenerList
protected void fireRowMarginChanged()
EventListenerList
protected void fireRowMoved(TableRowModelEvent e)
public int getRowMargin()
TableRowModel
getRowMargin
in interface TableRowModel
public int getMinRowHeight()
TableRowModel
getMinRowHeight
in interface TableRowModel
public int getMaxRowHeight()
TableRowModel
getMaxRowHeight
in interface TableRowModel
public int getPreferredRowHeight()
TableRowModel
getPreferredRowHeight
in interface TableRowModel
public void setPreferredRowHeight(int preferredHeight)
TableRowModel
setPreferredRowHeight
in interface TableRowModel
preferredHeight
- new preferred row height, in pixelspublic int getRowHeight(int row)
TableRowModel
getRowHeight
in interface TableRowModel
row
- the row whose height is to be returned
public void setRowHeight(int row, int rowHeight)
TableRowModel
setRowHeight
in interface TableRowModel
row
- the row whose height is being changedrowHeight
- new row height, in pixelspublic void setRowHeight(TableRow row, int newHeight)
TableRowModel
setRowHeight
in interface TableRowModel
row
- the row whose height is being changednewHeight
- new row height, in pixelspublic RootGroup getRootGroup()
getRootGroup
in interface TableRowModel
protected RootGroup createRootGroup()
public RowsGroup getGroup(int row)
TableRowModel
getGroup
in interface TableRowModel
row
- the row's index in rowList
public RowsGroup getGroup(TableRow row)
TableRowModel
getGroup
in interface TableRowModel
row
- the TableRow object
protected void showGroup(Group group)
protected void hideGroup(Group group)
public void setVisibleGroup(Group group, boolean b)
TableRowModel
setVisibleGroup
in interface TableRowModel
group
- Group objectb
- visible propertypublic int getRowIndex(TableRow row)
TableRowModel
getRowIndex
in interface TableRowModel
row
- TableRow to search for.
public int getGroupRowIndex(Group group)
TableRowModel
getGroupRowIndex
in interface TableRowModel
group
- the Group object
public Object getHeaderValue(int row)
TableRowModel
getHeaderValue
in interface TableRowModel
row
- 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 TableRowModel
startRow
- the first row for calculationpageHeight
- page height in pixelspublic int getOwnerRow(Cell cell, int row, int column)
public Group getGroup(int[] path)
getGroup
in interface TableRowModel
public void setPageHeight(int pageHeight)
pageHeight
- The pageHeight to set.public int getPageHeight()
public void setRowHeight(int row, double h)
TableRowModel
setRowHeight
in interface TableRowModel
row
- 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 TableRowModel
protected void setDirtyHeader(boolean dirtyHeader)
dirtyHeader
- the dirtyHeader to setprotected boolean isDirtyHeader()
public boolean isCanUpdatePages()
TableRowModel
isCanUpdatePages
in interface TableRowModel
public void setCanUpdatePages(boolean b)
TableRowModel
setCanUpdatePages
in interface TableRowModel
b
- the canUpdatePages propertypublic int getFirstPageNumber()
TableRowModel
getFirstPageNumber
in interface TableRowModel
public void setFirstPageNumber(int firstPageNumber)
TableRowModel
setFirstPageNumber
in interface TableRowModel
firstPageNumber
- number of the first pagepublic Integer getPageNumber(int row, int column)
TableRowModel
getPageNumber
in interface TableRowModel
public boolean isPrintLeftToRight()
TableRowModel
isPrintLeftToRight
in interface TableRowModel
public void setPrintLeftToRight(boolean value)
TableRowModel
setPrintLeftToRight
in interface TableRowModel
public int getPageCount()
TableRowModel
getPageCount
in interface TableRowModel
public 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 |