Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.welcome.components

public Class DonationProvider

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.time.LocalDate, javafx.util.Duration, org.jabref.gui.DialogService, .Notifications, org.jabref.gui.edit.OpenBrowserAction, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.util.DelayedExecution, .URLs, org.jabref.logic.l10n.Localization, com.dlsc.gemsfx.infocenter.Notification.OnClickBehaviour, .NotificationAction, org.jspecify.annotations.NullMarked, .Nullable

Asks the user for a donation once a year - shown in the notification center.

Field Summary

Modifier and TypeField and Description
private final DialogService
private static final int
private final GuiPreferences
private @Nullable DelayedExecution

Constructor Summary

AccessConstructor and Description
public
DonationProvider(GuiPreferences preferences, DialogService dialogService)

Method Summary

Modifier and TypeMethod and Description
public int
calculateDaysUntilNextPopup(int lastShownEpochDay)

private void
public void
private void
scheduleAfterDays(int days)

Schedules the next donation notification after a specified number of days to take care of situation where the user may leave the application open for an extended period.

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

Field Detail

dialogServiceback to summary
private final DialogService dialogService
DONATION_INTERVAL_DAYSback to summary
private static final int DONATION_INTERVAL_DAYS
preferencesback to summary
private final GuiPreferences preferences
scheduledShowback to summary
private @Nullable DelayedExecution scheduledShow

Constructor Detail

DonationProviderback to summary
public DonationProvider(GuiPreferences preferences, DialogService dialogService)

Method Detail

calculateDaysUntilNextPopupback to summary
public int calculateDaysUntilNextPopup(int lastShownEpochDay)
cancelScheduledback to summary
private void cancelScheduled()
cleanUpback to summary
public void cleanUp()
scheduleAfterDaysback to summary
private void scheduleAfterDays(int days)

Schedules the next donation notification after a specified number of days to take care of situation where the user may leave the application open for an extended period.

showIfNeededback to summary
public void showIfNeeded()
showNotificationback to summary
private void showNotification()