public class IlvTreeTableDataSource extends IlvAbstractTableDataSource implements IlvDataConverter
IlvDataSource
.IlvObjectModelWithColumns
,
Serialized FormIlvAbstractTableDataSource.Mapping
Constructor and Description |
---|
IlvTreeTableDataSource()
Creates an
IlvTreeTableDataSource not yet connected to a
model. |
IlvTreeTableDataSource(IlvModelWithColumns model)
Creates an
IlvTreeTableDataSource initially connected to a
given model. |
Modifier and Type | Method and Description |
---|---|
void |
addDataSet(IlvDataSet dataSet)
Adds a new data set at the end of this data source.
|
void |
addDataSet(int idx,
IlvDataSet dataSet)
Inserts a new data set at the specified position.
|
void |
addTreeTableDataSourceListener(TreeTableDataSourceListener listener)
Adds the specified listener to receive events concerning changes
regarding the three views of this data source.
|
double |
convertToDouble(Object value)
Converts an object to a double.
|
void |
disconnect()
Drops references to objects to help garbage collection.
|
void |
dispose()
Cleans up this model and drops references to objects to
help garbage collection.
|
void |
fireTreeTableDataSourceEvent(TreeTableDataSourceEvent event)
Fires a data source event to all subscribed listeners.
|
IlvFilter<?> |
getFilterCriterion()
Returns the filter criterion that is used to constrain the
model objects that are to be displayed.
|
IlvModelWithColumns |
getFilteredModel()
Returns the model after filtering.
|
IlvFlatListModel |
getFlatModel()
Returns the flat-model view of this data source.
|
IlvFlatTableModel |
getFlatTableModel()
Returns the flat-table-model view of this data source.
|
Comparator<IlvClusterId> |
getIdComparator()
Returns the comparator used to compare cluster ids.
|
IlvFlatListModel |
getLastingFlatModel()
Returns the flat-model view of this data source.
|
IlvFlatTableModel |
getLastingFlatTableModel()
Returns the flat-table-model view of this data source.
|
IlvTreeListModel |
getLastingTreeModel()
Returns the tree-model view of this data source.
|
IlvAbstractTableDataSource.Mapping[] |
getMappings()
Returns the mapping from flat-table-model to data sets.
|
int |
getNonClusterPosition()
Returns the relative position of non-clusters compared to clusters.
|
IlvPartitionerFactory<?>[] |
getPartitionerFactories()
Returns the partitioning rules that determine how objects are
grouped together.
|
Comparator<?> |
getSortCriterion()
Returns the sort criterion used to order the model objects.
|
IlvComparatorFactory |
getSortCriterionFactory()
Returns the sort criterion used to order the model objects,
as a model-independent factory.
|
IlvTreeListModel |
getTreeModel()
Returns the tree-model view of this data source.
|
ULocale |
getULocale()
Returns the locale used to sort cluster ids when
getIdComparator() is null . |
IlvModelWithColumns |
getUnderlyingModel()
Returns the underlying model that this data source represents.
|
boolean |
isSorting()
Returns
true if sorting is enabled. |
boolean |
isTimeSeries(IlvDataColumnInfo column)
Returns
true if the given column shall be considered to be a
time-series. |
void |
removeTreeTableDataSourceListener(TreeTableDataSourceListener listener)
Removes the specified listener.
|
void |
setDataSet(int idx,
IlvDataSet dataSet)
Replaces the data set at the specified index.
|
void |
setDataSets(IlvDataSet[] dataSets)
Initializes this data source with the specified data sets.
|
void |
setFilterCriterion(IlvFilter<?> filter)
Changes the filter criterion that is used to constrain the
model objects that are to be displayed.
|
void |
setIdComparator(Comparator<IlvClusterId> idComparator)
Changes the comparator used to compare cluster ids.
|
void |
setMappings(IlvAbstractTableDataSource.Mapping[] mappings)
Changes the mapping from flat-table-model to data sets.
|
void |
setNonClusterPosition(int nonClusterPosition)
Changes the relative position of non-clusters compared to clusters.
|
void |
setPartitionerFactories(IlvPartitionerFactory<?>[] partitionerFactories)
Changes the partitioning rules that determine how objects are
grouped together.
|
void |
setSortCriterion(Comparator<?> sortCriterion)
Deprecated.
Please use
setSortCriterionFactory(ilog.views.chart.datax.adapter.sort.IlvComparatorFactory) with an instance
of IlvConstantComparatorFactory . |
void |
setSortCriterionFactory(IlvComparatorFactory sortCriterionFactory)
Changes the sort criterion used to order the model objects.
|
void |
setSorting(boolean sorting)
Specifies whether sorting of model objects shall be enabled.
|
void |
setULocale(ULocale locale)
Changes the locale used to sort cluster ids when
getIdComparator() is null . |
void |
setUnderlyingModel(IlvModelWithColumns model)
Changes the underlying model that this data source represents.
|
addDataSourceListener, containsDataSet, endBatch, fireDataSourceEvent, getDataSet, getDataSetByName, getDataSetCount, getDataSetIndex, getDataSetIterator, getDataSetList, getDataSets, initDataSets, removeDataSourceListener, startBatch
public IlvTreeTableDataSource()
IlvTreeTableDataSource
not yet connected to a
model.public IlvTreeTableDataSource(IlvModelWithColumns model)
IlvTreeTableDataSource
initially connected to a
given model.model
- An instance of IlvFlatListModel
or
IlvFlatSetModel
or
IlvFlatTableModel
or
IlvTreeListModel
or
IlvTreeSetModel
.public void setDataSet(int idx, IlvDataSet dataSet)
UnsupportedOperationException
.setDataSet
in interface IlvDataSource
setDataSet
in class IlvAbstractDataSource
idx
- The index of the data set to replace.dataSet
- The new data set. If this parameter is null
,
the data set at the index idx
is removed.public void setDataSets(IlvDataSet[] dataSets)
UnsupportedOperationException
.setDataSets
in interface IlvDataSource
setDataSets
in class IlvAbstractDataSource
dataSets
- The new data sets. If this parameter is null
,
all the data sets provided by this data source should be removed.public void addDataSet(int idx, IlvDataSet dataSet)
UnsupportedOperationException
.addDataSet
in interface IlvDataSource
addDataSet
in class IlvAbstractDataSource
public void addDataSet(IlvDataSet dataSet)
UnsupportedOperationException
.addDataSet
in interface IlvDataSource
addDataSet
in class IlvAbstractDataSource
public void fireTreeTableDataSourceEvent(TreeTableDataSourceEvent event)
public void addTreeTableDataSourceListener(TreeTableDataSourceListener listener)
public void removeTreeTableDataSourceListener(TreeTableDataSourceListener listener)
public boolean isTimeSeries(IlvDataColumnInfo column)
true
if the given column shall be considered to be a
time-series.
The default implementation returns true
if the column class is
java.util.Date
or a subclass of it.public IlvModelWithColumns getUnderlyingModel()
public void setUnderlyingModel(IlvModelWithColumns model)
model
- An instance of IlvFlatListModel
or
IlvFlatSetModel
or
IlvFlatTableModel
or
IlvTreeListModel
or
IlvTreeSetModel
.public ULocale getULocale()
getIdComparator()
is null
.
If none has been set, the return value is null
and the
current locale is used.public void setULocale(ULocale locale)
getIdComparator()
is null
.
If the argument is null
, the current locale is used.public IlvFilter<?> getFilterCriterion()
public void setFilterCriterion(IlvFilter<?> filter)
Note: The filter is ignored when the underlying model is of
type IlvFlatTableModel
.
public IlvModelWithColumns getFilteredModel()
IlvFlatListModel
,
the filtered model is of type IlvFlatListModel
as well.
If the underlying model is an IlvTreeListModel
,
the filtered model is of type IlvTreeListModel
as well.public boolean isSorting()
true
if sorting is enabled.public void setSorting(boolean sorting)
Note: Sorting is not performed when the underlying model is of
type IlvFlatTableModel
.
public IlvComparatorFactory getSortCriterionFactory()
public void setSortCriterionFactory(IlvComparatorFactory sortCriterionFactory)
sortCriterionFactory
- Sorting criterion, as a model-independent
factory. null
means the
natural sorting order for objects implementing
the Comparable
interface.
Note: The sort criterion is only used when isSorting
is true
or when the underlying model is of type
IlvFlatSetModel
or IlvTreeSetModel
.
Note: The sort criterion is ignored when the underlying model is of
type IlvFlatTableModel
.
IlvConstantComparatorFactory
public Comparator<?> getSortCriterion()
@Deprecated public void setSortCriterion(Comparator<?> sortCriterion)
setSortCriterionFactory(ilog.views.chart.datax.adapter.sort.IlvComparatorFactory)
with an instance
of IlvConstantComparatorFactory
.sortCriterion
- Sorting criterion. null
means the
natural sorting order for objects implementing
the Comparable
interface.
Note: The sort criterion is only used when isSorting
is true
or when the underlying model is of type
IlvFlatSetModel
or IlvTreeSetModel
.
Note: The sort criterion is ignored when the underlying model is of
type IlvFlatTableModel
.
public IlvPartitionerFactory<?>[] getPartitionerFactories()
public void setPartitionerFactories(IlvPartitionerFactory<?>[] partitionerFactories)
Note: The partitioning rules are ignored when the underlying model
is already of type IlvTreeListModel
or IlvTreeSetModel
.
public Comparator<IlvClusterId> getIdComparator()
public void setIdComparator(Comparator<IlvClusterId> idComparator)
idComparator
- The comparator that is used to compare cluster ids, or
null
denoting a default comparator.public int getNonClusterPosition()
public void setNonClusterPosition(int nonClusterPosition)
nonClusterPosition
- Determines how non-clusters are sorted: -1 means
they precede all clusters, 1 means they come at the
end, 0 means no preference.public final IlvFlatTableModel getFlatTableModel()
public final IlvFlatTableModel getLastingFlatTableModel()
This is a wrapper around getFlatTableModel()
.
At any moment, getLastingFlatTableModel()
has the same
structure and contents as getFlatTableModel()
. The
difference is that while the result of getFlatTableModel()
can change over time, for example when the parameters of this data source
change, the result of getLastingFlatTableModel()
is the same
object across the entire lifetime of this data source.
getFlatTableModel()
public final IlvFlatListModel getFlatModel()
public final IlvFlatListModel getLastingFlatModel()
This is a wrapper around getFlatModel()
.
At any moment, getLastingFlatModel()
has the same
structure and contents as getFlatModel()
. The
difference is that while the result of getFlatModel()
can change over time, for example when the parameters of this data source
change, the result of getLastingFlatModel()
is the same
object across the entire lifetime of this data source.
getFlatModel()
public final IlvTreeListModel getTreeModel()
public final IlvTreeListModel getLastingTreeModel()
This is a wrapper around getTreeModel()
.
At any moment, getLastingTreeModel()
has the same
structure and contents as getTreeModel()
. The
difference is that while the result of getTreeModel()
can change over time, for example when the parameters of this data source
change, the result of getLastingTreeModel()
is the same
object across the entire lifetime of this data source.
getTreeModel()
public IlvAbstractTableDataSource.Mapping[] getMappings()
null
if none has been set so far.public void setMappings(IlvAbstractTableDataSource.Mapping[] mappings)
mappings
- An array of mapping information, or null
to return to the default mapping.public double convertToDouble(Object value)
IlvDataConverter
, or uses a
default conversion otherwise.convertToDouble
in interface IlvDataConverter
public void dispose()
Note: After calling this function, this data source is no longer functional.
public void disconnect()
Note: After calling this function, and after some changes occurred in the underlying model, this data source is no longer functional.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.