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
  • Constructor Details

    • HeatmapVisualSetContainer

      public HeatmapVisualSetContainer()
      Default HeatmapVisualSetContainer constructor.
  • Method Details

    • onVisualSetsClear

      protected void onVisualSetsClear()
      Specified by:
      onVisualSetsClear in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • setRowHeightPolicy

      public HeatmapVisualSetContainer setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy)
      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

      public HeatmapVisualSetContainer setRowHeightPolicy(RowHeightPolicy rowHeightPolicy)
      Deprecated.
      use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) instead
      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

      public HeatmapVisualSetContainer setRowHeightPolicy(RowHeightPolicy rowHeightPolicy, double rowHeightPolicyValue)
      Deprecated.
      use setRowHeightPolicy(IRowHeightPolicy rowHeightPolicy) instead
      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
      rowHeightPolicyValue - corresponding numeric value for the selected policy
      Returns:
      reference to this object
    • setColumnWidthPolicy

      public HeatmapVisualSetContainer setColumnWidthPolicy(IColumnWidthPolicy columnWidthPolicy)
      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) instead
      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 X-axis category
      columnWidthPolicyValue - corresponding numeric value for the selected policy
      Returns:
      reference to this object
    • getColumnWidthPolicy

      public IColumnWidthPolicy 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

      public IRowHeightPolicy getRowHeightPolicy()
      Returns the policy for calculating the height of the Y-axis category.
      Specified by:
      getRowHeightPolicy in interface IYAxisCategoryVisualSetContainer<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

      public Comparator<String> getXAxisCategoriesComparator()
      Returns the comparator for X-axis categories.
      Returns:
      the comparator for X-axis categories.
    • getYAxisCategoriesComparator

      public Comparator<String> getYAxisCategoriesComparator()
      Returns the comparator for Y-axis categories.
      Returns:
      the comparator for Y-axis categories.
    • addVisualSetInternal

      protected void addVisualSetInternal(IHeatmapChartVisualSet visualSet)
      Specified by:
      addVisualSetInternal in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • onBeforeRemoveVisualSetInternal

      protected void onBeforeRemoveVisualSetInternal(IHeatmapChartVisualSet visualSet)
      Specified by:
      onBeforeRemoveVisualSetInternal in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • onAfterRemoveVisualSetInternal

      protected void onAfterRemoveVisualSetInternal(IHeatmapChartVisualSet visualSet)
      Specified by:
      onAfterRemoveVisualSetInternal in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • invalidateDependencies

      protected void invalidateDependencies()
      Specified by:
      invalidateDependencies in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • onVisualSetsChange

      protected void onVisualSetsChange()
      Specified by:
      onVisualSetsChange in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
    • getInternalVisualSetsComparator

      public Comparator<IHeatmapChartVisualSet> getInternalVisualSetsComparator()
      Description copied from class: AbstractVisualSetContainer
      Returns the internal visualSets comparator i.e. the function that determines the sorting order of visualSets. The internal comparator is applied as last comparator, after all other sorting operations.
      Specified by:
      getInternalVisualSetsComparator in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
      Returns:
      the internal visualSets comparator
    • newInstance

      public HeatmapVisualSetContainer newInstance()
      Description copied from class: AbstractVisualSetContainer
      Creates a new instance of AbstractVisualSetContainer corresponding to the current container type.
      Specified by:
      newInstance in class AbstractVisualSetContainer<IHeatmapChartVisualSet>
      Returns:
      a new instance of AbstractVisualSetContainer corresponding to the current container type
    • isTree

      public boolean isTree()
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Checks if this container is a tree container.
      Specified by:
      isTree in interface IYAxisCategoryVisualSetContainer<String>
      Returns:
      true if this container is a tree container, false otherwise
    • isTreeStateExpanded

      public boolean isTreeStateExpanded(String category)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Checks if the given category is currently expanded.

      Used in tree structures.

      Specified by:
      isTreeStateExpanded in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the expand status is being checked
      Returns:
      true the given category is currently expanded, false otherwise
    • containsAnyChild

      public boolean containsAnyChild(String category)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Checks if given category contains at least one child row with at least one VisualSet.

      Used in tree structures.

      Specified by:
      containsAnyChild in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the childs are being checked
      Returns:
      true if given given category contains at least one child row with at least one VisualSet, false otherwise
    • setTreeState

      public HeatmapVisualSetContainer setTreeState(String category, boolean expanded, boolean recursively)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Sets 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:
      setTreeState in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the expand status is being set
      expanded - new expand status
      recursively - determines whether the new status should be applied to all parent elements up to top-level elements
      Returns:
      reference to this object
    • getTreeLevel

      public int getTreeLevel(String category)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Returns the nesting level of the given category.

      Used in tree structures to define parent-child dependencies between categories.

      Specified by:
      getTreeLevel in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the nesting level is being checked
      Returns:
      the nesting level of the given category
    • getParent

      public String getParent(String category)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Returns the parent category for the given category.

      Used in tree structures to define parent-child dependencies between categories.

      Specified by:
      getParent in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the parent row is being checked
      Returns:
      the parent category for the given category
    • getChildrens

      public List<String> getChildrens(String category)
      Description copied from interface: IYAxisCategoryVisualSetContainer
      Returns the childrens list for given category.

      Used in tree structures.

      Specified by:
      getChildrens in interface IYAxisCategoryVisualSetContainer<String>
      Parameters:
      category - category for which the childrens list is being checked
      Returns:
      the childrens list for given category