public class FeatureTableModel
extends javax.swing.table.AbstractTableModel
implements org.gvsig.tools.observer.ComplexObserver
| Modifier | Constructor and Description |
|---|---|
protected |
FeatureTableModel(org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper helper)
Constructs a TableModel from a FeatureCollection and a Paging helper.
|
|
FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery)
Constructs a TableModel from the features of a FeatureStore, with the
default page size.
|
|
FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery,
int pageSize)
Constructs a TableModel from the features of a FeatureStore, with the
default page size.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int column) |
org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor |
getDescriptorForColumn(int columnIndex)
Returns the descriptor of a Feature attribute for a table column.
|
org.gvsig.fmap.dal.feature.Feature |
getFeatureAt(int rowIndex)
Returns the value for a row position.
|
org.gvsig.fmap.dal.feature.FeatureQuery |
getFeatureQuery()
Returns the FeatureQuery used to get the Features.
|
org.gvsig.fmap.dal.feature.FeatureStore |
getFeatureStore()
Returns the FeatureStore of the Collection.
|
protected java.lang.Object |
getFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex)
Returns the value of a Feature attribute, at the given position.
|
org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper |
getHelper()
Returns a reference to the Paging Helper used to load the data from the
DataStore.
|
int |
getRowCount() |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex) |
protected void |
initialize()
Initialize the TableModel
|
protected org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor |
internalGetFeatureDescriptorForColumn(int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
setFeatureType(org.gvsig.fmap.dal.feature.FeatureType featureType)
Sets the FeatureType to show in the table.
|
protected org.gvsig.fmap.dal.feature.EditableFeature |
setFeatureValue(org.gvsig.fmap.dal.feature.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(org.gvsig.tools.observer.Observable observable,
java.lang.Object notification) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerprotected FeatureTableModel(org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper helper)
featureCollection - to extract data fromhelper - the paging helperorg.gvsig.fmap.dal.exception.DataException - if there is an error reading data from the FeatureStorepublic FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery)
throws org.gvsig.tools.exception.BaseException
featureStore - to extract the features fromfeatureQuery - the query to get the features from the storeorg.gvsig.tools.exception.BaseException - if there is an error reading data from the FeatureStorepublic FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery,
int pageSize)
throws org.gvsig.tools.exception.BaseException
featureStore - to extract the features fromfeatureQuery - the query to get the features from the storepageSize - the number of elements per page dataorg.gvsig.tools.exception.BaseException - if there is an error reading data from the FeatureStorepublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelpublic org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
columnIndex - the column indexpublic org.gvsig.fmap.dal.feature.Feature getFeatureAt(int rowIndex)
rowIndex - the row positionpublic org.gvsig.fmap.dal.feature.FeatureQuery getFeatureQuery()
public org.gvsig.fmap.dal.feature.FeatureStore getFeatureStore()
protected java.lang.Object getFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex)
feature - the feature to get the value fromcolumnIndex - the Feature attribute positionpublic org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper getHelper()
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelprotected void initialize()
protected org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor internalGetFeatureDescriptorForColumn(int columnIndex)
columnIndex - public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic void setFeatureType(org.gvsig.fmap.dal.feature.FeatureType featureType)
featureType - the FeatureType of the Featuresorg.gvsig.fmap.dal.exception.DataException - if there is an error loading the dataprotected org.gvsig.fmap.dal.feature.EditableFeature setFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex,
java.lang.Object value)
feature - the feature to updatecolumnIndex - the attribute positionvalue - the value to setIsNotFeatureSettingException - if there is an error setting the valuepublic void setSelectionUp(boolean selectionUp)
public void setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic void update(org.gvsig.tools.observer.Observable observable,
java.lang.Object notification)
update in interface org.gvsig.tools.observer.ObserverCopyright © 2014 gvSIG Association. All Rights Reserved.