|
|||||||||
| 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 | |
|---|---|
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. |
protected java.lang.String[] |
getHiddenColumnNames()
|
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)
|
protected void |
updatePaginHelperWithHiddenColums()
|
| 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 |
|---|
protected 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
public 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 store
org.gvsig.tools.exception.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 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 data
org.gvsig.tools.exception.BaseException - if there is an error reading data from the FeatureStore| Method Detail |
|---|
public 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 position
public 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 position
public org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper getHelper()
protected java.lang.String[] getHiddenColumnNames()
public int getRowCount()
getRowCount in interface javax.swing.table.TableModel
public 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 Features
org.gvsig.fmap.dal.exception.DataException - if there is an error loading the data
protected 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 set
IsNotFeatureSettingException - 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.AbstractTableModel
public void update(org.gvsig.tools.observer.Observable observable,
java.lang.Object notification)
update in interface org.gvsig.tools.observer.Observerprotected void updatePaginHelperWithHiddenColums()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||