Class HistogramVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup,C>
java.lang.Object
com.amalgamasimulation.charts.visualsets.VisualSet<T>
com.amalgamasimulation.charts.visualsets.BarLabeledVisualSet<T,C>
com.amalgamasimulation.charts.visualsets.HistogramVisualSet<T,C>
- Type Parameters:
T- visual set data elements typeC- data categories type
- All Implemented Interfaces:
IAbstractBarVisualSet<T,,C> IUpdatePolicyPropertyOwner,IAbstractChartVisualSet,IBarChartVisualSet
public class HistogramVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup,C>
extends BarLabeledVisualSet<T,C>
implements IAbstractBarVisualSet<T,C>, IBarChartVisualSet
Visual set for drawing bars.
Can be drawn on HistogramChart.
Used to draw histograms, possibly with categories. The histogram divides all statistical data into a number of buckets and estimates how frequently the data falls within each bucket.
- Author:
- Aleksey Kirillov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum defining how values are retrieved from a statistical data.classInternal class that represents visual element for histogram data element.Nested classes/interfaces inherited from class com.amalgamasimulation.charts.visualsets.BarLabeledVisualSet
BarLabeledVisualSet.BarLabeledVisualElementNested classes/interfaces inherited from class com.amalgamasimulation.charts.visualsets.VisualSet
VisualSet.ContextMenuHandler<T>, VisualSet.UpdatePolicy, VisualSet.VisualElement -
Field Summary
Fields inherited from class com.amalgamasimulation.charts.visualsets.BarLabeledVisualSet
barLabelColorExtractor, barLabelFontSizeExtractor, barLabelTextExtractor, labelColorExtractors, labelFontSizeExtractors, labelTextExtractorsFields inherited from class com.amalgamasimulation.charts.visualsets.VisualSet
argumentExtractor, contentsToBeginArguments, contentsToEndArguments, contentsToVisualElements, contextMenuHandlers, dataElementsProvider, listeners, maxArgument, maxValueCache, minArgument, minValueCache, mouseEnterHandlers, mouseExitHandlers, mousePressedHandlers, mouseTransparent, name, needsUpdate, oldContentsList, tooltipTextExtractor, updatePolicy, visibilityChangeHandlers, visualElementsList -
Constructor Summary
ConstructorsConstructorDescriptionHistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator) Constructs a HistogramVisualSet with given name and histogram data aggregator.HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, boolean cleanEmptyGroups) Constructs a HistogramVisualSet with given name and histogram data aggregator.HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, HistogramVisualSet.ExtractValuePolicy extractValuePolicy) Constructs a HistogramVisualSet with given name and histogram data aggregator.HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, HistogramVisualSet.ExtractValuePolicy extractValuePolicy, boolean cleanEmptyGroups) Constructs a HistogramVisualSet with given name and histogram data aggregator. -
Method Summary
Modifier and TypeMethodDescriptionaddContextMenuHandler(VisualSet.ContextMenuHandler<T> contextMenuHandler) Adds the action to be executed every time a context menu for given data element is called.addMouseEnterHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Adds the action to be executed every time mouse enters to any visual element borders.addMouseExitHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Adds the action to be executed every time the mouse exits the previously entered element's bounds.addMousePressedHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Adds the action to be executed every time a mouse button is pressed.addVisibilityChangeHandler(Consumer<VisibilityChangeDescriptor<? extends IAbstractChartVisualSet>> visibilityChangeHandler) Adds the action to be executed every time the visibility of this VisualSet is changed.createVisualElement(T contents) Creates a new instance ofVisualSet<T>.VisualElementcorresponding to the current VisualSet type.getBackgroundColor(C category) Returns the background color for given category.getBarLabelColor(T element) Returns the bar label color for given data element.doublegetBarLabelFontSize(T element) Returns the bar label font size for given data element.Returns theHistogramDataAggregator.HistogramDataGroupi.e.getBorderColor(C category) Returns the border color for given category.doublegetBorderWidth(C category) Returns the border width in pixels for given category.Returns the list of data categories.doubleReturns the width fraction to region allocated for each individual category-bar.getElementText(T element) Returns the label text for each data element.Returns the currentHistogramVisualSet.ExtractValuePolicyi.e.Returns the currentHistogramDataAggregatori.e.getLegendLabelText(C category) Returns the legend label text for given category.doubleReturns the maximum possible value that stored in the current data elements list.doubleReturns the maximum value for any data group within all existed data elements.doublegetMaxGroupValue(Predicate<C> categoryPredicate) Returns the maximum value for any data group within all existed data elements.doubleReturns the maximum value for any category within all existed data elements.doublegetMaxValueByAnyCategory(Predicate<C> categoryPredicate) Returns the maximum value between given filtered categories within all existed data elements.doubleReturns the minimum possible value that stored in the current data elements list.doubleReturns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.doublegetPercentOfMaxValue(Predicate<C> categoryPredicate) Returns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.doublegetSummaryValue(T element) Returns the total value for all categories within the given data element.doublegetSummaryValue(T element, Predicate<C> categoryPredicate) Returns the total value for specified categories within the specified data element.doubleReturns the value for given category within the given data element.getVisualElements(boolean recalculationRequired) Returns the list of visual elements corresponding to current data elements.setBackgroundColor(Function<C, Color> backgroundColorExtractor) Sets the background color for each category.setBarLabelColor(Function<T, Color> barLabelColorExtractor) Sets the label color for each visual element.setBarLabelFontSize(Function<T, Double> barLabelFontSizeExtractor) Sets the label font size for each visual element.setBarLabelText(Function<T, String> barLabelTextExtractor) Sets the label text for each visual element.setBorderColor(Function<C, Color> borderColorExtractor) Sets the border color for each category.setBorderWidth(Function<C, Double> borderWidthExtractor) Sets the border width in pixels for each category.setColumnWidthFraction(double columnWidthFraction) Sets the width fraction to region allocated for each individual category-bar.setElementText(Function<T, String> elementTextExtractor) Sets the label text for each data element.setLabelText(LabelSide labelSide, BiFunction<T, C, String> labelText, BiFunction<T, C, Double> labelTextSize, BiFunction<T, C, Color> labelTextColor) Sets the labels of the bars representing plot data elements.setLegendLabelText(Function<C, String> legendLabelTextExtractor) Sets the legend label text for each category.setMouseTransparent(boolean mouseTransparent) Sets the value of the property mouseTransparent.setTooltipText(Function<T, String> tooltipTextExtractor) Adds tooltip text to display when the mouse is hovered over a visual element representing given data element.setUpdatePolicy(VisualSet.UpdatePolicy updatePolicy) Sets the newVisualSet.UpdatePolicyi.e.Methods inherited from class com.amalgamasimulation.charts.visualsets.BarLabeledVisualSet
getBarLabelText, getLabelColor, getLabelFontSize, getLabelSides, getLabelTextMethods inherited from class com.amalgamasimulation.charts.visualsets.VisualSet
addVisualElement, addVisualElement, addVisualSetChangeHandler, clearDependencies, getArgument, getContents, getContextMenuHandlers, getDataElements, getInjectionIndex, getMouseEnterHandlers, getMouseExitHandlers, getMousePressedHandlers, getName, getTooltipText, getUpdatePolicy, getVisibilityChangeHandlers, getVisibleVisualElementIndex, getVisibleVisualElementsCount, isMouseTransparent, isNeedsUpdate, recalculateVisualElements, removeContextMenuHandler, removeMouseEnterHandler, removeMouseExitHandler, removeMousePressedHandler, removeVisibilityChangeHandler, removeVisualElement, removeVisualSetChangeHandler, sortVisualElements, toString, update, updateMinMaxArgumentsValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.amalgamasimulation.charts.visualsets.types.IAbstractChartVisualSet
addVisualSetChangeHandler, getContents, getName, getUpdatePolicy, getVisibilityChangeHandlers, getVisibleVisualElementsCount, isMouseTransparent, removeVisibilityChangeHandler, removeVisualSetChangeHandler
-
Constructor Details
-
HistogramVisualSet
Constructs a HistogramVisualSet with given name and histogram data aggregator. The data aggregator stores statistical data and provides a set of methods for analyzing this data.- Parameters:
name- visual set name is used to sort and name the visual sets on the charthistogramDataAggregator- statistical data aggregator- See Also:
-
HistogramVisualSet
public HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, boolean cleanEmptyGroups) Constructs a HistogramVisualSet with given name and histogram data aggregator. The data aggregator stores statistical data and provides a set of methods for analyzing this data.- Parameters:
name- visual set name is used to sort and name the visual sets on the charthistogramDataAggregator- statistical data aggregatorcleanEmptyGroups- if true, empty data groups inhistogramDataAggregatorwill be removed until the 1st non-empty data group is found or there is only 1 data group left- See Also:
-
HistogramVisualSet
public HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, HistogramVisualSet.ExtractValuePolicy extractValuePolicy) Constructs a HistogramVisualSet with given name and histogram data aggregator. The data aggregator stores statistical data and provides a set of methods for analyzing this data.- Parameters:
name- visual set name is used to sort and name the visual sets on the charthistogramDataAggregator- statistical data aggregatorextractValuePolicy-HistogramVisualSet.ExtractValuePolicyis defining how values are retrieved from a statistical data- See Also:
-
HistogramVisualSet
public HistogramVisualSet(String name, HistogramDataAggregator<C, ?> histogramDataAggregator, HistogramVisualSet.ExtractValuePolicy extractValuePolicy, boolean cleanEmptyGroups) Constructs a HistogramVisualSet with given name and histogram data aggregator. The data aggregator stores statistical data and provides a set of methods for analyzing this data.- Parameters:
name- visual set name is used to sort and name the visual sets on the charthistogramDataAggregator- statistical data aggregatorextractValuePolicy-HistogramVisualSet.ExtractValuePolicyis defining how values are retrieved from a statistical datacleanEmptyGroups- if true, empty data groups inhistogramDataAggregatorwill be removed until the 1st non-empty data group is found or there is only 1 data group left- See Also:
-
-
Method Details
-
getExtractValuePolicy
Returns the currentHistogramVisualSet.ExtractValuePolicyi.e. the enum is defining how values are retrieved from a statistical data.- Returns:
- the current
HistogramVisualSet.ExtractValuePolicyi.e. the enum is defining how values are retrieved from a statistical data
-
getHistogramDataAggregator
Returns the currentHistogramDataAggregatori.e. the class stores statistical data and provides a set of methods for analyzing this data.- Returns:
- the current
HistogramDataAggregatori.e. the class stores statistical data and provides a set of methods for analyzing this data
-
getBiggestGroup
Returns theHistogramDataAggregator.HistogramDataGroupi.e. the range descriptor with maximum statistical data elements. The calculation method for the maximum group depends on the currentHistogramVisualSet.ExtractValuePolicy.- Returns:
- the
HistogramDataAggregator.HistogramDataGroupi.e. the range descriptor with maximum statistical data elements
-
setColumnWidthFraction
Sets the width fraction to region allocated for each individual category-bar.The value must be greater than zero and not greater than 1.
The default value is 0.8.
- Parameters:
columnWidthFraction-- Returns:
- reference to this object
-
getColumnWidthFraction
public double getColumnWidthFraction()Description copied from interface:IAbstractBarVisualSetReturns the width fraction to region allocated for each individual category-bar.- Specified by:
getColumnWidthFractionin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Returns:
- the width fraction to region allocated for each individual category-bar
-
setElementText
Description copied from interface:IAbstractBarVisualSetSets the label text for each data element. This label is displayed on the ticks of the X-axis, below the corresponding bars.- Specified by:
setElementTextin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
elementTextExtractor- the text of the bar label- Returns:
- reference to this object
-
setBarLabelText
Description copied from class:BarLabeledVisualSetSets the label text for each visual element. This label is displayed above the corresponding bars.- Overrides:
setBarLabelTextin classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
barLabelTextExtractor- the text of the bar label- Returns:
- reference to this object
-
setBarLabelColor
Description copied from class:BarLabeledVisualSetSets the label color for each visual element. This label is displayed above the corresponding bars.- Overrides:
setBarLabelColorin classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
barLabelColorExtractor- the color of the bar label- Returns:
- reference to this object
-
setBarLabelFontSize
Description copied from class:BarLabeledVisualSetSets the label font size for each visual element. This label is displayed above the corresponding bars.- Overrides:
setBarLabelFontSizein classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
barLabelFontSizeExtractor- the font size of the bar label- Returns:
- reference to this object
-
getElementText
Description copied from interface:IAbstractBarVisualSetReturns the label text for each data element.- Specified by:
getElementTextin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the label text is being checked- Returns:
- the label text for each data element
-
setLegendLabelText
Description copied from interface:IAbstractBarVisualSetSets the legend label text for each category.- Specified by:
setLegendLabelTextin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
legendLabelTextExtractor- the legend label text extractor, i.e. method returning text depending on the category- Returns:
- reference to this object
-
setTooltipText
Description copied from class:VisualSetAdds tooltip text to display when the mouse is hovered over a visual element representing given data element.- Specified by:
setTooltipTextin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
tooltipTextExtractor- a function that specifies the rule for extracting a tooltip text from a data element- Returns:
- reference to this object
-
setBackgroundColor
Description copied from interface:IAbstractBarVisualSetSets the background color for each category. The color may be different for different categories and it does not depend on different data elements. Also used to display a color icon in theLegend.- Specified by:
setBackgroundColorin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
backgroundColorExtractor- the background color extractor, i.e. method returning color depending on the category- Returns:
- reference to this object
-
setBorderColor
Description copied from interface:IAbstractBarVisualSetSets the border color for each category. The color may be different for different categories and it does not depend on different data elements.- Specified by:
setBorderColorin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
borderColorExtractor- the border color extractor, i.e. method returning color depending on the category- Returns:
- reference to this object
-
setBorderWidth
Description copied from interface:IAbstractBarVisualSetSets the border width in pixels for each category. The width may be different for different categories and it does not depend on different data elements.- Specified by:
setBorderWidthin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
borderWidthExtractor- the border width extractor, i.e. method returning the width depending on the category- Returns:
- reference to this object
-
getMinArgument
public double getMinArgument()Description copied from interface:IAbstractChartVisualSetReturns the minimum possible value that stored in the current data elements list.- Specified by:
getMinArgumentin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Specified by:
getMinArgumentin interfaceIAbstractChartVisualSet- Overrides:
getMinArgumentin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Returns:
- the minimum possible value that stored in the current data elements list
-
getMaxArgument
public double getMaxArgument()Description copied from interface:IAbstractChartVisualSetReturns the maximum possible value that stored in the current data elements list.- Specified by:
getMaxArgumentin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Specified by:
getMaxArgumentin interfaceIAbstractChartVisualSet- Overrides:
getMaxArgumentin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Returns:
- the maximum possible value that stored in the current data elements list
-
getCategories
Description copied from interface:IAbstractBarVisualSetReturns the list of data categories.- Specified by:
getCategoriesin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Returns:
- the list of data categories
-
setUpdatePolicy
Description copied from interface:IAbstractChartVisualSetSets the newVisualSet.UpdatePolicyi.e. the VisualSet update control rule.- Specified by:
setUpdatePolicyin interfaceIAbstractChartVisualSet- Specified by:
setUpdatePolicyin interfaceIUpdatePolicyPropertyOwner- Overrides:
setUpdatePolicyin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
updatePolicy- newVisualSet.UpdatePolicyi.e. the VisualSet update control rule- Returns:
- reference to this object
-
getBackgroundColor
Description copied from interface:IAbstractBarVisualSetReturns the background color for given category.- Specified by:
getBackgroundColorin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
category- category for which the background color is being checked- Returns:
- the background color for given category
-
getBorderColor
Description copied from interface:IAbstractBarVisualSetReturns the border color for given category.- Specified by:
getBorderColorin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
category- category for which the border color is being checked- Returns:
- the border color for given category
-
getBorderWidth
Description copied from interface:IAbstractBarVisualSetReturns the border width in pixels for given category.- Specified by:
getBorderWidthin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
category- category for which the border width in pixels is being checked- Returns:
- the border width in pixels for given category
-
getLegendLabelText
Description copied from interface:IAbstractBarVisualSetReturns the legend label text for given category.- Specified by:
getLegendLabelTextin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
category- category for which the legend label text is being checked- Returns:
- the legend label text for given category
-
getPercentOfMaxValue
public double getPercentOfMaxValue()Description copied from interface:IAbstractBarVisualSetReturns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.- Specified by:
getPercentOfMaxValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Returns:
- the ratio of the value for the maximum group to the total sum of the all values across the entire statistics
-
getPercentOfMaxValue
Description copied from interface:IAbstractBarVisualSetReturns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.Considers only the categories filtered by the corresponding predicate.
- Specified by:
getPercentOfMaxValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
categoryPredicate- filter for categories for which the ratio is calculated- Returns:
- the ratio of the value for the maximum group to the total sum of the all values across the entire statistics
-
getMaxGroupValue
public double getMaxGroupValue()Description copied from interface:IAbstractBarVisualSetReturns the maximum value for any data group within all existed data elements. The data group in the case of a histogram is the range of the X-axis arguments, and in the case of a bar chart, each individual data element.- Specified by:
getMaxGroupValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Returns:
- the maximum value for any data group within all existed data elements
-
getMaxGroupValue
Description copied from interface:IAbstractBarVisualSetReturns the maximum value for any data group within all existed data elements.The data group in the case of a histogram is the range of the X-axis arguments, and in the case of a bar chart, each individual data element.
Considers only the categories filtered by the corresponding predicate.
- Specified by:
getMaxGroupValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
categoryPredicate- filter for categories for which the maximum value is calculated- Returns:
- the maximum value for any data group within all existed data elements
-
getMaxValueByAnyCategory
public double getMaxValueByAnyCategory()Description copied from interface:IAbstractBarVisualSetReturns the maximum value for any category within all existed data elements.- Specified by:
getMaxValueByAnyCategoryin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Returns:
- the maximum value for any category within all existed data elements
-
getMaxValueByAnyCategory
Description copied from interface:IAbstractBarVisualSetReturns the maximum value between given filtered categories within all existed data elements.- Specified by:
getMaxValueByAnyCategoryin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
categoryPredicate- filter for categories for which the maximum value is calculated- Returns:
- the maximum value between given filtered categories within all existed data elements
-
getValue
Description copied from interface:IAbstractBarVisualSetReturns the value for given category within the given data element.- Specified by:
getValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the total value is being checkedcategory- category for which the total value is being checked- Returns:
- the value for given category within the given data element
-
getSummaryValue
Description copied from interface:IAbstractBarVisualSetReturns the total value for all categories within the given data element.- Specified by:
getSummaryValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the total value is being checked- Returns:
- the total value for all categories within the given date element
-
getBarLabelColor
Description copied from class:BarLabeledVisualSetReturns the bar label color for given data element.- Overrides:
getBarLabelColorin classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the bar label color is being checked- Returns:
- the bar label color for given data element.
-
getBarLabelFontSize
Description copied from class:BarLabeledVisualSetReturns the bar label font size for given data element.- Overrides:
getBarLabelFontSizein classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the bar label font size is being checked- Returns:
- the bar label font size for given data element.
-
getSummaryValue
Description copied from interface:IAbstractBarVisualSetReturns the total value for specified categories within the specified data element.- Specified by:
getSummaryValuein interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
element- data element for which the total value is being checkedcategoryPredicate- filter for categories for which the amount is calculated- Returns:
- the total value for specified categories within the specified data element
-
setLabelText
public HistogramVisualSet<T,C> setLabelText(LabelSide labelSide, BiFunction<T, C, String> labelText, BiFunction<T, C, Double> labelTextSize, BiFunction<T, C, Color> labelTextColor) Description copied from class:BarLabeledVisualSetSets the labels of the bars representing plot data elements. The label of each bar is set independently of the labels on other sides of this bar or the labels on other bars. The label will not be displayed if the specified text is empty.- Overrides:
setLabelTextin classBarLabeledVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Parameters:
labelSide- theLabelSideof bar where the corresponding label will be drawnlabelText- the text of the labellabelTextSize- the font size of the labellabelTextColor- the color of the label- Returns:
- reference to this object
-
addContextMenuHandler
public HistogramVisualSet<T,C> addContextMenuHandler(VisualSet.ContextMenuHandler<T> contextMenuHandler) Description copied from class:VisualSetAdds the action to be executed every time a context menu for given data element is called.- Overrides:
addContextMenuHandlerin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
contextMenuHandler- context menu call action- Returns:
- reference to this object
-
addMouseEnterHandler
public HistogramVisualSet<T,C> addMouseEnterHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time mouse enters to any visual element borders.- Overrides:
addMouseEnterHandlerin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
handler- new mouse enter action- Returns:
- reference to this object
-
addMouseExitHandler
public HistogramVisualSet<T,C> addMouseExitHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time the mouse exits the previously entered element's bounds.- Overrides:
addMouseExitHandlerin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
handler- new mouse exit action- Returns:
- reference to this object
-
addMousePressedHandler
public HistogramVisualSet<T,C> addMousePressedHandler(BiConsumer<T, javafx.scene.input.MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time a mouse button is pressed.- Overrides:
addMousePressedHandlerin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
handler- new mouse button pressed action- Returns:
- reference to this object
-
addVisibilityChangeHandler
public HistogramVisualSet<T,C> addVisibilityChangeHandler(Consumer<VisibilityChangeDescriptor<? extends IAbstractChartVisualSet>> visibilityChangeHandler) Description copied from interface:IAbstractChartVisualSetAdds the action to be executed every time the visibility of this VisualSet is changed.- Specified by:
addVisibilityChangeHandlerin interfaceIAbstractChartVisualSet- Overrides:
addVisibilityChangeHandlerin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
visibilityChangeHandler- visibility change action- Returns:
- reference to this object
-
setMouseTransparent
Description copied from interface:IAbstractChartVisualSetSets the value of the property mouseTransparent. If true, this VisualSet is completely transparent to mouse events. When choosing target for mouse event, VisualSets with mouseTransparent set to true won't be taken into account.- Specified by:
setMouseTransparentin interfaceIAbstractChartVisualSet- Overrides:
setMouseTransparentin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
mouseTransparent- new value of property mouseTransparent- Returns:
- reference to this object
-
createVisualElement
Description copied from class:VisualSetCreates a new instance ofVisualSet<T>.VisualElementcorresponding to the current VisualSet type.- Specified by:
createVisualElementin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
contents- data element for which theVisualSet<T>.VisualElementis being checked- Returns:
- a new instance of
VisualSet<T>.VisualElementcorresponding to the current VisualSet type
-
getVisualElements
public List<HistogramVisualSet<T,C>.HistogramVisualElement> getVisualElements(boolean recalculationRequired) Description copied from interface:IAbstractChartVisualSetReturns the list of visual elements corresponding to current data elements. Cannot be changed by the user.- Specified by:
getVisualElementsin interfaceIAbstractBarVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup, C> - Specified by:
getVisualElementsin interfaceIAbstractChartVisualSet- Specified by:
getVisualElementsin interfaceIBarChartVisualSet- Overrides:
getVisualElementsin classVisualSet<T extends HistogramDataAggregator<C,?>.HistogramDataGroup> - Parameters:
recalculationRequired- flag of the need to recalculate the visual elements- Returns:
- the list of visual elements corresponding to current data elements
-