Class HeatmapChartXAxis

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

public class HeatmapChartXAxis extends AbstractAxis<Number> implements IScrollBarPropertyOwner, IAxisTitlePropertyOwner<String>
Class that represents an X-axis drawn on a HeatmapChart area. The X-axis tick labels represents the X-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
    • xAxisInternal

      protected com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> xAxisInternal
  • Constructor Details

    • HeatmapChartXAxis

      public HeatmapChartXAxis(com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal, com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> xAxisInternal)
      Constructs a HeatmapChart X-axis with given HeatmapChartInternal
      Parameters:
      chartInternal - HeatmapChartInternal which is the owner of this object
      xAxisInternal - CategoryXAxisInternal which is the internal axis logic aggregator
  • Method Details

    • getChartInternal

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

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

      public HeatmapChartXAxis 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 HeatmapChartXAxis setTooltipText(Function<String,String> tooltipTextExtractor)
      Adds tooltip text to display when the mouse is hovered over a hotizontal axis element.
      Parameters:
      tooltipTextExtractor - new tooltip text extractor
      Returns:
      reference to this object
    • setTooltipTextFont

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

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

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

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

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

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