public class FeatureTableModel extends javax.swing.table.AbstractTableModel implements ComplexObserver, SupportDisposable
| Modifier and Type | Class and Description |
|---|---|
static class |
FeatureTableModel.Bitmask |
| Modifier | Constructor and Description |
|---|---|
protected |
FeatureTableModel(FeaturePagingHelper helper)
Constructs a TableModel from a FeatureCollection and a Paging pagingHelper.
|
|
FeatureTableModel(FeatureStore featureStore,
FeatureQuery featureQuery)
Constructs a TableModel from the features of a FeatureStore, with the
default page size.
|
|
FeatureTableModel(FeatureStore featureStore,
FeatureQuery featureQuery,
int pageSize)
Constructs a TableModel from the features of a FeatureStore, with the
default page size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
void |
doDispose() |
protected void |
fireTableChanged() |
java.lang.Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int column) |
FeatureAttributeDescriptor |
getDescriptorForColumn(int columnIndex)
Returns the descriptor of a Feature attribute for a table column.
|
Feature |
getFeatureAt(int rowIndex)
Returns the value for a row position.
|
FeatureQuery |
getFeatureQuery()
Returns the FeatureQuery used to get the Features.
|
FeatureStore |
getFeatureStore()
Returns the FeatureStore of the Collection.
|
protected FeatureType |
getFeatureType()
Returns the type of the
|
protected java.lang.Object |
getFeatureValue(Feature feature,
int columnIndex)
Returns the value of a Feature attribute, at the given position.
|
FeaturePagingHelper |
getHelper()
Returns a reference to the Paging Helper used to load the data from the
DataStore.
|
protected java.lang.String[] |
getHiddenColumnNames() |
int |
getRowCount() |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex) |
protected void |
initialize()
Initialize the TableModel
|
protected FeatureAttributeDescriptor |
internalGetFeatureDescriptorForColumn(int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
boolean |
isSelectionLocked()
Returns true if selection must not be changed.
|
void |
setFeatureType(FeatureType featureType)
Sets the FeatureType to show in the table.
|
protected EditableFeature |
setFeatureValue(Feature feature,
int columnIndex,
java.lang.Object value)
Sets the value of an Feature attribute at the given position.
|
void |
setSelectionUp(boolean selectionUp)
Sets that the selected Features get returned first.
|
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex) |
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
protected void |
updatePaginHelperWithHiddenColums() |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic FeatureTableModel(FeatureStore featureStore, FeatureQuery featureQuery) throws BaseException
featureStore - to extract the features fromfeatureQuery - the query to get the features from the storeBaseException - if there is an error reading data from the
FeatureStorepublic FeatureTableModel(FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) throws BaseException
featureStore - to extract the features fromfeatureQuery - the query to get the features from the storepageSize - the number of elements per page dataBaseException - if there is an error reading data from the
FeatureStoreprotected FeatureTableModel(FeaturePagingHelper helper)
helper - public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelpublic Feature getFeatureAt(int rowIndex)
rowIndex - the row positionpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelpublic boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic void setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic FeaturePagingHelper getHelper()
public void setFeatureType(FeatureType featureType)
featureType - the FeatureType of the Featurespublic void setSelectionUp(boolean selectionUp)
selectionUp - protected void fireTableChanged()
public void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
protected void updatePaginHelperWithHiddenColums()
protected java.lang.String[] getHiddenColumnNames()
public FeatureStore getFeatureStore()
public FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
columnIndex, - the column indexprotected FeatureAttributeDescriptor internalGetFeatureDescriptorForColumn(int columnIndex)
columnIndex - protected void initialize()
protected java.lang.Object getFeatureValue(Feature feature, int columnIndex)
feature - the feature to get the value fromcolumnIndex - the Feature attribute positionprotected EditableFeature setFeatureValue(Feature feature, int columnIndex, java.lang.Object value)
feature - the feature to updatecolumnIndex - the attribute positionvalue - the value to setpublic FeatureQuery getFeatureQuery()
protected FeatureType getFeatureType()
public boolean isSelectionLocked()
public void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic void doDispose()
throws BaseException
doDispose in interface SupportDisposableBaseException