Class HeatmapVisualSetContainer
java.lang.Object
com.amalgamasimulation.charts.visualsets.containers.AbstractVisualSetContainer<IHeatmapChartVisualSet>
com.amalgamasimulation.charts.visualsets.containers.HeatmapVisualSetContainer
- All Implemented Interfaces:
IYAxisCategoryVisualSetContainer<String>
public class HeatmapVisualSetContainer
extends AbstractVisualSetContainer<IHeatmapChartVisualSet>
implements IYAxisCategoryVisualSetContainer<String>
Class that represents the container for VisualSets used in the
HeatmapChart.- Author:
- Aleksey Kirillov
-
Field Summary
Fields inherited from class com.amalgamasimulation.charts.visualsets.containers.AbstractVisualSetContainer
defaultUpdatePolicy, listeners, sortedVisualSets, visualSets, visualSetsComparator, visualSetWindowSizeDescriptorsMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddVisualSetInternal(IHeatmapChartVisualSet visualSet) booleancontainsAnyChild(String category) Checks if given category contains at least one child row with at least oneVisualSet.getChildrens(String category) Returns the childrens list for given category.Returns the policy for calculating the width of the X-axis category.Returns the internalvisualSetscomparator i.e.Returns the parent category for the given category.Returns the policy for calculating the height of the Y-axis category.intgetTreeLevel(String category) Returns the nesting level of the given category.Returns the comparator for X-axis categories.Returns the comparator for Y-axis categories.protected voidbooleanisTree()Checks if this container is a tree container.booleanisTreeStateExpanded(String category) Checks if the given category is currently expanded.Creates a new instance ofAbstractVisualSetContainercorresponding to the current container type.protected voidprotected voidprotected voidprotected voidsetColumnWidthPolicy(IColumnWidthPolicy columnWidthPolicy) Sets the policy for calculating the width of the X-axis category.setColumnWidthPolicy(ColumnWidthPolicy columnWidthPolicy, double columnWidthPolicyValue) Deprecated.use setColumnWidthPolicy(IColumnWidthPolicy columnWidthPolicy) insteadsetRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) Sets the policy for calculating the height of the Y-axis category.setRowHeightPolicy(RowHeightPolicy rowHeightPolicy) Deprecated.use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) insteadsetRowHeightPolicy(RowHeightPolicy rowHeightPolicy, double rowHeightPolicyValue) Deprecated.use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) insteadsetTreeState(String category, boolean expanded, boolean recursively) Sets the expand status of the given category.setXAxisCategoriesComparator(Comparator<String> xAxisCategoriesComparator) Sets the comparator for X-axis categories.setYAxisCategoriesComparator(Comparator<String> yAxisCategoriesComparator) Sets the comparator for Y-axis categories.Methods inherited from class com.amalgamasimulation.charts.visualsets.containers.AbstractVisualSetContainer
addVisualSet, addVisualSet, addVisualSet, addVisualSetContainerChangeHandler, addVisualSets, clear, containsVisualSet, getDefaultUpdatePolicy, getVisualSets, getVisualSetsComparator, getVisualSetsInjectionIndex, getWindowSizeDescriptor, removeVisualSet, removeVisualSetContainerChangeHandler, reset, reset, setDefaultUpdatePolicy, setVisualSetsComparator
-
Constructor Details
-
HeatmapVisualSetContainer
public HeatmapVisualSetContainer()Default HeatmapVisualSetContainer constructor.
-
-
Method Details
-
onVisualSetsClear
protected void onVisualSetsClear()- Specified by:
onVisualSetsClearin classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
setRowHeightPolicy
Sets the policy for calculating the height of the Y-axis category. It is possible to set the category height depending on the number of lines or depending on the fixed line size.- Parameters:
rowHeightPolicy- policy for calculating the height of the category- Returns:
- reference to this object
-
setRowHeightPolicy
Deprecated.use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) insteadSets the policy for calculating the height of the Y-axis category. It is possible to set the category height depending on the number of lines or depending on the fixed line size.- Parameters:
rowHeightPolicy- policy for calculating the height of the category- Returns:
- reference to this object
-
setRowHeightPolicy
public HeatmapVisualSetContainer setRowHeightPolicy(RowHeightPolicy rowHeightPolicy, double rowHeightPolicyValue) Deprecated.use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) insteadSets the policy for calculating the height of the Y-axis category. It is possible to set the category height depending on the number of lines or depending on the fixed line size.- Parameters:
rowHeightPolicy- policy for calculating the height of the categoryrowHeightPolicyValue- corresponding numeric value for the selected policy- Returns:
- reference to this object
-
setColumnWidthPolicy
Sets the policy for calculating the width of the X-axis category. It is possible to set the category width depending on the number of lines or depending on the fixed column size.- Parameters:
columnWidthPolicy- policy for calculating the width of the category- Returns:
- reference to this object
-
setColumnWidthPolicy
public HeatmapVisualSetContainer setColumnWidthPolicy(ColumnWidthPolicy columnWidthPolicy, double columnWidthPolicyValue) Deprecated.use setColumnWidthPolicy(IColumnWidthPolicy columnWidthPolicy) insteadSets the policy for calculating the width of the X-axis category. It is possible to set the category width depending on the number of lines or depending on the fixed column size.- Parameters:
columnWidthPolicy- policy for calculating the width of the X-axis categorycolumnWidthPolicyValue- corresponding numeric value for the selected policy- Returns:
- reference to this object
-
getColumnWidthPolicy
Returns the policy for calculating the width of the X-axis category.- Returns:
- the policy for calculating the width of the X-axis category
-
getRowHeightPolicy
Returns the policy for calculating the height of the Y-axis category.- Specified by:
getRowHeightPolicyin interfaceIYAxisCategoryVisualSetContainer<String>- Returns:
- the policy for calculating the height of the Y-axis category
-
setXAxisCategoriesComparator
public HeatmapVisualSetContainer setXAxisCategoriesComparator(Comparator<String> xAxisCategoriesComparator) Sets the comparator for X-axis categories. The comparator determines the sorting order in which the X-axis categories are located.- Parameters:
xAxisCategoriesComparator- new comparator for X-axis categories- Returns:
- reference to this object
-
setYAxisCategoriesComparator
public HeatmapVisualSetContainer setYAxisCategoriesComparator(Comparator<String> yAxisCategoriesComparator) Sets the comparator for Y-axis categories. The comparator determines the sorting order in which the Y-axis categories are located.- Parameters:
yAxisCategoriesComparator- new comparator for Y-axis categories- Returns:
- reference to this object
-
getXAxisCategoriesComparator
Returns the comparator for X-axis categories.- Returns:
- the comparator for X-axis categories.
-
getYAxisCategoriesComparator
Returns the comparator for Y-axis categories.- Returns:
- the comparator for Y-axis categories.
-
addVisualSetInternal
- Specified by:
addVisualSetInternalin classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
onBeforeRemoveVisualSetInternal
- Specified by:
onBeforeRemoveVisualSetInternalin classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
onAfterRemoveVisualSetInternal
- Specified by:
onAfterRemoveVisualSetInternalin classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
invalidateDependencies
protected void invalidateDependencies()- Specified by:
invalidateDependenciesin classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
onVisualSetsChange
protected void onVisualSetsChange()- Specified by:
onVisualSetsChangein classAbstractVisualSetContainer<IHeatmapChartVisualSet>
-
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<IHeatmapChartVisualSet>- Returns:
- the internal
visualSetscomparator
-
newInstance
Description copied from class:AbstractVisualSetContainerCreates a new instance ofAbstractVisualSetContainercorresponding to the current container type.- Specified by:
newInstancein classAbstractVisualSetContainer<IHeatmapChartVisualSet>- Returns:
- a new instance of
AbstractVisualSetContainercorresponding to the current container type
-
isTree
public boolean isTree()Description copied from interface:IYAxisCategoryVisualSetContainerChecks if this container is a tree container.- Specified by:
isTreein interfaceIYAxisCategoryVisualSetContainer<String>- Returns:
trueif this container is a tree container,falseotherwise
-
isTreeStateExpanded
Description copied from interface:IYAxisCategoryVisualSetContainerChecks if the given category is currently expanded.Used in tree structures.
- Specified by:
isTreeStateExpandedin interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the expand status is being checked- Returns:
truethe given category is currently expanded,falseotherwise
-
containsAnyChild
Description copied from interface:IYAxisCategoryVisualSetContainerChecks if given category contains at least one child row with at least oneVisualSet.Used in tree structures.
- Specified by:
containsAnyChildin interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the childs are being checked- Returns:
trueif given given category contains at least one child row with at least oneVisualSet,falseotherwise
-
setTreeState
public HeatmapVisualSetContainer setTreeState(String category, boolean expanded, boolean recursively) Description copied from interface:IYAxisCategoryVisualSetContainerSets the expand status of the given category. Provides the opportunity to expand a list of elements recursively, i.e. also expand all parent elements, up to the top-level elements.Used in tree structures.
- Specified by:
setTreeStatein interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the expand status is being setexpanded- new expand statusrecursively- determines whether the new status should be applied to all parent elements up to top-level elements- Returns:
- reference to this object
-
getTreeLevel
Description copied from interface:IYAxisCategoryVisualSetContainerReturns the nesting level of the given category.Used in tree structures to define parent-child dependencies between categories.
- Specified by:
getTreeLevelin interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the nesting level is being checked- Returns:
- the nesting level of the given category
-
getParent
Description copied from interface:IYAxisCategoryVisualSetContainerReturns the parent category for the given category.Used in tree structures to define parent-child dependencies between categories.
- Specified by:
getParentin interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the parent row is being checked- Returns:
- the parent category for the given category
-
getChildrens
Description copied from interface:IYAxisCategoryVisualSetContainerReturns the childrens list for given category.Used in tree structures.
- Specified by:
getChildrensin interfaceIYAxisCategoryVisualSetContainer<String>- Parameters:
category- category for which the childrens list is being checked- Returns:
- the childrens list for given category
-