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

public Class WalkthroughOverlay

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map, .Optional, javafx.scene.Node, javafx.stage.Stage, .Window, org.jabref.gui.DialogService, org.jabref.gui.walkthrough.declarative.WindowResolver, org.jabref.gui.walkthrough.declarative.sideeffect.SideEffectExecutor, .WalkthroughSideEffect, org.jabref.gui.walkthrough.declarative.step.PanelStep, .SideEffect, .TooltipStep, .VisibleComponent, .WalkthroughStep, org.jabref.gui.walkthrough.utils.WalkthroughResolver, .WalkthroughResolver.WalkthroughResult, .WalkthroughReverter, .WalkthroughScroller, org.jabref.logic.l10n.Localization, com.airhacks.afterburner.injection.Injector, org.jspecify.annotations.NonNull, .Nullable, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final WalkthroughHighlighter
private static final Logger
private final Map<Window, WindowOverlay>
private Node
private Window
private @Nullable WalkthroughResolver
private final WalkthroughReverter
private @Nullable WalkthroughScroller
private final SideEffectExecutor
private final Stage
private final Walkthrough

Constructor Summary

AccessConstructor and Description
public
WalkthroughOverlay(Stage stage, Walkthrough walkthrough)

Method Summary

Modifier and TypeMethod and Description
private void
public void
private void
public void
private void
private void
private void
hide()

private void
prepareForNavigation()

Called before the Navigation to next step occur.

public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

highlighterback to summary
private final WalkthroughHighlighter highlighter
LOGGERback to summary
private static final Logger LOGGER
overlaysback to summary
private final Map<Window, WindowOverlay> overlays
resolvedNodeback to summary
private Node resolvedNode
resolvedWindowback to summary
private Window resolvedWindow
resolverback to summary
private @Nullable WalkthroughResolver resolver
reverterback to summary
private final WalkthroughReverter reverter
scrollerback to summary
private @Nullable WalkthroughScroller scroller
sideEffectExecutorback to summary
private final SideEffectExecutor sideEffectExecutor
stageback to summary
private final Stage stage
walkthroughback to summary
private final Walkthrough walkthrough

Constructor Detail

WalkthroughOverlayback to summary
public WalkthroughOverlay(Stage stage, Walkthrough walkthrough)

Method Detail

cleanUpback to summary
private void cleanUp()
detachAllback to summary
public void detachAll()
detachOverlaysback to summary
private void detachOverlays()
detachWithoutRevertingback to summary
public void detachWithoutReverting()
displayWalkthroughStepback to summary
private void displayWalkthroughStep(WalkthroughResolver.WalkthroughResult result)
handleResolutionResultback to summary
private void handleResolutionResult(WalkthroughResolver.WalkthroughResult result)
hideback to summary
private void hide()
prepareForNavigationback to summary
private void prepareForNavigation()

Called before the Navigation to next step occur.

  1. Note sometimes node disappear when you click on it (even it's window), consider a menu button on a context menu. This lead to moving to next step results in revert to previous step.
  2. Hide is necessary because WindowOverlay have a hack---automatically recover PopOver throughout the course when it's supposed to be displayed. That seems harmless, but since we used org.jabref.gui.walkthrough.utils.WalkthroughUtils#debounced(Runnable, long), the following "race condition" can occur:
    • prepareForNavigation() ran
    • node hid (original event dispatcher ran)
    • popover hid
    • popover restoration scheduled in next 50ms
    • timeout/delayed execution of walkthrough logic started and finished in 50ms, set popover to hide
    • new popover show, ALONG WITH the 50ms delayed one -> two popover at once.

So the current hack is we will hide WindowOverlay so that they won't get hacked restored.

revertToPreviousStepback to summary
public void revertToPreviousStep()
showback to summary
public void show(@NonNull WalkthroughStep step)
showQuitConfirmationAndQuitback to summary
public void showQuitConfirmationAndQuit()