|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.view.swing
Class STableModel

java.lang.Objectjavax.swing.AbstractListModel
org.scopemvc.view.swing.SAbstractListModel
org.scopemvc.view.swing.STableModel
- All Implemented Interfaces:
- javax.swing.ListModel, org.scopemvc.view.util.ModelBindable, org.scopemvc.core.ModelChangeListener, Refreshable, java.io.Serializable, javax.swing.table.TableModel
- public class STableModel
- extends SAbstractListModel
- implements javax.swing.table.TableModel
- extends SAbstractListModel
- Version:
- $Revision: 1.10 $ $Date: 2002/01/26 09:46:20 $
| Field Summary | |
protected java.lang.String[] |
columnNames
|
protected boolean[] |
columnsEditable
|
protected org.scopemvc.core.Selector[] |
columnSelectors
|
private static org.apache.commons.logging.Log |
LOG
|
protected org.scopemvc.core.PropertyManager |
manager
|
protected javax.swing.JTable |
table
|
| Fields inherited from class org.scopemvc.view.swing.SAbstractListModel |
listModel, sizeSelector |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
STableModel(javax.swing.JTable inTable)
|
|
| Method Summary | |
void |
addListDataListener(javax.swing.event.ListDataListener l)
Add a listener object to this model. |
void |
addTableModelListener(javax.swing.event.TableModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
protected void |
fireContentsChanged(java.lang.Object source,
int index0,
int index1)
Call ListDataListener.contentsChanged(javax.swing.event.ListDataEvent)> ListDataListener.contentsChanged(javax.swing.event.ListDataEvent) 55 on each element of the
AbstractListModel.listenerList>AbstractListModel.listenerList 55 which is a javax.swing.event.ListDataListener. |
protected void |
fireIntervalAdded(java.lang.Object source,
int index0,
int index1)
Call ListDataListener.intervalAdded(javax.swing.event.ListDataEvent)> ListDataListener.intervalAdded(javax.swing.event.ListDataEvent) 55 on each element of the
AbstractListModel.listenerList>AbstractListModel.listenerList 55 which is a javax.swing.event.ListDataListener. |
protected void |
fireIntervalRemoved(java.lang.Object source,
int index0,
int index1)
Call ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent)> ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent) 55 on each element of the
AbstractListModel.listenerList>AbstractListModel.listenerList 55 which is a javax.swing.event.ListDataListener. |
void |
fireTableCellUpdated(int row,
int column)
Notifies all listeners that the value of the cell at [row, column] has been updated. |
void |
fireTableChanged(javax.swing.event.TableModelEvent e)
Forwards the given notification event to all TableModelListeners that registered
themselves as listeners for this table model. |
void |
fireTableDataChanged()
Notifies all listeners that all cell values in the table's rows may have changed. |
void |
fireTableRowsDeleted(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted. |
void |
fireTableRowsInserted(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted. |
void |
fireTableRowsUpdated(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been updated. |
void |
fireTableStructureChanged()
Notifies all listeners that the table's structure has changed. |
java.lang.Class |
getColumnClass(int inColumn)
Returns the Class for all Object instances
in the specified column. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int inColumn)
Returns the name of a column in the model. |
protected org.scopemvc.core.Selector |
getColumnSelector(int inColumn)
|
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array of all the listeners of the given type that were added to this model. |
protected org.scopemvc.core.PropertyManager |
getPropertyManager()
|
int |
getRowCount()
Returns the number of rows in the model. |
java.lang.Object |
getValueAt(int inRow,
int inColumn)
Returns the value ( Object) at a particular cell in the
table. |
boolean |
isCellEditable(int inRow,
int inColumn)
Returns true if the cell is editable, and false
otherwise. |
void |
removeListDataListener(javax.swing.event.ListDataListener l)
Add a listener object to this model. |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setColumnNames(java.lang.String[] inNames)
|
void |
setColumnSelectors(org.scopemvc.core.Selector[] inSelectors)
|
void |
setColumnSelectorStrings(java.lang.String[] inSelectorStrings)
|
void |
setEditableColumns(boolean[] inEditables)
|
protected void |
setShownModel(java.lang.Object inModel)
Called internally from updateFromProperty(). |
void |
setValueAt(java.lang.Object inValue,
int inRow,
int inColumn)
Sets the value at a particular cell in the table. |
| Methods inherited from class org.scopemvc.view.swing.SAbstractListModel |
getBoundModel, getElementAt, getManager, getSelector, getShownModel, getSize, getSizeSelector, getViewValue, isSorted, modelChanged, refresh, setBoundModel, setComparator, setListModel, setSelector, setSelectorString, setSizeSelector, setSizeSelectorString, setSorted, setSorted, updateFromProperty, validationFailed, validationSuccess |
| Methods inherited from class javax.swing.AbstractListModel |
getListDataListeners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LOG
private static final org.apache.commons.logging.Log LOG
columnSelectors
protected org.scopemvc.core.Selector[] columnSelectors
columnNames
protected java.lang.String[] columnNames
columnsEditable
protected boolean[] columnsEditable
manager
protected org.scopemvc.core.PropertyManager manager
table
protected javax.swing.JTable table
| Constructor Detail |
STableModel
public STableModel(javax.swing.JTable inTable)
| Method Detail |
setColumnSelectors
public void setColumnSelectors(org.scopemvc.core.Selector[] inSelectors)
setColumnSelectorStrings
public void setColumnSelectorStrings(java.lang.String[] inSelectorStrings)
setColumnNames
public void setColumnNames(java.lang.String[] inNames)
setEditableColumns
public void setEditableColumns(boolean[] inEditables)
getColumnSelector
protected org.scopemvc.core.Selector getColumnSelector(int inColumn)
getPropertyManager
protected org.scopemvc.core.PropertyManager getPropertyManager()
setShownModel
protected void setShownModel(java.lang.Object inModel)
- Called internally from updateFromProperty().
- Overrides:
setShownModelin classSAbstractListModel
getRowCount
public int getRowCount()
- Description copied from interface:
javax.swing.table.TableModel - Returns the number of rows in the model.
- Specified by:
getRowCountin interfacejavax.swing.table.TableModel
getColumnCount
public int getColumnCount()
- Description copied from interface:
javax.swing.table.TableModel - Returns the number of columns in the model.
- Specified by:
getColumnCountin interfacejavax.swing.table.TableModel
getColumnName
public java.lang.String getColumnName(int inColumn)
- Description copied from interface:
javax.swing.table.TableModel - Returns the name of a column in the model.
- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel
getColumnClass
public java.lang.Class getColumnClass(int inColumn)
- Description copied from interface:
javax.swing.table.TableModel - Returns the
Classfor allObjectinstances in the specified column.- Specified by:
getColumnClassin interfacejavax.swing.table.TableModel
isCellEditable
public boolean isCellEditable(int inRow,
int inColumn)
- Description copied from interface:
javax.swing.table.TableModel - Returns
trueif the cell is editable, andfalseotherwise.- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel
getValueAt
public java.lang.Object getValueAt(int inRow, int inColumn)
- Description copied from interface:
javax.swing.table.TableModel - Returns the value (
Object) at a particular cell in the table.- Specified by:
getValueAtin interfacejavax.swing.table.TableModel
setValueAt
public void setValueAt(java.lang.Object inValue, int inRow, int inColumn)
- Description copied from interface:
javax.swing.table.TableModel - Sets the value at a particular cell in the table.
- Specified by:
setValueAtin interfacejavax.swing.table.TableModel
addListDataListener
public void addListDataListener(javax.swing.event.ListDataListener l)
- Description copied from class:
javax.swing.AbstractListModel - Add a listener object to this model. The listener will be called
any time the set of elements in the model is changed.
- Specified by:
addListDataListenerin interfacejavax.swing.ListModel
removeListDataListener
public void removeListDataListener(javax.swing.event.ListDataListener l)
- Description copied from class:
javax.swing.AbstractListModel - Add a listener object to this model. The listener will no longer be
called when the set of elements in the model is changed.
- Specified by:
removeListDataListenerin interfacejavax.swing.ListModel
fireContentsChanged
protected void fireContentsChanged(java.lang.Object source, int index0, int index1)
- Description copied from class:
javax.swing.AbstractListModel - Call ListDataListener.contentsChanged(javax.swing.event.ListDataEvent)>
ListDataListener.contentsChanged(javax.swing.event.ListDataEvent)55 on each element of the AbstractListModel.listenerList>AbstractListModel.listenerList55 which is a javax.swing.event.ListDataListener. The event fired has type ListDataEvent.CONTENTS_CHANGED>ListDataEvent.CONTENTS_CHANGED55 and represents a change to the data elements in the range [startIndex, endIndex] inclusive.
fireIntervalAdded
protected void fireIntervalAdded(java.lang.Object source, int index0, int index1)
- Description copied from class:
javax.swing.AbstractListModel - Call ListDataListener.intervalAdded(javax.swing.event.ListDataEvent)>
ListDataListener.intervalAdded(javax.swing.event.ListDataEvent)55 on each element of the AbstractListModel.listenerList>AbstractListModel.listenerList55 which is a javax.swing.event.ListDataListener. The event fired has type ListDataEvent.INTERVAL_ADDED>ListDataEvent.INTERVAL_ADDED55 and represents an addition of the data elements in the range [startIndex, endIndex] inclusive.
fireIntervalRemoved
protected void fireIntervalRemoved(java.lang.Object source, int index0, int index1)
- Description copied from class:
javax.swing.AbstractListModel - Call ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent)>
ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent)55 on each element of the AbstractListModel.listenerList>AbstractListModel.listenerList55 which is a javax.swing.event.ListDataListener. The event fired has type ListDataEvent.INTERVAL_REMOVED>ListDataEvent.INTERVAL_REMOVED55 and represents a removal of the data elements in the range [startIndex, endIndex] inclusive.
addTableModelListener
public void addTableModelListener(javax.swing.event.TableModelListener l)
- Adds a listener to the list that's notified each time a change
to the data model occurs.
- Specified by:
addTableModelListenerin interfacejavax.swing.table.TableModel
removeTableModelListener
public void removeTableModelListener(javax.swing.event.TableModelListener l)
- Removes a listener from the list that's notified each time a
change to the data model occurs.
- Specified by:
removeTableModelListenerin interfacejavax.swing.table.TableModel
fireTableDataChanged
public void fireTableDataChanged()
- Notifies all listeners that all cell values in the table's
rows may have changed. The number of rows may also have changed
and the
JTableshould redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.
fireTableStructureChanged
public void fireTableStructureChanged()
- Notifies all listeners that the table's structure has changed.
The number of columns in the table, and the names and types of
the new columns may be different from the previous state.
If the
JTablereceives this event and itsautoCreateColumnsFromModelflag is set it discards any table columns that it had and reallocates default columns in the order they appear in the model. This is the same as callingsetModel(TableModel)on theJTable.
fireTableRowsInserted
public void fireTableRowsInserted(int firstRow,
int lastRow)
- Notifies all listeners that rows in the range
[firstRow, lastRow], inclusive, have been inserted.
fireTableRowsUpdated
public void fireTableRowsUpdated(int firstRow,
int lastRow)
- Notifies all listeners that rows in the range
[firstRow, lastRow], inclusive, have been updated.
fireTableRowsDeleted
public void fireTableRowsDeleted(int firstRow,
int lastRow)
- Notifies all listeners that rows in the range
[firstRow, lastRow], inclusive, have been deleted.
fireTableCellUpdated
public void fireTableCellUpdated(int row,
int column)
- Notifies all listeners that the value of the cell at
[row, column]has been updated.
fireTableChanged
public void fireTableChanged(javax.swing.event.TableModelEvent e)
- Forwards the given notification event to all
TableModelListenersthat registered themselves as listeners for this table model.
getListeners
public java.util.EventListener[] getListeners(java.lang.Class listenerType)
- Returns an array of all the listeners of the given type that
were added to this model.
|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC