public class ConfigurableFeatureTableModel extends FeatureTableModel
listenerList
Constructor and Description |
---|
ConfigurableFeatureTableModel(FeatureStore featureStore,
FeatureQuery featureQuery) |
ConfigurableFeatureTableModel(FeatureStore featureStore,
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 String |
getAliasForColumn(String name)
Returns the alias for the name of a column.
|
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int column) |
FeatureAttributeDescriptor |
getDescriptorForColumn(int columnIndex)
Returns the descriptor of a Feature attribute for a table column.
|
protected Object |
getFeatureValue(Feature feature,
int columnIndex)
Returns the value of a Feature attribute, at the given position.
|
String |
getFormattingPattern(int column) |
String |
getFormattingPattern(String columnName) |
protected String[] |
getHiddenColumnNames() |
Locale |
getLocaleOfData() |
int |
getOriginalColumnCount() |
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 |
initializeFormattingPattern(String columnName) |
protected void |
initializeFormattingPatterns() |
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(FeatureType featureType)
Sets the FeatureType to show in the table.
|
protected EditableFeature |
setFeatureValue(Feature feature,
int columnIndex,
Object value)
Sets the value of an Feature attribute at the given position.
|
void |
setFormattingPattern(String columnName,
String pattern) |
void |
setLocaleOfData(Locale locale) |
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.
|
getFeatureAt, getFeatureQuery, getFeatureStore, getFeatureType, getHelper, getRowCount, getValueAt, internalGetFeatureDescriptorForColumn, isCellEditable, isSelectionLocked, setSelectionUp, setValueAt, update, updatePaginHelperWithHiddenColums
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public ConfigurableFeatureTableModel(FeatureStore featureStore, FeatureQuery featureQuery) throws BaseException
public ConfigurableFeatureTableModel(FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) throws BaseException
public int getColumnCount()
getColumnCount
in interface TableModel
getColumnCount
in class FeatureTableModel
public int getOriginalColumnCount()
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class FeatureTableModel
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class FeatureTableModel
public FeatureAttributeDescriptor getDescriptorForColumn(int columnIndex)
FeatureTableModel
getDescriptorForColumn
in class FeatureTableModel
columnIndex
- the column indexpublic String getOriginalColumnName(int column)
column
- the original index of the columnpublic void setVisible(String name, boolean visible)
columnIndex
- the index of the column to updatevisible
- if the column will be visible or notpublic void setFeatureType(FeatureType featureType)
FeatureTableModel
setFeatureType
in class FeatureTableModel
featureType
- the FeatureType of the Featurespublic void setVisibleColumns(List<String> names)
names
- the names of the columns to set as visibleprotected String[] getHiddenColumnNames()
getHiddenColumnNames
in class FeatureTableModel
public void setAllVisible()
public void setAlias(String name, String alias)
name
- the name of the columnalias
- the alias for the columnpublic void orderByColumn(String name, boolean ascending) throws BaseException
BaseException
protected void initialize()
FeatureTableModel
initialize
in class FeatureTableModel
public boolean isVisible(String name)
name
- the name of the columnprotected void initializeVisibleColumns()
protected String getAliasForColumn(String name)
name
- of the columnpublic int getOriginalColumnIndex(int columnIndex)
columnIndex
- the current visible column indexprotected Object getFeatureValue(Feature feature, int columnIndex)
FeatureTableModel
getFeatureValue
in class FeatureTableModel
feature
- the feature to get the value fromcolumnIndex
- the Feature attribute positionprotected EditableFeature setFeatureValue(Feature feature, int columnIndex, Object value)
FeatureTableModel
setFeatureValue
in class FeatureTableModel
feature
- the feature to updatecolumnIndex
- the attribute positionvalue
- the value to setpublic void acceptChanges()
public void cancelChanges()
protected void initializeFormattingPatterns()
protected void initializeFormattingPattern(String columnName)
public String getFormattingPattern(int column)
public Locale getLocaleOfData()
public void setLocaleOfData(Locale locale)