|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.gvsig.fmap.mapcontrol.dal.feature.swing.table.FeatureTableModel
public class FeatureTableModel
TableModel to access data of Features. This table model can't handle a FeatureSet with more than Integer.MAX_VALUE elements. In that case, only the first Integer.MAX_VALUE elements will be shown.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
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 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()
|
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,
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(Object value,
int rowIndex,
int columnIndex)
|
void |
update(Observable observable,
Object notification)
|
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery)
throws BaseException
featureStore - to extract the features fromfeatureQuery - the query to get the features from the store
BaseException - if there is an error reading data from the FeatureStore
public FeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.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 data
BaseException - if there is an error reading data from the FeatureStoreprotected FeatureTableModel(org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper helper)
featureCollection - to extract data fromhelper - the paging helper
org.gvsig.fmap.dal.exception.DataException - if there is an error reading data from the FeatureStore| Method Detail |
|---|
public int getColumnCount()
getColumnCount in interface TableModelpublic int getRowCount()
getRowCount in interface TableModel
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TableModelpublic org.gvsig.fmap.dal.feature.Feature getFeatureAt(int rowIndex)
rowIndex - the row position
public Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModel
public void setValueAt(Object value,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper getHelper()
public void setFeatureType(org.gvsig.fmap.dal.feature.FeatureType featureType)
featureType - the FeatureType of the Features
org.gvsig.fmap.dal.exception.DataException - if there is an error loading the datapublic void setSelectionUp(boolean selectionUp)
public void update(Observable observable,
Object notification)
update in interface Observerpublic org.gvsig.fmap.dal.feature.FeatureStore getFeatureStore()
public org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
columnIndex - the column indexprotected org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor internalGetFeatureDescriptorForColumn(int columnIndex)
columnIndex -
protected void initialize()
protected Object getFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex)
feature - the feature to get the value fromcolumnIndex - the Feature attribute position
protected org.gvsig.fmap.dal.feature.EditableFeature setFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex,
Object value)
feature - the feature to updatecolumnIndex - the attribute positionvalue - the value to set
IsNotFeatureSettingException - if there is an error setting the valuepublic org.gvsig.fmap.dal.feature.FeatureQuery getFeatureQuery()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||