Package com.amalgamasimulation.charts
Class HistogramChart
java.lang.Object
com.amalgamasimulation.charts.Chart<IBarChartVisualSet,BarVisualSetContainer>
com.amalgamasimulation.charts.AbstractBarChart
com.amalgamasimulation.charts.HistogramChart
- All Implemented Interfaces:
IVerticalGuidelineOwner<IBarChartVisualSet,BarVisualSetContainer>
A chart is a GUI component based on JavaFX's XYChart class that can be used
to conveniently draw numeric and statistical data. All charts are designed to
be compatible with Eclipse RCP applications and SWT framework. A Histogram
Chart is used to show statistical data as histograms by categories.
- Author:
- Aleksey Kirillov
-
Field Summary
FieldsFields inherited from class com.amalgamasimulation.charts.AbstractBarChart
internalBarChart -
Constructor Summary
ConstructorsConstructorDescriptionHistogramChart(IChartEnvironment chartEnvironment) Constructs a Histogram Chart with a set of default parameters: no title, stackBarsLayout, etc.HistogramChart(IChartEnvironment chartEnvironment, String title) Constructs a Histogram Chart with a given title and defaultBarsLayoutstack-layout. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.paint.ColorReturns the color of the line of CDF (cumulative distribution function).intReturns the width of the line of CDF (cumulative distribution function), in pixels.protected com.amalgamasimulation.charts.internals.charts.HistogramChartInternalReturns theLegendcurrently shown on this chart.getXAxis()Returns the X-axis of this chart.getYAxis()Returns the Y-axis of this chart.booleanChecks if the labels of the CDF (cumulative distribution function) should be drawn.booleanChecks if the line of the CDF (cumulative distribution function) should be drawn.setCDFLabelsVisible(boolean cdfLabelsVisible) Specifies whether the labels of CDF (cumulative distribution function) should be drawn.setCDFLineColor(Color cdfLineColor) Sets the new color to the line of CDF (cumulative distribution function).setCDFLineColor(javafx.scene.paint.Color cdfLineColor) Sets the new color to the line of CDF (cumulative distribution function).setCDFLineVisible(boolean cdfVisible) Specifies whether the line of CDF (cumulative distribution function) should be drawn.setCDFLineWidth(int cdfLineWidth) Sets the new width to the line of CDF (cumulative distribution function), in pixels.Methods inherited from class com.amalgamasimulation.charts.AbstractBarChart
addContextMenuItem, addVerticalGuidelineChangeHandler, clearContextMenuItems, clearVerticalGuidelineChangeHandlers, getVerticalGuidelineColor, getVerticalGuidelinePosition, getVerticalGuidelineWidth, hideVerticalGuideline, isVerticalGuidelineDisplayed, isVerticalGuidelineLabelVisible, isVerticalGuidelineSnapToGridLines, isVerticalGuidelineValuesVisible, isVerticalGuidelineVisible, removeContextMenuItem, removeVerticalGuidelineChangeHandler, setVerticalGuidelineColor, setVerticalGuidelineColor, setVerticalGuidelineLabelVisible, setVerticalGuidelineSnapToGridLines, setVerticalGuidelineValuesVisible, setVerticalGuidelineVisible, setVerticalGuidelineWidth, showVerticalGuidelineDisplayedMethods inherited from class com.amalgamasimulation.charts.Chart
addKeyPressedHandler, addKeyReleasedHandler, addMouseDragExitedHandler, addMouseDraggedHandler, addMouseDragOverHandler, addMouseDragReleasedHandler, addMouseEnteredHandlers, addMouseExitedHandler, addMousePressedHandler, addMouseReleasedHandler, addMouseScrollHandler, addRedrawFinishedHandler, addTextLabel, addTextLabel, clearKeyPressedHandlers, clearKeyReleasedHandlers, clearMouseDragExitedHandlers, clearMouseDraggedHandlers, clearMouseDragOverHandlers, clearMouseDragReleasedHandlers, clearMouseEnteredHandlers, clearMouseExitedHandlers, clearMousePressedHandlers, clearMouseReleasedHandlers, clearMouseScrollHandlers, clearRedrawFinishedHandlers, copyToClipboard, dispose, getBackgroundColor, getBottomMargin, getContentBackgroundColor, getLeftMargin, getTitle, getTitleColor, getTitleFont, getTitleFontSize, getTopMargin, getVisualSetContainer, initializeChartGroup, isDisposed, isRedrawInProgress, isTitleVisible, isVisible, isVisualSetVisible, redraw, removeKeyPressedHandler, removeKeyReleasedHandler, removeMouseDragExitedHandler, removeMouseDraggedHandler, removeMouseDragOverHandler, removeMouseDragReleasedHandler, removeMouseEnteredHandler, removeMouseExitedHandler, removeMousePressedHandler, removeMouseReleasedHandler, removeMouseScrollHandler, removeRedrawFinishedHandler, removeTextLabel, resizeChart, setBackgroundColor, setBackgroundColor, setBottomMargin, setContentBackgroundColor, setContentBackgroundColor, setContextMenuVisible, setCopyToClipboardContextMenuItemVisible, setLeftMargin, setTitle, setTitleColor, setTitleColor, setTitleFont, setTitleFontSize, setTitleVisible, setTopMargin, setVisibility, setVisualSetContainer, setVisualSetVisible, updateSize
-
Field Details
-
xAxis
-
yAxis
-
barChartLegend
-
-
Constructor Details
-
HistogramChart
Constructs a Histogram Chart with a set of default parameters: no title, stackBarsLayout, etc.- Parameters:
chartEnvironment- parent subtype ofIChartEnvironment, that is a layer between the parent composite and this chart
-
HistogramChart
Constructs a Histogram Chart with a given title and defaultBarsLayoutstack-layout.- Parameters:
chartEnvironment- parent subtype ofIChartEnvironment, that is a layer between the parent composite and this charttitle- chart title i.e. label written above the chart
-
-
Method Details
-
getXAxis
Description copied from class:ChartReturns the X-axis of this chart.- Specified by:
getXAxisin classChart<IBarChartVisualSet,BarVisualSetContainer> - Returns:
- the X-axis of this chart
-
getYAxis
Description copied from class:ChartReturns the Y-axis of this chart.- Specified by:
getYAxisin classChart<IBarChartVisualSet,BarVisualSetContainer> - Returns:
- the Y-axis of this chart
-
getChartInternal
protected com.amalgamasimulation.charts.internals.charts.HistogramChartInternal getChartInternal()- Overrides:
getChartInternalin classAbstractBarChart
-
getLegend
Description copied from class:AbstractBarChartReturns theLegendcurrently shown on this chart.- Specified by:
getLegendin classAbstractBarChart- Returns:
- the
Legendcurrently shown on this chart
-
setCDFLabelsVisible
Specifies whether the labels of CDF (cumulative distribution function) should be drawn. Redraws this chart if visibility is changed.- Parameters:
cdfLabelsVisible- new CDF visibility- Returns:
- reference to this object
- See Also:
-
setCDFLineVisible
Specifies whether the line of CDF (cumulative distribution function) should be drawn. Redraws this chart if visibility is changed.- Parameters:
cdfVisible- new CDF line visibility- Returns:
- reference to this object
- See Also:
-
setCDFLineColor
Sets the new color to the line of CDF (cumulative distribution function). Redraws this chart if color is changed.- Parameters:
cdfLineColor- new CDF line color- Returns:
- reference to this object
- See Also:
-
setCDFLineColor
Sets the new color to the line of CDF (cumulative distribution function). Redraws this chart if color is changed.- Parameters:
cdfLineColor- new CDF line color- Returns:
- reference to this object
- See Also:
-
setCDFLineWidth
Sets the new width to the line of CDF (cumulative distribution function), in pixels. Redraws this chart if width is changed.- Parameters:
cdfLineWidth- new CDF line width, in pixels- Returns:
- reference to this object
- See Also:
-
isCDFLineVisible
public boolean isCDFLineVisible()Checks if the line of the CDF (cumulative distribution function) should be drawn.- Returns:
trueif CDF line should be drawn,falseotherwise
-
isCDFLabelsVisible
public boolean isCDFLabelsVisible()Checks if the labels of the CDF (cumulative distribution function) should be drawn.- Returns:
trueif CDF should be drawn,falseotherwise
-
getCDFLineColor
public javafx.scene.paint.Color getCDFLineColor()Returns the color of the line of CDF (cumulative distribution function).- Returns:
- CDF line color
-
getCDFLineWidth
public int getCDFLineWidth()Returns the width of the line of CDF (cumulative distribution function), in pixels.- Returns:
- CDF line width, in pixels
-