Module com.flexganttfx.view
Package com.flexganttfx.view
Class GanttChartBase<R extends Row<?,?,?>>
- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- com.flexganttfx.view.util.FlexGanttFXControl
-
- com.flexganttfx.view.GanttChartBase<R>
-
- Type Parameters:
R
- the type of the rows shown by the Gantt chart (e.g. "Aircraft")
- All Implemented Interfaces:
Styleable
,EventTarget
,Skinnable
- Direct Known Subclasses:
GanttChart
,GanttChartLite
public abstract class GanttChartBase<R extends Row<?,?,?>> extends FlexGanttFXControl
Abstract base class for all Gantt chart controls. For detailed information please refer to the documentation on those classes.- Since:
- 1.6
- See Also:
GanttChart
,GanttChartLite
-
-
Field Summary
-
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
-
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GanttChartBase()
Constructs a new Gantt Chart control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ListViewGraphics<R>
createGraphics()
Creates the graphics view used by the Gantt chart.protected Timeline
createTimeline()
Creates the timeline component used by the Gantt chart.ObjectProperty<Node>
detailProperty()
A property used to store a node that can be made visible on the right-hand side of the Gantt chart.DoubleProperty
fixedCellSizeProperty()
A property used to set a fixed cell size for the rows shown in the table on the left-hand side and the graphics area on the right-hand side.ObservableList<Calendar<?>>
getCalendars()
Convenience method to return the list of calendars registered on the graphics view.Node
getDetail()
Returns the value ofdetailProperty()
.double
getFixedCellSize()
Returns the value offixedCellSizeProperty()
.ListViewGraphics<R>
getGraphics()
Returns the graphics view shown on the right-hand side of the Gantt chart.Node
getGraphicsHeader()
Returns the value ofgraphicsHeaderProperty()
.org.controlsfx.control.MasterDetailPane
getGraphicsMasterDetailPane()
Returns theMasterDetailPane
instance that is used to display theListViewGraphics
in the master section and the detail node in the detail section.ObservableList<Layer>
getLayers()
Convenience method to return the list of layers registered on the graphics view.ObservableList<ActivityLink<?>>
getLinks()
Convenience method to return the list of links registered on the graphics view.Timeline
getMasterTimeline()
Returns the value ofmasterTimelineProperty()
.Position
getPosition()
Returns the value ofpositionProperty()
.Predicate
getRowFilter()
Returns the value ofrowFilterProperty()
.Timeline
getTimeline()
TimelineScrollBar
getTimelineScrollBar()
Returns the specialized timeline scrollbar control used for scrolling forward and back in time.String
getUserAgentStylesheet()
ObjectProperty<Node>
graphicsHeaderProperty()
A property used to store a node that will be placed above the graphics area instead of the timeline.boolean
isShowDetail()
Returns the value ofshowDetailProperty()
.ObjectProperty<Timeline>
masterTimelineProperty()
A property used to store a reference to the timeline that is being considered the "master" timeline.ObjectProperty<Position>
positionProperty()
A property used to store the position of the Gantt chart in a multi Gantt chart context, for example, inside aDualGanttChartContainer
or aMultiGanttChartContainerBase
.protected void
redrawObservable(Observable property)
ObjectProperty<Predicate<R>>
rowFilterProperty()
A predicate used to filter the rows.void
setDetail(Node node)
Sets the value ofdetailProperty()
.void
setFixedCellSize(double size)
Sets the value offixedCellSizeProperty()
.void
setGraphicsHeader(Node node)
Sets the value ofgraphicsHeaderProperty()
.void
setMasterTimeline(Timeline timeline)
Sets the value ofmasterTimelineProperty()
.void
setPosition(Position position)
Sets the value ofpositionProperty()
.void
setRowFilter(Predicate<R> predicate)
Sets the value ofrowFilterProperty()
.void
setShowDetail(boolean show)
Sets the value ofshowDetailProperty()
.BooleanProperty
showDetailProperty()
A property used to control whether the "details" node will be shown or not.-
Methods inherited from class com.flexganttfx.view.util.FlexGanttFXControl
getUserAgentStylesheet
-
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
-
-
-
Method Detail
-
getUserAgentStylesheet
public String getUserAgentStylesheet()
- Overrides:
getUserAgentStylesheet
in classRegion
-
rowFilterProperty
public final ObjectProperty<Predicate<R>> rowFilterProperty()
A predicate used to filter the rows.- Returns:
- the filter predicate
-
setRowFilter
public final void setRowFilter(Predicate<R> predicate)
Sets the value ofrowFilterProperty()
.- Parameters:
predicate
- the filter predicate
-
getRowFilter
public final Predicate getRowFilter()
Returns the value ofrowFilterProperty()
.- Returns:
- the filter predicate
-
createGraphics
protected ListViewGraphics<R> createGraphics()
Creates the graphics view used by the Gantt chart. Applications can override this method to return a customized graphics view.- Returns:
- a graphics view instance
- Since:
- 1.6
-
graphicsHeaderProperty
public final ObjectProperty<Node> graphicsHeaderProperty()
A property used to store a node that will be placed above the graphics area instead of the timeline. This can be very useful when, for example, using aDualGanttChartContainer
where the users do not want to see two timelines at the same time. The graphics header node could simply be a gray empty area or it could be used as a toolbar control for the secondary Gantt chart.- Returns:
- the graphics header node property
- Since:
- 1.6
-
getGraphicsHeader
public final Node getGraphicsHeader()
Returns the value ofgraphicsHeaderProperty()
.- Returns:
- the graphics header node
- Since:
- 1.6
-
setGraphicsHeader
public final void setGraphicsHeader(Node node)
Sets the value ofgraphicsHeaderProperty()
.- Parameters:
node
- the node used as a header above the graphics area- Since:
- 1.6
-
redrawObservable
protected void redrawObservable(Observable property)
-
positionProperty
public final ObjectProperty<Position> positionProperty()
A property used to store the position of the Gantt chart in a multi Gantt chart context, for example, inside aDualGanttChartContainer
or aMultiGanttChartContainerBase
. One of the charts will be the first, some will be in the middle, and one will be the last. The first chart is the owner of the master timeline.- Returns:
- the Gantt chart position
- Since:
- 1.6
- See Also:
getMasterTimeline()
-
getPosition
public final Position getPosition()
Returns the value ofpositionProperty()
.- Returns:
- the position of the chart
- Since:
- 1.6
-
setPosition
public final void setPosition(Position position)
Sets the value ofpositionProperty()
.- Parameters:
position
- the chart position (first, last, middle, only)
-
masterTimelineProperty
public final ObjectProperty<Timeline> masterTimelineProperty()
A property used to store a reference to the timeline that is being considered the "master" timeline. This property is needed when several charts are used in combination with each other (seeDualGanttChartContainer
orMultiGanttChartContainerBase
). The master timeline is the one provided by the Gantt chart located at the top of the container (the "first" chart).- Returns:
- the master timeline
- Since:
- 1.6
- See Also:
Position
,setPosition(Position)
-
getMasterTimeline
public final Timeline getMasterTimeline()
Returns the value ofmasterTimelineProperty()
.- Returns:
- the master timeline
- Since:
- 1.6
-
setMasterTimeline
public final void setMasterTimeline(Timeline timeline)
Sets the value ofmasterTimelineProperty()
.- Parameters:
timeline
- the new master timeline- Since:
- 1.6
-
getTimeline
public final Timeline getTimeline()
- Returns:
- the timeline control
- Since:
- 1.6
- See Also:
createTimeline()
-
createTimeline
protected Timeline createTimeline()
Creates the timeline component used by the Gantt chart. Applications can override this method to return a customized timeline.- Returns:
- the timeline instance
- Since:
- 1.6
-
getGraphics
public final ListViewGraphics<R> getGraphics()
Returns the graphics view shown on the right-hand side of the Gantt chart. The view is set as the master node on the primaryMasterDetailPane
instance.- Returns:
- the graphics view
- Since:
- 1.6
- See Also:
createGraphics()
-
getTimelineScrollBar
public final TimelineScrollBar getTimelineScrollBar()
Returns the specialized timeline scrollbar control used for scrolling forward and back in time. The scrollbar becomes visible when the user moves the mouse cursor close to the bottom edge of the graphics area.- Returns:
- the timeline scrollbar
- Since:
- 1.6
- See Also:
HiddenSidesPane
-
getGraphicsMasterDetailPane
public org.controlsfx.control.MasterDetailPane getGraphicsMasterDetailPane()
Returns theMasterDetailPane
instance that is used to display theListViewGraphics
in the master section and the detail node in the detail section.- Returns:
- the master detail pane
- Since:
- 1.6
-
detailProperty
public final ObjectProperty<Node> detailProperty()
A property used to store a node that can be made visible on the right-hand side of the Gantt chart. The node can be used to show any kind of controls that the application might require.- Returns:
- the detail node
- Since:
- 1.6
- See Also:
showDetailProperty()
,MasterDetailPane.detailNodeProperty()
-
setDetail
public final void setDetail(Node node)
Sets the value ofdetailProperty()
.- Parameters:
node
- the new detail node- Since:
- 1.6
-
getDetail
public final Node getDetail()
Returns the value ofdetailProperty()
.- Returns:
- the detail node
- Since:
- 1.6
-
fixedCellSizeProperty
public final DoubleProperty fixedCellSizeProperty()
A property used to set a fixed cell size for the rows shown in the table on the left-hand side and the graphics area on the right-hand side.- Returns:
- the fixed cell size
- Since:
- 1.6
- See Also:
ListView.setFixedCellSize(double)
,TreeTableView.setFixedCellSize(double)
-
getFixedCellSize
public final double getFixedCellSize()
Returns the value offixedCellSizeProperty()
.- Returns:
- the fixed cell size
- Since:
- 1.6
-
setFixedCellSize
public final void setFixedCellSize(double size)
Sets the value offixedCellSizeProperty()
.- Parameters:
size
- the fixed cell size- Since:
- 1.6
-
showDetailProperty
public final BooleanProperty showDetailProperty()
A property used to control whether the "details" node will be shown or not. This node gets shown on the right-hand side of the Gantt chart and can contain arbitrary content. By default it is used to display a property sheet with the current settings / configuration of the Gantt chart. The detail node is shown by the secondary master detail pane (seegetGraphicsMasterDetailPane()
).- Returns:
- the show details property
- Since:
- 1.6
- See Also:
MasterDetailPane.detailNodeProperty()
,MasterDetailPane.setDetailNode(Node)
,getGraphicsMasterDetailPane()
-
isShowDetail
public final boolean isShowDetail()
Returns the value ofshowDetailProperty()
.- Returns:
- true if the detail node gets shown
- Since:
- 1.6
-
setShowDetail
public final void setShowDetail(boolean show)
Sets the value ofshowDetailProperty()
.- Parameters:
show
- if true the detail node will be shown on the right-hand side of the Gantt chart- Since:
- 1.6
-
getLayers
public final ObservableList<Layer> getLayers()
Convenience method to return the list of layers registered on the graphics view.- Returns:
- the layers registered on the graphics area
- Since:
- 1.6
- See Also:
GraphicsBase.getLayers()
-
getLinks
public final ObservableList<ActivityLink<?>> getLinks()
Convenience method to return the list of links registered on the graphics view.- Returns:
- the links registered on the graphics area
- Since:
- 1.6
- See Also:
GraphicsBase.getLinks()
-
getCalendars
public final ObservableList<Calendar<?>> getCalendars()
Convenience method to return the list of calendars registered on the graphics view.- Returns:
- the calendars registered on the graphics area
- Since:
- 1.6
- See Also:
GraphicsBase.getCalendars()
-
-