|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
de.cbse.jeasy.JETableModel
public class JETableModel
An enhanced table model for jeasy tables.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.DefaultTableModel |
|---|
columnIdentifiers, dataVector |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
JETableModel(JETable jet)
|
|
| Method Summary | |
|---|---|
void |
addRow()
Adds an empty row to the table |
void |
addRow(int row)
Inserts an empty row to the table at the given row. |
void |
addSumColumn(int column)
Method addSumColumn. |
void |
addSumColumn(int column,
int fromRow,
int toRow)
Method addSumColumn. |
void |
addSumColumn(int column,
int fromRow,
int toRow,
int columnIndicator,
java.lang.Object value)
Method addSumColumn with checking another column. |
void |
addSumColumn(int column,
int columnIndicator,
java.lang.Object value)
Method addSumColumn with checking another column. |
void |
addSumRow()
Adds a the sum row at the end of the table to show column totals. |
void |
clear()
Clears the table by removing all data from the table model. |
int |
compare(int row1,
int row2)
Compares two rows using the value of the the colum to be sorted. |
int |
compareRowsByColumn(int row1,
int row2,
int column)
Compares two cells of one column. |
void |
filterData()
Creates a new data array for the TableDataModel using only rows with filtered entries of columns The origin data array will be stored. |
int |
getRowCount()
|
java.lang.Object |
getValueAt(int row,
int col)
|
boolean |
hasSumRow()
Returns whether a sumRow was added. |
boolean |
isCellEditable(int row,
int col)
|
boolean |
isEditable()
|
void |
performMouseClicked(java.awt.event.MouseEvent e)
|
void |
performMouseEntered(java.awt.event.MouseEvent e)
|
void |
performMouseExited(java.awt.event.MouseEvent e)
|
void |
performMouseRelease(java.awt.event.MouseEvent e)
|
void |
performPopUpAction(java.awt.event.ActionEvent e)
|
void |
removeAllFilter()
Restores the data array for the TableDataModel |
void |
removeRow(int row)
Removes the row of the table and if the table is filtered or sorted removes the row in the origin model too. |
void |
removeSumRow()
Removes the sum row showing column totals. |
void |
setDataVector(java.util.Vector rows)
Sets the data vector of the table model. |
void |
setFilter(java.lang.String colName,
java.util.Hashtable hs)
Sets a filter to that column. |
void |
setValueAt(java.lang.Object aValue,
int row,
int col)
|
void |
shuttlesort(int[] from,
int[] to,
int low,
int high)
Sorts index of data |
void |
sort()
|
void |
sortByColumn(int column)
|
void |
sortByColumn(int column,
boolean ascending)
|
void |
sortingData()
Brings the data vector in a sorted order |
| Methods inherited from class javax.swing.table.DefaultTableModel |
|---|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JETableModel(JETable jet)
| Method Detail |
|---|
public void addRow()
public void addRow(int row)
public void addSumColumn(int column)
column -
public void addSumColumn(int column,
int fromRow,
int toRow)
column - fromRow - from rowtoRow - to row
public void addSumColumn(int column,
int fromRow,
int toRow,
int columnIndicator,
java.lang.Object value)
column - build the sum from this columnfromRow - from rowtoRow - to rowcolumnIndicator - column to check the valuesvalue - only sum when getValue(row, column) equa value
public void addSumColumn(int column,
int columnIndicator,
java.lang.Object value)
column - columnIndicator - value - public void addSumRow()
public void clear()
public int compare(int row1,
int row2)
row1 - row2 -
public int compareRowsByColumn(int row1,
int row2,
int column)
row1 - row2 - column -
public void filterData()
b - public int getRowCount()
getRowCount in interface javax.swing.table.TableModelgetRowCount in class javax.swing.table.DefaultTableModel
public java.lang.Object getValueAt(int row,
int col)
getValueAt in interface javax.swing.table.TableModelgetValueAt in class javax.swing.table.DefaultTableModelpublic boolean hasSumRow()
public boolean isCellEditable(int row,
int col)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.DefaultTableModelpublic boolean isEditable()
public void performMouseClicked(java.awt.event.MouseEvent e)
public void performMouseEntered(java.awt.event.MouseEvent e)
public void performMouseExited(java.awt.event.MouseEvent e)
public void removeRow(int row)
removeRow in class javax.swing.table.DefaultTableModelpublic void performMouseRelease(java.awt.event.MouseEvent e)
public void performPopUpAction(java.awt.event.ActionEvent e)
public void removeAllFilter()
b - public void removeSumRow()
public void setFilter(java.lang.String colName,
java.util.Hashtable hs)
col - hs -
public void setValueAt(java.lang.Object aValue,
int row,
int col)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.DefaultTableModel
public void shuttlesort(int[] from,
int[] to,
int low,
int high)
from - to - low - high - public void sort()
public void sortByColumn(int column)
public void sortByColumn(int column,
boolean ascending)
public void sortingData()
public void setDataVector(java.util.Vector rows)
rows -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||