Verified Owner
Top Description Inners Fields Constructors Methods
org.jabref.gui.walkthrough

public final Class WalkthroughPane

extends StackPane
Class Inheritance
Annotations
@NullMarked
Imports
java.util.Optional, javafx.beans.InvalidationListener, javafx.scene.Scene, javafx.scene.layout.Pane, .StackPane, javafx.stage.PopupWindow, .Window, org.jspecify.annotations.NullMarked

The layer a walkthrough draws into: an initially empty pane covering a whole window, on top of that window's regular content. Panels, tooltips and highlight effects are added here and removed again.

A window adds its pane where it is built and keeps it for its lifetime, as a child of a parent the window already has -- never as a replacement for the scene root, see Where overlays are rendered.

Implementation Note

The pane is unmanaged. In the main window and in dialogs it sizes itself to the scene rather than to its parent, so that one rule covers a pane that fills the window and a dialog pane that is the scene root alike; javafx.scene.Parent#layout() descends into unmanaged children, so the pane still lays out its own. A popup's pane takes no size, see Extent#NONE.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
WalkthroughPane.Extent

How much of its window the pane takes up.

Field Summary

Modifier and TypeField and Description
private static final double
IN_FRONT_OF_SIBLINGS

A lower view order renders a child in front of its siblings, whatever its position in the list.

private static final Object
SCENE_PROPERTY_KEY

Keyed into the scene's property map, so of(Window) is a lookup instead of a scene-graph search and nothing outlives the scene that holds the pane.

Constructor Summary

AccessConstructor and Description
public
private

Method Summary

Modifier and TypeMethod and Description
private void
public static Optional<WalkthroughPane>
of(Window window)

Returns the pane of the given window.

Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginlayoutChildrenrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

IN_FRONT_OF_SIBLINGSback to summary
private static final double IN_FRONT_OF_SIBLINGS

A lower view order renders a child in front of its siblings, whatever its position in the list. A javafx.scene.control.DialogPane appends its header, content and button bar as they are first needed, so position in the list is not something the pane can hold on to.

SCENE_PROPERTY_KEYback to summary
private static final Object SCENE_PROPERTY_KEY

Keyed into the scene's property map, so of(Window) is a lookup instead of a scene-graph search and nothing outlives the scene that holds the pane. A window has at most one pane.

Constructor Detail

WalkthroughPaneback to summary
public WalkthroughPane()
WalkthroughPaneback to summary
private WalkthroughPane(WalkthroughPane.Extent extent)

Method Detail

fitToSceneback to summary
private void fitToScene()
ofback to summary
public static Optional<WalkthroughPane> of(Window window)

Returns the pane of the given window.

The main window and every JabRef dialog are given theirs where they are built. A popup -- a context menu a walkthrough steps into -- is not JabRef's to build, so it is given one here, the first time a walkthrough draws on it. Empty for any other window built outside JabRef.

org.jabref.gui.walkthrough back to summary

private final Enum WalkthroughPane.Extent

extends Enum<WalkthroughPane.Extent>
Class Inheritance

How much of its window the pane takes up.

Field Summary

Modifier and TypeField and Description
public static final WalkthroughPane.Extent
NONE

None of its own.

public static final WalkthroughPane.Extent
SCENE

The whole scene: the main window and dialogs are sized independently of the pane.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static WalkthroughPane.Extent
public static WalkthroughPane.Extent[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NONEback to summary
public static final WalkthroughPane.Extent NONE

None of its own. A popup window is sized from the bounds of its content, and a context menu's drop shadow offsets that content from the scene's origin, so a pane sized to the popup's scene would enlarge the very window it measures itself against -- until the bounds computation overflows the stack and the menu stops rendering. On popups the walkthrough only draws effects that position themselves, such as the ping.

SCENEback to summary
public static final WalkthroughPane.Extent SCENE

The whole scene: the main window and dialogs are sized independently of the pane.

Constructor Detail

Extentback to summary
private Extent()

Method Detail

valueOfback to summary
public static WalkthroughPane.Extent valueOf(String name)
valuesback to summary
public static WalkthroughPane.Extent[] values()