|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.displaytag.model.TableModel
public class TableModel
Table Model. Holds table data for presentation.
| Constructor Summary | |
|---|---|
TableModel(TableProperties tableProperties,
java.lang.String charEncoding,
javax.servlet.jsp.PageContext pageContext)
Constructor for TableModel. |
|
| Method Summary | |
|---|---|
void |
addColumnHeader(HeaderCell headerCell)
Adds a column header (HeaderCell object). |
void |
addRow(Row row)
adds a Row object to the table. |
java.lang.String |
getCaption()
Obtain this table's caption. |
java.lang.String |
getEncoding()
Getter for character encoding. |
java.lang.String |
getFooter()
Obtain this table's footer. |
java.util.List |
getHeaderCellList()
List containing headerCell objects. |
java.lang.String |
getId()
get the table id. |
MediaTypeEnum |
getMedia()
Gets the current media type. |
int |
getNumberOfColumns()
return the number of columns in the table. |
protected javax.servlet.jsp.PageContext |
getPageContext()
Returns the jsp page context. |
TableProperties |
getProperties()
Returns the table properties. |
RowIterator |
getRowIterator(boolean full)
returns a RowIterator on the requested (full|page) list. |
java.util.List |
getRowListFull()
get the full list. |
java.util.List |
getRowListPage()
gets the partial (paginated) list. |
HeaderCell |
getSortedColumnHeader()
returns the HeaderCell for the sorted column. |
int |
getSortedColumnNumber()
return the index of the sorted column. |
TableDecorator |
getTableDecorator()
getter for the Table Decorator. |
boolean |
isEmpty()
return true is the table has no columns. |
boolean |
isLocalSort()
|
boolean |
isSorted()
returns true if the table is sorted. |
boolean |
isSortFullTable()
return the sort full table property. |
boolean |
isSortOrderAscending()
return the sort order of the page. |
void |
setCaption(java.lang.String caption)
Set this table's caption. |
void |
setFooter(java.lang.String footer)
Set this table's footer. |
void |
setId(java.lang.String tableId)
Setter for the tablemodel id. |
void |
setLocalSort(boolean localSort)
Sets whether the table performs local in memory sorting of the data. |
void |
setMedia(MediaTypeEnum media)
sets the current media type. |
void |
setPageOffset(int offset)
Sets the starting offset for elements in the viewable list. |
void |
setRowListPage(java.util.List rowList)
|
void |
setSortedColumnName(java.lang.String sortedColumnName)
sets the name of the currently sorted column |
void |
setSortedColumnNumber(int sortIndex)
set the sorted column index. |
void |
setSortFullTable(boolean sortFull)
sets the sort full table property. |
void |
setSortOrderAscending(boolean isSortOrderAscending)
set the sort order of the list. |
void |
setTableDecorator(TableDecorator decorator)
setter for the table decorator. |
void |
sortFullList()
sort the full list of data. |
void |
sortPageList()
sort the list displayed in page. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TableModel(TableProperties tableProperties,
java.lang.String charEncoding,
javax.servlet.jsp.PageContext pageContext)
tableProperties - table propertiescharEncoding - response encoding| Method Detail |
|---|
protected javax.servlet.jsp.PageContext getPageContext()
public MediaTypeEnum getMedia()
public void setMedia(MediaTypeEnum media)
media - current media (html, pdf ...)public void setLocalSort(boolean localSort)
localSort - public boolean isLocalSort()
public void setPageOffset(int offset)
offset - The page offset to set.public void setId(java.lang.String tableId)
tableId - same id of table tag, needed for loggingpublic java.lang.String getId()
public java.util.List getRowListFull()
public java.util.List getRowListPage()
public void addRow(Row row)
row - Rowpublic void setSortedColumnName(java.lang.String sortedColumnName)
sortedColumnName - public void setSortFullTable(boolean sortFull)
sortFull - booleanpublic boolean isSortFullTable()
public boolean isSortOrderAscending()
public void setSortOrderAscending(boolean isSortOrderAscending)
isSortOrderAscending - true to sort in ascending orderpublic void setRowListPage(java.util.List rowList)
rowList - - the new value for this.rowListPagepublic TableDecorator getTableDecorator()
public void setTableDecorator(TableDecorator decorator)
decorator - - the TableDecorator objectpublic boolean isSorted()
public HeaderCell getSortedColumnHeader()
public int getNumberOfColumns()
public boolean isEmpty()
public int getSortedColumnNumber()
public void setSortedColumnNumber(int sortIndex)
sortIndex - - the index of the sorted columnpublic void addColumnHeader(HeaderCell headerCell)
headerCell - HeaderCellpublic java.util.List getHeaderCellList()
public RowIterator getRowIterator(boolean full)
full - if true returns an iterator on te full list, if false only on the
viewable part.
RowIteratorpublic void sortPageList()
public void sortFullList()
public TableProperties getProperties()
public java.lang.String getEncoding()
public java.lang.String getCaption()
public void setCaption(java.lang.String caption)
caption - This table's caption.public java.lang.String getFooter()
public void setFooter(java.lang.String footer)
footer - This table's footer.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||