Top Description Inners Fields Constructors Methods
impl.com.calendarfx.view

public Class DayViewScrollPane

extends Pane
Class Inheritance
Imports
com.calendarfx.util.LoggingDomain, .ViewHelper, com.calendarfx.view.DayViewBase, javafx.application.Platform, javafx.beans.InvalidationListener, .WeakInvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, javafx.geometry.Insets, .Orientation, javafx.scene.control.ScrollBar, javafx.scene.input.DragEvent, .MouseEvent, .ScrollEvent, .TransferMode, javafx.scene.layout.Pane, javafx.scene.shape.Rectangle, java.time.LocalTime, java.util.Objects

A specialized scrollpane used for automatic scrolling when the user performs a drag operation close to the edges of the pane.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private LocalTime
private final DayViewBase
private final InvalidationListener
private final ReadOnlyObjectWrapper<LocalTime>
private final InvalidationListener
private final InvalidationListener
private final ScrollBar
private final InvalidationListener
private final InvalidationListener
private DayViewScrollPane.ScrollThread
private final ReadOnlyObjectWrapper<LocalTime>
private final InvalidationListener
private final InvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public
DayViewScrollPane(DayViewBase
the content node
dayView
,
ScrollBar
the scrollbar used for vertical scrolling
scrollBar
)

Constructs a new scrollpane for the given day view.

Method Summary

Modifier and TypeMethod and Description
private void
autoscroll(double yOffset)

private void
private void
protected double
computePrefWidth(double
the height that should be used if preferred width depends on it
height
)

Overrides javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height.

public final ReadOnlyObjectProperty<LocalTime>
public final DayViewBase
public final LocalTime
private double
public final ScrollBar
public final LocalTime
protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

public void
private void
scrollY(double deltaY)

public final ReadOnlyObjectProperty<LocalTime>
private void
private void
Inherited from javafx.scene.layout.Pane:
getChildren

Field Detail

cachedStartTimeback to summary
private LocalTime cachedStartTime
dayViewback to summary
private final DayViewBase dayView
dayViewHeightChangedListenerback to summary
private final InvalidationListener dayViewHeightChangedListener
endTimeback to summary
private final ReadOnlyObjectWrapper<LocalTime> endTime
layoutListenerback to summary
private final InvalidationListener layoutListener
sceneChangedListenerback to summary
private final InvalidationListener sceneChangedListener
scrollBarback to summary
private final ScrollBar scrollBar
scrollBarListenerback to summary
private final InvalidationListener scrollBarListener
scrollPaneHeightChangedListenerback to summary
private final InvalidationListener scrollPaneHeightChangedListener
scrollThreadback to summary
private DayViewScrollPane.ScrollThread scrollThread
startTimeback to summary
private final ReadOnlyObjectWrapper<LocalTime> startTime
translateYListenerback to summary
private final InvalidationListener translateYListener
visibleHoursChangedListenerback to summary
private final InvalidationListener visibleHoursChangedListener
weakDayViewHeightChangedListenerback to summary
private final WeakInvalidationListener weakDayViewHeightChangedListener
weakLayoutListenerback to summary
private final WeakInvalidationListener weakLayoutListener
weakSceneChangedListenerback to summary
private final WeakInvalidationListener weakSceneChangedListener
weakScrollBarListenerback to summary
private final WeakInvalidationListener weakScrollBarListener
weakScrollPaneHeightChangedListenerback to summary
private final WeakInvalidationListener weakScrollPaneHeightChangedListener
weakTranslateYListenerback to summary
private final WeakInvalidationListener weakTranslateYListener
weakVisibleHoursChangedListenerback to summary
private final WeakInvalidationListener weakVisibleHoursChangedListener

Constructor Detail

DayViewScrollPaneback to summary
public DayViewScrollPane(DayViewBase dayView, ScrollBar scrollBar)

Constructs a new scrollpane for the given day view.

Parameters
dayView:DayViewBase

the content node

scrollBar:ScrollBar

the scrollbar used for vertical scrolling

Method Detail

autoscrollback to summary
private void autoscroll(double yOffset)
autoscrollIfNeededback to summary
private void autoscrollIfNeeded(DragEvent evt)
autoscrollIfNeededback to summary
private void autoscrollIfNeeded(MouseEvent evt)
computePrefWidthback to summary
protected double computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Doc from javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Parameters
height:double

Doc from javafx.scene.Parent.computePrefWidth.

the height that should be used if preferred width depends on it

Returns:double

the computed preferred width for this region

Annotations
@Override
endTimePropertyback to summary
public final ReadOnlyObjectProperty<LocalTime> endTimeProperty()
getDayViewback to summary
public final DayViewBase getDayView()
getEndTimeback to summary
public final LocalTime getEndTime()
getMaxTranslateYback to summary
private double getMaxTranslateY(Insets insets)
getScrollBarback to summary
public final ScrollBar getScrollBar()
getStartTimeback to summary
public final LocalTime getStartTime()
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
scrollToTimeback to summary
public void scrollToTime(LocalTime time)
scrollYback to summary
private void scrollY(double deltaY)
startTimePropertyback to summary
public final ReadOnlyObjectProperty<LocalTime> startTimeProperty()
stopAutoScrollIfNeededback to summary
private void stopAutoScrollIfNeeded()
updateVisibleTimeRangeback to summary
private void updateVisibleTimeRange(String reason)
impl.com.calendarfx.view back to summary

pack-priv Class DayViewScrollPane.ScrollThread

extends Thread
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private double
Inherited from java.lang.Thread:
MAX_PRIORITYMIN_PRIORITYNORM_PRIORITY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.

private void
public void
setDelta(double yOffset)

public void
Inherited from java.lang.Thread:
activeCountcheckAccessclonecurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitsetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadstopthreadIdtoStringyield

Field Detail

runningback to summary
private boolean running
yOffsetback to summary
private double yOffset

Constructor Detail

ScrollThreadback to summary
public ScrollThread()

Method Detail

runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.

Annotations
@Override
scrollToYback to summary
private void scrollToY()
setDeltaback to summary
public void setDelta(double yOffset)
stopRunningback to summary
public void stopRunning()