Class HeatmapChartYAxis

java.lang.Object
com.amalgamasimulation.charts.axes.AbstractAxis<String>
com.amalgamasimulation.charts.axes.HeatmapChartYAxis
All Implemented Interfaces:
IAxisTitlePositionPropertyOwner, IAxisTitlePropertyOwner<String>, IScrollBarPropertyOwner

Class that represents an Y-axis drawn on a HeatmapChart area. The Y-axis tick labels represents the Y-axis categories. It holds properties for axis ticks and labels along the axis. This axis does not allow zoom operations.
Author:
Aleksey Kirillov
  • Field Details

    • chartInternal

      protected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal
    • yAxisInternal

      protected com.amalgamasimulation.charts.internals.axes.CategoryYAxisInternal<String> yAxisInternal
  • Constructor Details

    • HeatmapChartYAxis

      public HeatmapChartYAxis(com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal, com.amalgamasimulation.charts.internals.axes.CategoryYAxisInternal<String> yAxisInternal)
      Constructs a HeatmapChartInternal category Y-axis with given CategoryYAxisInternal
      Parameters:
      chartInternal - HeatmapChartInternal which is the owner of this object
      yAxisInternal - CategoryYAxisInternal which is the internal axis logic aggregator
  • Method Details

    • getChartInternal

      protected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal getChartInternal()
      Specified by:
      getChartInternal in class AbstractAxis<String>
    • getAxisInternal

      protected com.amalgamasimulation.charts.internals.axes.CategoryYAxisInternal<String> getAxisInternal()
      Specified by:
      getAxisInternal in class AbstractAxis<String>
    • getTitlePosition

      public AxisTitlePosition getTitlePosition()
      Description copied from interface: IAxisTitlePositionPropertyOwner
      Returns the AxisTitlePosition that specifies the the chart's title position.
      Specified by:
      getTitlePosition in interface IAxisTitlePositionPropertyOwner
      Returns:
      this current AxisTitlePosition
    • setTitlePosition

      public HeatmapChartYAxis setTitlePosition(AxisTitlePosition yAxisTitlePosition)
      Description copied from interface: IAxisTitlePositionPropertyOwner
      Sets the AxisTitlePosition that specifies the chart's title position. Redraws this axis and it's parent chart.
      Specified by:
      setTitlePosition in interface IAxisTitlePositionPropertyOwner
      Parameters:
      yAxisTitlePosition - new AxisTitlePosition that specifies the chart's title position
      Returns:
      reference to this object
    • setScrollBarVisible

      public HeatmapChartYAxis setScrollBarVisible(boolean visible)
      Description copied from interface: IScrollBarPropertyOwner
      Specifies whether the scrollbar should be drawn if scrolling the displayed rang of axis is possible. True by default. If set to false, the scrollbar will never be drawn but the functionality of scrolling this axis will still remain. Redraws this axis and it's parent chart if visibility is changed.
      Specified by:
      setScrollBarVisible in interface IScrollBarPropertyOwner
      Parameters:
      visible - flag setting if the scrollbar should be drawn if scrolling the displayed rang of axis is possible
      Returns:
      reference to this object
      See Also:
    • isScrollBarVisible

      public boolean isScrollBarVisible()
      Description copied from interface: IScrollBarPropertyOwner
      Checks whether the scrollbar should be drawn if scrolling the displayed rang of Y-axis is possible.
      Specified by:
      isScrollBarVisible in interface IScrollBarPropertyOwner
      Returns:
      true if the scrollbar should be drawn if scrolling the displayed rang of Y-axis is possible, false otherwise
    • isScrollBarDisplayed

      public boolean isScrollBarDisplayed()
      Description copied from interface: IScrollBarPropertyOwner
      Checks whether the scrollbar is currently displayed.
      Specified by:
      isScrollBarDisplayed in interface IScrollBarPropertyOwner
      Returns:
      true if the scrollbar is currently displayed, false otherwise
    • isCategoryDisplayed

      public boolean isCategoryDisplayed(String category)
      Checks if specified category is currently displayed.
      Parameters:
      category - category to check
      Returns:
      true if specified category is currently displayed
    • getCategoriesCount

      public int getCategoriesCount()
      Returns the count of the currently displayed categories.
      Returns:
      the count of the currently displayed categories
    • setTooltipText

      public HeatmapChartYAxis setTooltipText(Function<String,String> yAxisTooltipTextExtractor)
      Adds tooltip text to display when the mouse is hovered over a vertical axis element.
      Parameters:
      yAxisTooltipTextExtractor - new tooltip text extractor
      Returns:
      reference to this object
    • setTooltipTextFont

      public HeatmapChartYAxis setTooltipTextFont(Function<String,javafx.scene.text.Font> yAxisTooltipFontExtractor)
      Sets the new font to the tooltip text.
      Parameters:
      yAxisTooltipFontExtractor - new tooltip font extractor
      Returns:
      reference to this object
    • setTooltipTextFontSize

      public HeatmapChartYAxis setTooltipTextFontSize(Function<String,Integer> yAxisTooltipFontSizeExtractor)
      Sets the new font size to the tooltip text.
      Parameters:
      yAxisTooltipFontSizeExtractor - new tooltip font size extractor
      Returns:
      reference to this object
    • setLeftMarginRule

      public HeatmapChartYAxis setLeftMarginRule(LeftMarginRule yAxisWidthRule)
      Sets the new LeftMarginRule. The possible possible values are: FIXED, DYNAMIC_BY_SHOWED_CONTENT. DYNAMIC_BY_SHOWED_CONTENT rule automatically calculates the margin based on the length of the vertical axis element names. FIXED rule calculated margin based on leftMargin value. Redraws this chart.
      Parameters:
      yAxisWidthRule - new left margin calculation rule
      Returns:
      reference to this object
      See Also:
    • getLeftMarginRule

      public LeftMarginRule getLeftMarginRule()
      Returns the current LeftMarginRule.
      Returns:
      the current LeftMarginRule
    • addClickHandler

      public HeatmapChartYAxis addClickHandler(Consumer<String> handler)
      Adds the action to be executed every time any element on the vertical axis is clicked.
      Parameters:
      handler - new vertical axis click handler
      Returns:
      reference to this object
    • removeClickHandler

      public HeatmapChartYAxis removeClickHandler(Consumer<String> handler)
      Removes vertical axis click handler.
      Parameters:
      handler - removed vertical axis click handler
      Returns:
      reference to this object
    • clearClickHandlers

      public HeatmapChartYAxis clearClickHandlers()
      Removes all vertical axis click handlers.
      Returns:
      reference to this object
    • setTitle

      public HeatmapChartYAxis setTitle(String title)
      Description copied from interface: IAxisTitlePropertyOwner
      Sets the new title to this axis. Redraws this axis and it's parent chart if title is changed.
      Specified by:
      setTitle in interface IAxisTitlePropertyOwner<String>
      Parameters:
      title - new axis title
      Returns:
      reference to this object
      See Also:
    • setTitleVisible

      public HeatmapChartYAxis setTitleVisible(boolean visible)
      Description copied from interface: IAxisTitlePropertyOwner
      Specifies whether this axis title should be drawn. Redraws this axis and it's parent chart if visibility is changed.
      Specified by:
      setTitleVisible in interface IAxisTitlePropertyOwner<String>
      Parameters:
      visible - new axis title visibility
      Returns:
      reference to this object
      See Also:
    • setTitleFont

      public HeatmapChartYAxis setTitleFont(javafx.scene.text.Font font)
      Description copied from interface: IAxisTitlePropertyOwner
      Sets the new font to this axis title. Redraws this axis and it's parent chart if font is changed.
      Specified by:
      setTitleFont in interface IAxisTitlePropertyOwner<String>
      Parameters:
      font - new axis title font
      Returns:
      reference to this object
      See Also:
    • setTitleFontSize

      public HeatmapChartYAxis setTitleFontSize(int fontSize)
      Description copied from interface: IAxisTitlePropertyOwner
      Sets the new font size to this axis title. Redraws this axis and it's parent chart if font size is changed.
      Specified by:
      setTitleFontSize in interface IAxisTitlePropertyOwner<String>
      Parameters:
      fontSize - new axis title font size
      Returns:
      reference to this object
      See Also:
    • setTitleColor

      public HeatmapChartYAxis setTitleColor(Color color)
      Description copied from interface: IAxisTitlePropertyOwner
      Sets the new color to this axis title. Redraws this axis and it's parent chart if color is changed.
      Specified by:
      setTitleColor in interface IAxisTitlePropertyOwner<String>
      Parameters:
      color - new axis title color
      Returns:
      reference to this object
      See Also:
    • setTitleColor

      public HeatmapChartYAxis setTitleColor(javafx.scene.paint.Color color)
      Description copied from interface: IAxisTitlePropertyOwner
      Sets the new color to this axis title. Redraws this axis and it's parent chart if color is changed.
      Specified by:
      setTitleColor in interface IAxisTitlePropertyOwner<String>
      Parameters:
      color - new axis title color
      Returns:
      reference to this object
      See Also:
    • getTitleColor

      public javafx.scene.paint.Color getTitleColor()
      Description copied from interface: IAxisTitlePropertyOwner
      Returns the color of this axis title.
      Specified by:
      getTitleColor in interface IAxisTitlePropertyOwner<String>
      Returns:
      the color of this axis title
    • getTitle

      public String getTitle()
      Description copied from interface: IAxisTitlePropertyOwner
      Returns the title of this axis, or null if title has not been specified.
      Specified by:
      getTitle in interface IAxisTitlePropertyOwner<String>
      Returns:
      the title of this axis, or null if title has not been specified
    • isTitleVisible

      public boolean isTitleVisible()
      Description copied from interface: IAxisTitlePropertyOwner
      Checks whether this axis title should be drawn.
      Specified by:
      isTitleVisible in interface IAxisTitlePropertyOwner<String>
      Returns:
      true if this axis title should be drawn, false otherwise
    • getTitleFont

      public javafx.scene.text.Font getTitleFont()
      Description copied from interface: IAxisTitlePropertyOwner
      Returns the font of this axis title.
      Specified by:
      getTitleFont in interface IAxisTitlePropertyOwner<String>
      Returns:
      axis title font
    • getTitleFontSize

      public int getTitleFontSize()
      Description copied from interface: IAxisTitlePropertyOwner
      Returns the font size of this axis title.
      Specified by:
      getTitleFontSize in interface IAxisTitlePropertyOwner<String>
      Returns:
      the font size of this axis title