|
||||||||||
| 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
org.gvsig.fmap.mapcontrol.dal.feature.swing.table.ConfigurableFeatureTableModel
public class ConfigurableFeatureTableModel
Extends the FeatureTableModel to add more configurable options, like the visible columns, column name aliases and row order. TODO: añadir la persistencia.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
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)
|
|
| Method Summary | |
|---|---|
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 String |
getAliasForColumn(String name)
Returns the alias for the name of a column. |
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. |
protected 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. |
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(String name)
Returns if a column is visible. |
void |
orderByColumn(String name,
boolean ascending)
|
void |
setAlias(String name,
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,
Object value)
Sets the value of an Feature attribute at the given position. |
void |
setVisible(String name,
boolean visible)
Sets the visibility of a table column. |
void |
setVisibleColumns(List<String> names)
Sets the current visible columns list, in the original order. |
| Methods inherited from class org.gvsig.fmap.mapcontrol.dal.feature.swing.table.FeatureTableModel |
|---|
getFeatureAt, getFeatureQuery, getFeatureStore, getHelper, getRowCount, getValueAt, internalGetFeatureDescriptorForColumn, isCellEditable, setSelectionUp, setValueAt, update |
| 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 ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery)
throws BaseException
BaseExceptionFeatureTableModel.FeatureTableModel(FeatureStore, FeatureQuery)
public ConfigurableFeatureTableModel(org.gvsig.fmap.dal.feature.FeatureStore featureStore,
org.gvsig.fmap.dal.feature.FeatureQuery featureQuery,
int pageSize)
throws BaseException
BaseExceptionFeatureTableModel.FeatureTableModel(FeatureStore, FeatureQuery, int)| Method Detail |
|---|
public int getColumnCount()
getColumnCount in interface TableModelgetColumnCount in class FeatureTableModelpublic int getOriginalColumnCount()
public String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class FeatureTableModelpublic Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class FeatureTableModelpublic org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
FeatureTableModel
getDescriptorForColumn in class FeatureTableModelcolumnIndex - the column indexpublic String getOriginalColumnName(int column)
column - the original index of the column
public void setVisible(String name,
boolean visible)
columnIndex - the index of the column to updatevisible - if the column will be visible or notpublic void setFeatureType(org.gvsig.fmap.dal.feature.FeatureType featureType)
FeatureTableModel
setFeatureType in class FeatureTableModelfeatureType - the FeatureType of the Featurespublic void setVisibleColumns(List<String> names)
names - the names of the columns to set as visiblepublic void setAllVisible()
public void setAlias(String name,
String alias)
name - the name of the columnalias - the alias for the column
public void orderByColumn(String name,
boolean ascending)
throws BaseException
BaseExceptionprotected void initialize()
FeatureTableModel
initialize in class FeatureTableModelpublic boolean isVisible(String name)
name - the name of the column
protected void initializeVisibleColumns()
protected String getAliasForColumn(String name)
name - of the column
protected int getOriginalColumnIndex(int columnIndex)
columnIndex - the current visible column index
protected Object getFeatureValue(org.gvsig.fmap.dal.feature.Feature feature,
int columnIndex)
FeatureTableModel
getFeatureValue in class FeatureTableModelfeature - 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)
FeatureTableModel
setFeatureValue in class FeatureTableModelfeature - the feature to updatecolumnIndex - the attribute positionvalue - the value to setpublic void acceptChanges()
public void cancelChanges()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||