public class IlpTableListModel extends IlpAbstractTableModel implements ListModel, ListDataListener
Note: This list model should fire a
ListDataEvent when:
listenerList| Constructor and Description |
|---|
IlpTableListModel()
Default constructor.
|
IlpTableListModel(ListModel model,
IlpExtendedAttributeGroup attributeGroup)
Creates a model using the specified list model and attribute model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListDataListener(ListDataListener l)
Add a listener to the list that is notified each time a change
to the data model occurs.
|
void |
contentsChanged(ListDataEvent e)
Called when the underlying model has changed.
|
protected void |
fireContentsChanged(Object source,
int index0,
int index1)
IlpTableListModel is a List model.
|
protected void |
fireIntervalAdded(Object source,
int index0,
int index1)
AbstractListModel subclasses must call this method after
one or more elements are added to the model.
|
protected void |
fireIntervalRemoved(Object source,
int index0,
int index1)
AbstractListModel subclasses must call this method after
one or more elements are removed from the model.
|
Object |
getElementAt(int index)
Returns the value at the specified index.
|
ListModel |
getModel()
Retrieves the underlying list model.
|
IlpTableRow |
getRow(int rowIndex)
Returns the row at the given index.
|
int |
getRowCount()
Returns the number of rows in the model.
|
int |
getRowIndex(IlpTableRow row)
Returns the index of the specified row.
|
int |
getSize()
Returns the length of the list.
|
void |
intervalAdded(ListDataEvent e)
Called when the underlying model has changed.
|
void |
intervalRemoved(ListDataEvent e)
Called when the underlying model has changed.
|
void |
removeListDataListener(ListDataListener l)
Remove a listener from the list of those notified each time a
change to the data model occurs.
|
void |
setModel(ListModel model)
Sets the underlying list model.
|
getAttributeGroup, getColumn, getColumnClass, getColumnCount, getColumnIndex, getColumnName, getColumns, getValueAt, setAttributeGroupaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTableModelListener, isCellEditable, removeTableModelListener, setValueAtpublic IlpTableListModel()
public IlpTableListModel(ListModel model, IlpExtendedAttributeGroup attributeGroup)
model - The list model this table model uses; can be
null.attributeGroup - The attribute model this table model uses; can be
null.public int getSize()
public Object getElementAt(int index)
getElementAt in interface ListModelpublic void addListDataListener(ListDataListener l)
addListDataListener in interface ListModell - the ListDataListenerpublic void removeListDataListener(ListDataListener l)
removeListDataListener in interface ListModell - The ListDataListener to be removed.public void intervalAdded(ListDataEvent e)
intervalAdded in interface ListDataListenere - A ListDataEvent encapsulating the event information.public void intervalRemoved(ListDataEvent e)
intervalRemoved in interface ListDataListenere - A ListDataEvent encapsulating the event information.public void contentsChanged(ListDataEvent e)
contentsChanged in interface ListDataListenere - A ListDataEvent encapsulating the event information.public int getRowCount()
JTable object uses this method to determine how many rows it
should display. This method should be fast, as it
is called frequently during rendering.getRowCount in interface TableModelpublic ListModel getModel()
ListModel; can be null.public void setModel(ListModel model)
model - The underlying list model; can be null.public IlpTableRow getRow(int rowIndex)
getRow in interface IlpTableModelrowIndex - The index of the row to retrieve.IndexOutOfBoundsException - if index is negative or greater than or
equal to the number of rows.public int getRowIndex(IlpTableRow row)
getRowIndex in interface IlpTableModelrow - The row whose index has to be found.protected void fireContentsChanged(Object source, int index0, int index1)
protected void fireIntervalAdded(Object source, int index0, int index1)
source - The ListModel that changed, typically "this".index0 - One end of the new interval.index1 - The other end of the new interval.EventListenerList,
IlpDefaultListModelprotected void fireIntervalRemoved(Object source, int index0, int index1)
source - The ListModel that changed, typically "this".index0 - One end of the new interval.index1 - The other end of the new interval.EventListenerList,
IlpDefaultListModel© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.