Class LineVisualSetContainer
java.lang.Object
com.amalgamasimulation.visualsets.containers.AbstractVisualSetContainer<ILineChartVisualSet>
com.amalgamasimulation.visualsets.containers.LineVisualSetContainer
Class that represents the container for VisualSets used in the AbstractLineChart.
- Author:
- Aleksey Kirillov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<LineVisualSet<?>, List<LineVisualSet<?>>> protected Map<LineVisualSet<?>, LineVisualSet<?>> protected Map<LineVisualSet<?>, LineVisualSet<?>> Fields inherited from class com.amalgamasimulation.visualsets.containers.AbstractVisualSetContainer
defaultUpdatePolicy, listeners, sortedVisualSets, visualSets, visualSetsComparator, visualSetWindowSizeDescriptorsMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStackDependency(LineVisualSet<?> topVisualSet, LineVisualSet<?> bottomVisualSet) Adds a single dependency-pair to the list of dependent LineVisualSets.protected voidaddVisualSetInternal(ILineChartVisualSet visualSet) Returns the internalvisualSetscomparator i.e.List<LineVisualSet<?>> getStackDependencyList(LineVisualSet<?> lineVisualSet) Returns a list of all dependentLineVisualSet's whose data is located under the specifiedLineVisualSet.Map<LineVisualSet<?>, LineVisualSet<?>> Returns a map of all dependent LineVisualSets whose data is located under the specified LineVisualSet-keys.protected voidCreates a new instance ofAbstractVisualSetContainercorresponding to the current container type.protected voidprotected voidprotected voidprotected void<V extends LineVisualSet<?>>
voidsetStackDependencyList(List<V> stackDependencyList) Specifies the order of LineVisualSets to display as a stack cumulative plot.Methods inherited from class com.amalgamasimulation.visualsets.containers.AbstractVisualSetContainer
addVisualSet, addVisualSet, addVisualSet, addVisualSetContainerChangeHandler, addVisualSets, clear, containsVisualSet, getDefaultUpdatePolicy, getVisualSets, getVisualSetsComparator, getVisualSetsInjectionIndex, getWindowSizeDescriptor, removeVisualSet, removeVisualSetContainerChangeHandler, reset, reset, setDefaultUpdatePolicy, setVisualSetsComparator
-
Field Details
-
stackDependencyMap
-
stackDependencyReversedMap
-
stackDependencyListsMap
-
-
Constructor Details
-
LineVisualSetContainer
public LineVisualSetContainer()
-
-
Method Details
-
setStackDependencyList
Specifies the order of LineVisualSets to display as a stack cumulative plot. The list must follow the required bottom-to-top display order and cannot contain duplicates.- Parameters:
stackDependencyList- list that represents the order of LineVisualSets to display as a stack cumulative plot
-
addStackDependency
Adds a single dependency-pair to the list of dependent LineVisualSets. Dependent visual sets are displayed as a stack cumulative plot. The resulted list cannot contain duplicates or cyclic dependencies. A valid result is a flat list, the order in which corresponds to the required bottom-to-top display order.- Parameters:
topVisualSet- visualSet located above the bottomVisualSetbottomVisualSet- visualSet located below the topVisualSet
-
getStackDependencyList
Returns a list of all dependentLineVisualSet's whose data is located under the specifiedLineVisualSet. Map values does contain the specified element itself.- Parameters:
lineVisualSet- lineVisualSet for which the list of all dependentLineVisualSet's is being checked- Returns:
- a list of all dependent
LineVisualSet's whose data is located under the specifiedLineVisualSet
-
getStackDependencyMap
Returns a map of all dependent LineVisualSets whose data is located under the specified LineVisualSet-keys. The list does contain the specified element itself.- Returns:
- a map of all dependent LineVisualSets whose data is located under the specified LineVisualSet-keys
-
addVisualSetInternal
- Specified by:
addVisualSetInternalin classAbstractVisualSetContainer<ILineChartVisualSet>
-
onBeforeRemoveVisualSetInternal
- Specified by:
onBeforeRemoveVisualSetInternalin classAbstractVisualSetContainer<ILineChartVisualSet>
-
onAfterRemoveVisualSetInternal
- Specified by:
onAfterRemoveVisualSetInternalin classAbstractVisualSetContainer<ILineChartVisualSet>
-
invalidateDependencies
protected void invalidateDependencies()- Specified by:
invalidateDependenciesin classAbstractVisualSetContainer<ILineChartVisualSet>
-
onVisualSetsChange
protected void onVisualSetsChange()- Specified by:
onVisualSetsChangein classAbstractVisualSetContainer<ILineChartVisualSet>
-
onVisualSetsClear
protected void onVisualSetsClear()- Specified by:
onVisualSetsClearin classAbstractVisualSetContainer<ILineChartVisualSet>
-
getInternalVisualSetsComparator
Description copied from class:AbstractVisualSetContainerReturns the internalvisualSetscomparator i.e. the function that determines the sorting order ofvisualSets. The internal comparator is applied as last comparator, after all other sorting operations.- Specified by:
getInternalVisualSetsComparatorin classAbstractVisualSetContainer<ILineChartVisualSet>- Returns:
- the internal
visualSetscomparator
-
newInstance
Description copied from class:AbstractVisualSetContainerCreates a new instance ofAbstractVisualSetContainercorresponding to the current container type.- Specified by:
newInstancein classAbstractVisualSetContainer<ILineChartVisualSet>- Returns:
- a new instance of
AbstractVisualSetContainercorresponding to the current container type
-