|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
com.limegroup.gnutella.gui.tables.BasicDataLineModel
Handles common tasks associated with storing the DataLine's of a table. Previously, this class used to be split between a DataLineList and a AbstractTableModel. However, because the function of the DataLineList was really to handle all interactions with the data, it essentially was a model. Now, because the two classes are combined, the model can fire its own events.
Field Summary | |
protected boolean |
_isSorted
Variable for whether or not this list has been sorted at least once. |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
BasicDataLineModel(java.lang.Class dataLineClass)
|
Method Summary | |
int |
add(DataLine dl)
Adds a DataLine to row 0. |
int |
add(DataLine dl,
int row)
Adds a DataLine to the list at a row. |
int |
add(java.lang.Object o)
Helper function. |
int |
add(java.lang.Object o,
int row)
Helper function. |
int |
addSorted(DataLine dl)
Helper function. |
int |
addSorted(java.lang.Object o)
Helper function. |
void |
clear()
Clear the table of all data. |
int |
compare(java.lang.Object a,
java.lang.Object b)
A generic compare function. |
boolean |
contains(java.lang.Object o)
Determine if the list contains a row that was initialized by Object o. |
boolean |
contains(java.lang.Object o,
int col)
Determine if the list contains Object o in column col. |
DataLine |
createDataLine()
Instantiates a DataLine. |
DataLine |
get(int row)
Get the DataLine associated with the row. |
DataLine |
get(java.lang.Object o)
Implements DataLineModel interface. |
DataLine |
get(java.lang.Object o,
int col)
Implements DataLineModel interface. |
java.lang.Class |
getColumnClass(int col)
Returns the class of the TableColumn as specified by the data line. |
int |
getColumnCount()
Returns the number of columns as speicifed by the data line. |
java.lang.Object |
getColumnId(int col)
Returns the Id of the TableColumn as specified by the data line. |
java.lang.String |
getColumnName(int col)
Returns the name of the TableColumn as specified by the data line. |
DataLine |
getNewDataLine(java.lang.Object o)
Returns an initialized new dataline. |
int |
getRow(DataLine dl)
Get the index of this DataLine. |
int |
getRow(java.lang.Object o)
Get the index of the DataLine that was initialized by Object o. |
int |
getRow(java.lang.Object o,
int col)
Get the row of the row that contains Object o in column col. |
int |
getRowCount()
Returns the size of _list. |
int |
getSortColumn()
Returns the column by which the underlying data is sorted ascending. |
int |
getSortedPosition(DataLine dl)
Determines where the DataLine should be inserted. |
LimeTableColumn |
getTableColumn(int col)
Returns the LimeTableColumn at the specific column this data line. |
java.lang.String[] |
getToolTipArray(int row)
Gets the tooltip for a specific row. |
java.lang.Object |
getValueAt(int row,
int col)
|
boolean |
isSortAscending()
Returns whether or not the underlying data is sorted ascending. |
boolean |
isSorted()
Whether or not the underlying data is sorted. |
boolean |
needsResort()
Whether or not the underlying data needs to be resorted. |
java.lang.Object |
refresh()
Basic linear update. |
void |
remove(DataLine line)
Helper-function that resolves to remove(int). |
void |
remove(int row)
Calls cleanup on the DataLine and then removes it from the list. |
void |
remove(java.lang.Object o)
Helper function that resolves to remove(int). |
void |
resort()
Resorts the underlying data. |
void |
setValueAt(java.lang.Object o,
int row,
int col)
|
void |
sort(int col)
Sort the underlying data by the column. |
int |
update(java.lang.Object o)
Update a specific DataLine The DataLine updated is the one that was initialized by Object o |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, isCellEditable, removeTableModelListener |
Field Detail |
protected boolean _isSorted
Constructor Detail |
public BasicDataLineModel(java.lang.Class dataLineClass)
Method Detail |
public java.lang.String[] getToolTipArray(int row)
DataLineModel
getToolTipArray
in interface DataLineModel
public boolean isSortAscending()
DataLineModel
isSortAscending
in interface DataLineModel
public int getSortColumn()
DataLineModel
getSortColumn
in interface DataLineModel
public boolean isSorted()
DataLineModel
isSorted
in interface DataLineModel
public void sort(int col)
DataLineModel
sort
in interface DataLineModel
public void resort()
DataLineModel
resort
in interface DataLineModel
public boolean needsResort()
DataLineModel
needsResort
in interface DataLineModel
public void clear()
DataLineModel
clear
in interface DataLineModel
public java.lang.Object refresh()
refresh
in interface DataLineModel
public int update(java.lang.Object o)
update
in interface DataLineModel
public DataLine createDataLine()
public DataLine getNewDataLine(java.lang.Object o)
public int getSortedPosition(DataLine dl)
public int add(java.lang.Object o)
add
in interface DataLineModel
public int add(java.lang.Object o, int row)
add
in interface DataLineModel
public int add(DataLine dl)
add
in interface DataLineModel
public int add(DataLine dl, int row)
add
in interface DataLineModel
public int addSorted(java.lang.Object o)
addSorted
in interface DataLineModel
public int addSorted(DataLine dl)
addSorted
in interface DataLineModel
public DataLine get(int row)
DataLineModel
get
in interface DataLineModel
public DataLine get(java.lang.Object o)
get
in interface DataLineModel
public DataLine get(java.lang.Object o, int col)
get
in interface DataLineModel
public void remove(int row)
remove
in interface DataLineModel
public void remove(DataLine line)
remove
in interface DataLineModel
public void remove(java.lang.Object o)
remove
in interface DataLineModel
public java.lang.Object getValueAt(int row, int col)
getValueAt
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object o, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
public boolean contains(java.lang.Object o, int col)
DataLineModel
contains
in interface DataLineModel
public boolean contains(java.lang.Object o)
DataLineModel
contains
in interface DataLineModel
public int getRow(DataLine dl)
DataLineModel
getRow
in interface DataLineModel
public int getRow(java.lang.Object o, int col)
DataLineModel
getRow
in interface DataLineModel
public int getRow(java.lang.Object o)
DataLineModel
getRow
in interface DataLineModel
public int compare(java.lang.Object a, java.lang.Object b)
compare
in interface java.util.Comparator
public LimeTableColumn getTableColumn(int col)
getTableColumn
in interface DataLineModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
public java.lang.Object getColumnId(int col)
getColumnId
in interface DataLineModel
public java.lang.Class getColumnClass(int col)
getColumnClass
in interface javax.swing.table.TableModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |