|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
client.CalendarTableModel
This class defined the table model of the JTable of the main calendar client window. All table data and most of the table actions, like sorting or updating the content, go trough this class.
| Field Summary | |
static java.lang.String |
CATEGORY_HEADER
|
static java.lang.String |
DATE_HEADER
|
static java.lang.String |
DESCRIPTION_HEADER
|
static java.lang.String |
PLACE_HEADER
|
| Constructor Summary | |
CalendarTableModel(javax.swing.JTable jTable)
Simple constructor, creates a calendar table model to be used with the JTable of the netcalendar client main window. |
|
| Method Summary | |
java.lang.Class |
getColumnClass(int iCol)
This method returns the class types of a specific table column. |
int |
getColumnCount()
This method returns the number of columns of the JTable. |
java.lang.String |
getColumnName(int iCol)
This method returns the column header of a specific table column. |
CalendarEvent |
getEvent(int iRow)
This method returns the calendar event which belongs to a specific table row |
int |
getRowCount()
This method retuns the number of rows of the JTable. |
java.lang.Object |
getValueAt(int iRow,
int iCol)
Gets a specific table value |
boolean |
isCellEditable(int iRow,
int iCol)
This method checks if a cell is editable or not. |
void |
reverseSortByCategory()
Reverse sorts the table content by their category names. |
void |
reverseSortByCol(int iCol)
Reverse sorts the table content by a specified table column. |
void |
reverseSortByDate()
Reverse sorts the table content by their dates. |
void |
reverseSortByDescription()
Reverse sorts the table content by their description texts. |
void |
reverseSortByPlace()
Reverse sorts the table content by their places. |
void |
setEvents(java.util.Vector vecEvents)
This method updates all the value objects (calendar events) of the table. |
void |
setRowCount(int iRows)
This method sets the number of rows of the JTable. |
void |
setValueAt(java.lang.Object object,
int iRow,
int iCol)
This function updates the data of the JTable. |
void |
sortByCategory()
Sorts the table content by their category names. |
void |
sortByCol(int iCol)
Sorts the table content by a specified table column. |
void |
sortByDate()
Sorts the table content by their dates. |
void |
sortByDescription()
Sorts the table content by their description texts. |
void |
sortByPlace()
Sorts the table content by their places. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DATE_HEADER
public static final java.lang.String CATEGORY_HEADER
public static final java.lang.String DESCRIPTION_HEADER
public static final java.lang.String PLACE_HEADER
| Constructor Detail |
public CalendarTableModel(javax.swing.JTable jTable)
jTable - Specifies the JTable object of this table model.| Method Detail |
public int getColumnCount()
public int getRowCount()
public void setRowCount(int iRows)
iRows - Specifies the number of rows of the JTable.
public boolean isCellEditable(int iRow,
int iCol)
iRow - Specifies the tables row.iCol - Specifies the tables column.
public java.lang.Object getValueAt(int iRow,
int iCol)
iRow - Specifies the tables rowiCol - Specifies the tables column
public void setValueAt(java.lang.Object object,
int iRow,
int iCol)
object - Specifies the new value.iRow - Specifies the row of the cell to be updated.iCol - Specifies the column of the cell to be updated.public java.lang.Class getColumnClass(int iCol)
iCol - Specifies the column index to get the class type for.
public java.lang.String getColumnName(int iCol)
iCol - Specifies the column index to get the column header for.
public CalendarEvent getEvent(int iRow)
iRow - Specifies the table row index
public void setEvents(java.util.Vector vecEvents)
vecEvents - Specifies the vector of the events to be used.public void sortByCol(int iCol)
iCol - Specifies the table column to sort against.public void reverseSortByCol(int iCol)
iCol - Specifies the table column to reverse sort against.public void sortByDate()
public void sortByCategory()
public void sortByDescription()
public void sortByPlace()
public void reverseSortByDate()
public void reverseSortByCategory()
public void reverseSortByDescription()
public void reverseSortByPlace()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||