public class ConfigurableFeatureTableModel extends FeatureTableModel
| Constructor and Description |
|---|
ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery) |
ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery,
int pageSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptChanges()
Make current changes in configuration (visible columns and aliases)
as definitive.
|
void |
cancelChanges()
Cancel current changes in configuration (visible columns and aliases)
and return to previous status.
|
protected java.lang.String |
getAliasForColumn(java.lang.String name)
Returns the alias for the name of a column.
|
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.
|
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.
|
int |
getOriginalColumnCount() |
protected int |
getOriginalColumnIndex(int columnIndex)
Returns the original position of a column.
|
java.lang.String |
getOriginalColumnName(int column)
Returns the original name of the column, ignoring the alias.
|
protected void |
initialize()
Initialize the TableModel
|
protected void |
initializeVisibleColumns()
Initializes the table visible columns.
|
boolean |
isVisible(java.lang.String name)
Returns if a column is visible.
|
void |
orderByColumn(java.lang.String name,
boolean ascending) |
void |
setAlias(java.lang.String name,
java.lang.String alias)
Sets the alias for a column.
|
void |
setAllVisible()
Changes all columns to be visible.
|
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 |
setVisible(java.lang.String name,
boolean visible)
Sets the visibility of a table column.
|
void |
setVisibleColumns(java.util.List<java.lang.String> names)
Sets the current visible columns list, in the original order.
|
getFeatureAt, getFeatureQuery, getFeatureStore, getHelper, getRowCount, getValueAt, internalGetFeatureDescriptorForColumn, isCellEditable, setSelectionUp, setValueAt, updateaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery)
throws org.gvsig.tools.exception.BaseException
org.gvsig.tools.exception.BaseExceptionFeatureTableModel.FeatureTableModel(FeatureStore, FeatureQuery)public ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery,
int pageSize)
throws org.gvsig.tools.exception.BaseException
org.gvsig.tools.exception.BaseExceptionFeatureTableModel.FeatureTableModel(FeatureStore, FeatureQuery, int)public void acceptChanges()
public void cancelChanges()
protected java.lang.String getAliasForColumn(java.lang.String name)
name - of the columnpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class FeatureTableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelgetColumnCount in class FeatureTableModelpublic java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class FeatureTableModelpublic org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
FeatureTableModelgetDescriptorForColumn in class FeatureTableModelcolumnIndex - the column indexprotected java.lang.Object getFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex)
FeatureTableModelgetFeatureValue in class FeatureTableModelfeature - the feature to get the value fromcolumnIndex - the Feature attribute positionpublic int getOriginalColumnCount()
protected int getOriginalColumnIndex(int columnIndex)
columnIndex - the current visible column indexpublic java.lang.String getOriginalColumnName(int column)
column - the original index of the columnprotected void initialize()
FeatureTableModelinitialize in class FeatureTableModelprotected void initializeVisibleColumns()
public boolean isVisible(java.lang.String name)
name - the name of the columnpublic void orderByColumn(java.lang.String name,
boolean ascending)
throws org.gvsig.tools.exception.BaseException
org.gvsig.tools.exception.BaseExceptionpublic void setAlias(java.lang.String name,
java.lang.String alias)
name - the name of the columnalias - the alias for the columnpublic void setAllVisible()
public void setFeatureType(org.gvsig.fmap.dal.feature.FeatureType featureType)
FeatureTableModelsetFeatureType in class FeatureTableModelfeatureType - the FeatureType of the Featuresprotected org.gvsig.fmap.dal.feature.EditableFeature setFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex,
java.lang.Object value)
FeatureTableModelsetFeatureValue in class FeatureTableModelfeature - the feature to updatecolumnIndex - the attribute positionvalue - the value to setpublic void setVisible(java.lang.String name,
boolean visible)
columnIndex - the index of the column to updatevisible - if the column will be visible or notpublic void setVisibleColumns(java.util.List<java.lang.String> names)
names - the names of the columns to set as visibleCopyright © 2014 gvSIG Association. All Rights Reserved.