|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.AbstractValueModel<V>
com.guiseframework.model.DefaultListSelectModel<V>
com.guiseframework.model.AbstractListSelectTableModel<V>
V - The type of values representing table rows.public abstract class AbstractListSelectTableModel<V>
An abstract implementation of a table model representing selectable list values. The model is thread-safe, synchronized on itself. Any iteration over values should include synchronization on the instance of this class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.guiseframework.model.DefaultListSelectModel |
|---|
DefaultListSelectModel.ValueState |
| Nested classes/interfaces inherited from interface com.guiseframework.model.TableModel |
|---|
TableModel.Cell<C> |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractListSelectTableModel(java.lang.Class<V> valueClass,
ListSelectionPolicy<V> listSelectionStrategy,
TableColumnModel<?>... columns)
Constructs a list select table model indicating the type of values it can hold. |
|
AbstractListSelectTableModel(java.lang.Class<V> valueClass,
TableColumnModel<?>... columns)
Constructs a list select table model indicating the type of values it can hold, using a default multiple selection strategy. |
|
| Method Summary | ||
|---|---|---|
|
getCellValue(int rowIndex,
TableColumnModel<C> column)
Returns the cell value at the given row and column. |
|
|
getCellValue(TableModel.Cell<C> cell)
Returns the cell value for the given cell. |
|
protected abstract
|
getCellValue(V value,
int rowIndex,
TableColumnModel<C> column)
Returns the value's property for the given column. |
|
ValueModel<java.lang.Object> |
getCellValueModel(int rowIndex,
int colIndex)
Returns the model representing the cell value at the given row and column. |
|
int |
getColumnCount()
|
|
int |
getColumnIndex(TableColumnModel<?> column)
Determines the logical index of the given table column. |
|
java.util.List<TableColumnModel<?>> |
getColumns()
|
|
int |
getRowCount()
|
|
|
setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
Sets the cell value at the given row and column. |
|
|
setCellValue(TableModel.Cell<C> cell,
C newCellValue)
Sets the cell value for the given cell. |
|
protected abstract
|
setCellValue(V value,
int rowIndex,
TableColumnModel<C> column,
C newCellValue)
Sets the value's property for the given column. |
|
| Methods inherited from class com.guiseframework.model.AbstractValueModel |
|---|
createPropertyVetoException, getValidator, getValueClass, isValidValue, setValidator, validateValue |
| Methods inherited from class com.guiseframework.model.AbstractModel |
|---|
getEventListenerManager, getPlainText |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from interface com.guiseframework.model.ValueModel |
|---|
getValidator, getValueClass, isValidValue, setValidator, validateValue |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractListSelectTableModel(java.lang.Class<V> valueClass,
TableColumnModel<?>... columns)
valueClass - The class indicating the type of values held in the model.columns - The models representing the table columns.
java.lang.NullPointerException - if the given value class is null.
public AbstractListSelectTableModel(java.lang.Class<V> valueClass,
ListSelectionPolicy<V> listSelectionStrategy,
TableColumnModel<?>... columns)
valueClass - The class indicating the type of values held in the model.listSelectionStrategy - The strategy for selecting values in the model.columns - The models representing the table columns.
java.lang.NullPointerException - if the given value class and/or selection strategy is null.| Method Detail |
|---|
public int getColumnIndex(TableColumnModel<?> column)
getColumnIndex in interface TableModelcolumn - One of the table columns.
public java.util.List<TableColumnModel<?>> getColumns()
getColumns in interface TableModelpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModel
public ValueModel<java.lang.Object> getCellValueModel(int rowIndex,
int colIndex)
rowIndex - The zero-based row index.colIndex - The zero-based column index.
java.lang.IndexOutOfBoundsException - if the given row index and/or column index represents an invalid location for the table.public <C> C getCellValue(TableModel.Cell<C> cell)
getCellValue(int, TableColumnModel).
getCellValue in interface TableModelC - The type of cell value.cell - The cell containing the row index and column information.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
public <C> C getCellValue(int rowIndex,
TableColumnModel<C> column)
getCellValue in interface TableModelC - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
public <C> void setCellValue(TableModel.Cell<C> cell,
C newCellValue)
#setCellValue(int, TableColumnModel, C).
setCellValue in interface TableModelC - The type of cell value.cell - The cell containing the row index and column information.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
public <C> void setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
setCellValue in interface TableModelC - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
protected abstract <C> C getCellValue(V value,
int rowIndex,
TableColumnModel<C> column)
C - The type of cell values in the given column.value - The value in this list select model.rowIndex - The zero-based row index of the value.column - The column for which a value should be returned.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
protected abstract <C> void setCellValue(V value,
int rowIndex,
TableColumnModel<C> column,
C newCellValue)
C - The type of cell values in the given column.value - The value in this list select model.rowIndex - The zero-based row index of the value.column - The column for which a value should be returned.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||