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 Summary
FieldsModifier and TypeFieldDescriptionprotected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternalprotected com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> -
Constructor Summary
ConstructorsConstructorDescriptionHeatmapChartXAxis(com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal, com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> xAxisInternal) Constructs aHeatmapChartX-axis with givenHeatmapChartInternal -
Method Summary
Modifier and TypeMethodDescriptionaddClickHandler(Consumer<String> handler) Adds the action to be executed every time any element on the horizontal axis is clicked.Removes all horizontal axis click handlers.protected com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> intReturns the count of the currently displayed categories.protected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternalgetTitle()Returns the title of this axis, ornullif title has not been specified.javafx.scene.paint.ColorReturns the color of this axis title.javafx.scene.text.FontReturns the font of this axis title.intReturns the font size of this axis title.booleanisCategoryDisplayed(String category) Checks if specified category is currently displayed.booleanChecks whether the scrollbar is currently displayed.booleanChecks whether the scrollbar should be drawn if scrolling the displayed rang of Y-axis is possible.booleanChecks whether this axis title should be drawn.navigateToCategory(String category) Navigates Y-axis displayed range to specified category.removeClickHandler(Consumer<String> handler) Removes horizontal axis click handler.setScrollBarVisible(boolean visible) Specifies whether the scrollbar should be drawn if scrolling the displayed rang of axis is possible.Sets the new title to this axis.setTitleColor(Color color) Sets the new color to this axis title.setTitleColor(javafx.scene.paint.Color color) Sets the new color to this axis title.setTitleFont(javafx.scene.text.Font font) Sets the new font to this axis title.setTitleFontSize(int fontSize) Sets the new font size to this axis title.setTitleVisible(boolean visible) Specifies whether this axis title should be drawn.setTooltipText(Function<String, String> tooltipTextExtractor) Adds tooltip text to display when the mouse is hovered over a hotizontal axis element.setTooltipTextFont(Function<String, javafx.scene.text.Font> tooltipFontExtractor) Sets the new font to the tooltip text.setTooltipTextFontSize(Function<String, Integer> tooltipFontSizeExtractor) Sets the new font size to the tooltip text.Methods inherited from class com.amalgamasimulation.charts.axes.AbstractAxis
getLabelsColor, getLabelsFont, getLabelsFontSize, setGridLinesColor, setGridLinesColor, setGridLinesVisible, setGridLinesWidth, setLabelsColor, setLabelsColor, setLabelsFont, setLabelsFontSize
-
Field Details
-
chartInternal
protected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal -
xAxisInternal
-
-
Constructor Details
-
HeatmapChartXAxis
public HeatmapChartXAxis(com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal chartInternal, com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> xAxisInternal) Constructs aHeatmapChartX-axis with givenHeatmapChartInternal- Parameters:
chartInternal-HeatmapChartInternalwhich is the owner of this objectxAxisInternal-CategoryXAxisInternalwhich is the internal axis logic aggregator
-
-
Method Details
-
getChartInternal
protected com.amalgamasimulation.charts.internals.charts.HeatmapChartInternal getChartInternal()- Specified by:
getChartInternalin classAbstractAxis<Number>
-
getAxisInternal
protected com.amalgamasimulation.charts.internals.axes.CategoryXAxisInternal<String> getAxisInternal()- Specified by:
getAxisInternalin classAbstractAxis<Number>
-
setScrollBarVisible
Description copied from interface:IScrollBarPropertyOwnerSpecifies 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:
setScrollBarVisiblein interfaceIScrollBarPropertyOwner- 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:IScrollBarPropertyOwnerChecks whether the scrollbar should be drawn if scrolling the displayed rang of Y-axis is possible.- Specified by:
isScrollBarVisiblein interfaceIScrollBarPropertyOwner- Returns:
trueif the scrollbar should be drawn if scrolling the displayed rang of Y-axis is possible,falseotherwise
-
isScrollBarDisplayed
public boolean isScrollBarDisplayed()Description copied from interface:IScrollBarPropertyOwnerChecks whether the scrollbar is currently displayed.- Specified by:
isScrollBarDisplayedin interfaceIScrollBarPropertyOwner- Returns:
trueif the scrollbar is currently displayed,falseotherwise
-
isCategoryDisplayed
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
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
Sets the new font size to the tooltip text.- Parameters:
tooltipFontSizeExtractor- new tooltip font size extractor- Returns:
- reference to this object
-
addClickHandler
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
Removes horizontal axis click handler.- Parameters:
handler- removed horizontal axis click handler- Returns:
- reference to this object
-
clearClickHandlers
Removes all horizontal axis click handlers.- Returns:
- reference to this object
-
setTitle
Description copied from interface:IAxisTitlePropertyOwnerSets the new title to this axis. Redraws this axis and it's parent chart if title is changed.- Specified by:
setTitlein interfaceIAxisTitlePropertyOwner<String>- Parameters:
title- new axis title- Returns:
- reference to this object
- See Also:
-
setTitleVisible
Description copied from interface:IAxisTitlePropertyOwnerSpecifies whether this axis title should be drawn. Redraws this axis and it's parent chart if visibility is changed.- Specified by:
setTitleVisiblein interfaceIAxisTitlePropertyOwner<String>- Parameters:
visible- new axis title visibility- Returns:
- reference to this object
- See Also:
-
setTitleFont
Description copied from interface:IAxisTitlePropertyOwnerSets the new font to this axis title. Redraws this axis and it's parent chart if font is changed.- Specified by:
setTitleFontin interfaceIAxisTitlePropertyOwner<String>- Parameters:
font- new axis title font- Returns:
- reference to this object
- See Also:
-
setTitleFontSize
Description copied from interface:IAxisTitlePropertyOwnerSets the new font size to this axis title. Redraws this axis and it's parent chart if font size is changed.- Specified by:
setTitleFontSizein interfaceIAxisTitlePropertyOwner<String>- Parameters:
fontSize- new axis title font size- Returns:
- reference to this object
- See Also:
-
setTitleColor
Description copied from interface:IAxisTitlePropertyOwnerSets the new color to this axis title. Redraws this axis and it's parent chart if color is changed.- Specified by:
setTitleColorin interfaceIAxisTitlePropertyOwner<String>- Parameters:
color- new axis title color- Returns:
- reference to this object
- See Also:
-
setTitleColor
Description copied from interface:IAxisTitlePropertyOwnerSets the new color to this axis title. Redraws this axis and it's parent chart if color is changed.- Specified by:
setTitleColorin interfaceIAxisTitlePropertyOwner<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:IAxisTitlePropertyOwnerReturns the color of this axis title.- Specified by:
getTitleColorin interfaceIAxisTitlePropertyOwner<String>- Returns:
- the color of this axis title
-
getTitle
Description copied from interface:IAxisTitlePropertyOwnerReturns the title of this axis, ornullif title has not been specified.- Specified by:
getTitlein interfaceIAxisTitlePropertyOwner<String>- Returns:
- the title of this axis, or
nullif title has not been specified
-
isTitleVisible
public boolean isTitleVisible()Description copied from interface:IAxisTitlePropertyOwnerChecks whether this axis title should be drawn.- Specified by:
isTitleVisiblein interfaceIAxisTitlePropertyOwner<String>- Returns:
trueif this axis title should be drawn,falseotherwise
-
getTitleFont
public javafx.scene.text.Font getTitleFont()Description copied from interface:IAxisTitlePropertyOwnerReturns the font of this axis title.- Specified by:
getTitleFontin interfaceIAxisTitlePropertyOwner<String>- Returns:
- axis title font
-
getTitleFontSize
public int getTitleFontSize()Description copied from interface:IAxisTitlePropertyOwnerReturns the font size of this axis title.- Specified by:
getTitleFontSizein interfaceIAxisTitlePropertyOwner<String>- Returns:
- the font size of this axis title
-