Package sc.fiji.snt.gui
Record Class GuiUtils.Notices.PendingNotice
java.lang.Object
java.lang.Record
sc.fiji.snt.gui.GuiUtils.Notices.PendingNotice
- Record Components:
html- the notification's HTML-formatted messageurl- an optional URL to be opened if the message is clicked, or nullaction- an optional in-app action to be run if the message is clicked, or null. Unlikeurl(a link to somewhere outside the application)logLevel- the notice's severity as defined byLogLevel, used to pick an accent icon for it.
- Enclosing class:
GuiUtils.Notices
public static record GuiUtils.Notices.PendingNotice(String html, String url, Runnable action, int logLevel)
extends Record
A notification message queued for a persistent notification-center UI element. Unlike a transient popup
(see
GuiUtils.showNotification(javax.swing.JLabel, boolean, int), an entry here is only removed by an explicit
GuiUtils.Notices.dismissPendingNotice(PendingNotice) (or GuiUtils.Notices.clearPendingNotices()), so it survives indefinitely
until the user actually acts on it-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPendingNotice(String html, String url, Runnable action) PendingNotice(String html, String url, Runnable action, int logLevel) Creates an instance of aPendingNoticerecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.html()Returns the value of thehtmlrecord component.intlogLevel()Returns the value of thelogLevelrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Field Details
-
INFO
public static final int INFO- See Also:
-
WARN
public static final int WARN- See Also:
-
ERROR
public static final int ERROR- See Also:
-
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
html
Returns the value of thehtmlrecord component.- Returns:
- the value of the
htmlrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
logLevel
public int logLevel()Returns the value of thelogLevelrecord component.- Returns:
- the value of the
logLevelrecord component
-