Package com.amalgamasimulation.charts
Class AbstractGanttChart
java.lang.Object
com.amalgamasimulation.charts.Chart<IGanttChartVisualSet,GanttVisualSetContainer>
com.amalgamasimulation.charts.AbstractGanttChart
- All Implemented Interfaces:
IVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer>
- Direct Known Subclasses:
NumericGanttChart,TimeGanttChart
public abstract class AbstractGanttChart
extends Chart<IGanttChartVisualSet,GanttVisualSetContainer>
implements IVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer>
Abstract chart that shows history of some state changes or schedules in the
form of Gantt diagrams.
- Author:
- Aleksey Kirillov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.amalgamasimulation.charts.internals.charts.GanttChartInternal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddContextMenuItem(GanttChartContextMenuItem contextMenuItem) Adds the new context menu item to the end of the items list.Adds the action to be executed every time the contents area is clicked.voidAdds the action to be executed every time the vertical guideline visibility or position is changed.Removes all context menu items added by the 'addContextMenuItem' calls.Removes all the contents area click actions.voidClear all the vertical guideline visibility or position changed actions.protected final com.amalgamasimulation.charts.internals.charts.GanttChartInternaljavafx.scene.paint.ColorReturns the current color of the vertical guideline.Returns the formatter of the vertical guideline label.doubleReturns the current X-axis position of vertical guideline.doubleReturns the current width of the vertical guideline.Hides the currently displayed vertical guideline.booleanChecks whether vertical guideline is displayed.booleanChecks whether the vertical guideline label is drawn.booleanChecks whether vertical guideline is snapped to grid lines.booleanChecks whether the legend values are drawn.booleanChecks whether vertical guideline is drawn.removeContextMenuItem(GanttChartContextMenuItem contextMenuHandler) Removes the context menu item.Removes the contents area click action.voidRemoves the vertical guideline visibility or position changed action.setShowGanttChartRowMenuItemVisible(boolean visible) Adds a context menu element that controls the search and navigation for elements of the Y-axis.setVerticalGuidelineColor(Color color) Sets the new color to the vertical guideline.setVerticalGuidelineColor(javafx.scene.paint.Color color) Sets the new color to the vertical guideline.Sets the formatter of the vertical guideline label, i.e.setVerticalGuidelineLabelVisible(boolean visible) Specifies whether the vertical guideline label should be drawn.setVerticalGuidelineSnapToGridLines(boolean snapToGridLines) Specifies whether the vertical guideline should be snapped to grid lines.setVerticalGuidelineValuesVisible(boolean visible) Specifies whether the legend values of the applicable visual sets should be drawn when a vertical guideline is shown.setVerticalGuidelineVisible(boolean visible) Specifies whether the vertical guideline functionality should be enabled for the end users of this chart.setVerticalGuidelineWidth(double width) Sets the new width to the vertical guideline, in pixels.showVerticalGuidelineDisplayed(double position) Shows a vertical guideline at the specified X-axis position.Methods 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, getXAxis, getYAxis, 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
-
internalGanttChart
protected com.amalgamasimulation.charts.internals.charts.GanttChartInternal internalGanttChart
-
-
Constructor Details
-
AbstractGanttChart
public AbstractGanttChart()
-
-
Method Details
-
getChartInternal
protected final com.amalgamasimulation.charts.internals.charts.GanttChartInternal getChartInternal()- Specified by:
getChartInternalin classChart<IGanttChartVisualSet,GanttVisualSetContainer>
-
setShowGanttChartRowMenuItemVisible
Adds a context menu element that controls the search and navigation for elements of the Y-axis.- Parameters:
visible- new visibility of the menu element 'search and navigation'- Returns:
- reference to this object
-
addContextMenuItem
Adds the new context menu item to the end of the items list.- Parameters:
contextMenuItem- new context menu item- Returns:
- reference to this object
-
removeContextMenuItem
Removes the context menu item.- Parameters:
contextMenuHandler- removed context menu item- Returns:
- reference to this object
-
clearContextMenuItems
Removes all context menu items added by the 'addContextMenuItem' calls. Does not affect pre-installed items such as 'copy to clipboard'.- Returns:
- reference to this object
-
addMouseClickHandler
Adds the action to be executed every time the contents area is clicked.- Parameters:
handler- new contents area click action- Returns:
- reference to this object
-
removeMouseClickHandler
Removes the contents area click action.- Parameters:
handler- removed contents area click action- Returns:
- reference to this object
-
clearMouseClickHandlers
Removes all the contents area click actions.- Returns:
- reference to this object
-
setVerticalGuidelineLabelFormat
Sets the formatter of the vertical guideline label, i.e. the function that takes aDoublevalue and produces aStringthat should be drawn to represent this value. Redraws this chart- Parameters:
format- new formatter of the vertical guideline label- Returns:
- reference to this object
- See Also:
-
getVerticalGuidelineLabelFormat
Returns the formatter of the vertical guideline label.- Returns:
- formatter of the vertical guideline label
-
setVerticalGuidelineVisible
Description copied from interface:IVerticalGuidelineOwnerSpecifies whether the vertical guideline functionality should be enabled for the end users of this chart. This functionality allows the users to show and hide the vertical guideline by clicking on the chart contents area. Redraws this chart if visibility is changed.Vertical guideline functionality is enabled by default.
- Specified by:
setVerticalGuidelineVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
visible-trueif vertical guideline functionality should be enabled,falseotherwise- Returns:
- reference to this object
-
setVerticalGuidelineLabelVisible
Description copied from interface:IVerticalGuidelineOwnerSpecifies whether the vertical guideline label should be drawn. Istrueby default. Redraws this chart if visibility is changed.- Specified by:
setVerticalGuidelineLabelVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
visible- new vertical guideline label visibility- Returns:
- reference to this object
-
setVerticalGuidelineValuesVisible
Description copied from interface:IVerticalGuidelineOwnerSpecifies whether the legend values of the applicable visual sets should be drawn when a vertical guideline is shown. The displayed values are the result of the intersection of the corresponding data elements with a vertical guideline. Istrueby default. Redraws this chart if visibility is changed.- Specified by:
setVerticalGuidelineValuesVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
visible-trueif the legend values should be drawn,falseotherwise- Returns:
- reference to this object
-
showVerticalGuidelineDisplayed
Description copied from interface:IVerticalGuidelineOwnerShows a vertical guideline at the specified X-axis position. Redraws this chart.- Specified by:
showVerticalGuidelineDisplayedin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
position- specified X-axis position of the vertical guideline- Returns:
- reference to this object
-
setVerticalGuidelineColor
Description copied from interface:IVerticalGuidelineOwnerSets the new color to the vertical guideline. Redraws this chart if color is changed.- Specified by:
setVerticalGuidelineColorin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
color- new vertical guideline color- Returns:
- reference to this object
-
setVerticalGuidelineColor
Description copied from interface:IVerticalGuidelineOwnerSets the new color to the vertical guideline. Redraws this chart if color is changed.- Specified by:
setVerticalGuidelineColorin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
color- new vertical guideline color- Returns:
- reference to this object
-
setVerticalGuidelineWidth
Description copied from interface:IVerticalGuidelineOwnerSets the new width to the vertical guideline, in pixels. Redraws this chart if width is changed.- Specified by:
setVerticalGuidelineWidthin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
width- new vertical guideline width, in pixels- Returns:
- reference to this object
-
isVerticalGuidelineVisible
public boolean isVerticalGuidelineVisible()Description copied from interface:IVerticalGuidelineOwnerChecks whether vertical guideline is drawn.- Specified by:
isVerticalGuidelineVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
trueif vertical guideline is drawn,falseotherwise
-
isVerticalGuidelineLabelVisible
public boolean isVerticalGuidelineLabelVisible()Description copied from interface:IVerticalGuidelineOwnerChecks whether the vertical guideline label is drawn.- Specified by:
isVerticalGuidelineLabelVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
trueif the vertical guideline label is drawn,falseotherwise
-
isVerticalGuidelineValuesVisible
public boolean isVerticalGuidelineValuesVisible()Description copied from interface:IVerticalGuidelineOwnerChecks whether the legend values are drawn.- Specified by:
isVerticalGuidelineValuesVisiblein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
trueif the legend values are drawn,falseotherwise
-
getVerticalGuidelineColor
public javafx.scene.paint.Color getVerticalGuidelineColor()Description copied from interface:IVerticalGuidelineOwnerReturns the current color of the vertical guideline.- Specified by:
getVerticalGuidelineColorin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- the current color of the vertical guideline
-
setVerticalGuidelineSnapToGridLines
Description copied from interface:IVerticalGuidelineOwnerSpecifies whether the vertical guideline should be snapped to grid lines.- Specified by:
setVerticalGuidelineSnapToGridLinesin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
snapToGridLines- new value of property vertical guideline snapped to grid lines- Returns:
- reference to this object
-
isVerticalGuidelineSnapToGridLines
public boolean isVerticalGuidelineSnapToGridLines()Description copied from interface:IVerticalGuidelineOwnerChecks whether vertical guideline is snapped to grid lines.- Specified by:
isVerticalGuidelineSnapToGridLinesin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- true if vertical guideline is snapped to grid lines
-
getVerticalGuidelineWidth
public double getVerticalGuidelineWidth()Description copied from interface:IVerticalGuidelineOwnerReturns the current width of the vertical guideline.- Specified by:
getVerticalGuidelineWidthin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- the current width of the vertical guideline
-
hideVerticalGuideline
Description copied from interface:IVerticalGuidelineOwnerHides the currently displayed vertical guideline. Redraws this chart. Does nothing if the vertical guideline is not currently displayed.- Specified by:
hideVerticalGuidelinein interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- reference to this object
-
isVerticalGuidelineDisplayed
public boolean isVerticalGuidelineDisplayed()Description copied from interface:IVerticalGuidelineOwnerChecks whether vertical guideline is displayed.- Specified by:
isVerticalGuidelineDisplayedin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- true if vertical guideline is displayed
-
getVerticalGuidelinePosition
public double getVerticalGuidelinePosition()Description copied from interface:IVerticalGuidelineOwnerReturns the current X-axis position of vertical guideline.- Specified by:
getVerticalGuidelinePositionin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Returns:
- the current X-axis position of vertical guideline
-
addVerticalGuidelineChangeHandler
Description copied from interface:IVerticalGuidelineOwnerAdds the action to be executed every time the vertical guideline visibility or position is changed.- Specified by:
addVerticalGuidelineChangeHandlerin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
handler- new action to be executed every time the vertical guideline visibility or position is changed
-
removeVerticalGuidelineChangeHandler
Description copied from interface:IVerticalGuidelineOwnerRemoves the vertical guideline visibility or position changed action.- Specified by:
removeVerticalGuidelineChangeHandlerin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer> - Parameters:
handler- removed vertical guideline visibility or position changed action
-
clearVerticalGuidelineChangeHandlers
public void clearVerticalGuidelineChangeHandlers()Description copied from interface:IVerticalGuidelineOwnerClear all the vertical guideline visibility or position changed actions.- Specified by:
clearVerticalGuidelineChangeHandlersin interfaceIVerticalGuidelineOwner<IGanttChartVisualSet,GanttVisualSetContainer>
-