java.lang.Object
java.lang.Record
com.dua3.utility.fx.controls.TooltipConfig
- Record Components:
showDelay- the delay before a tooltip is shown after the pointer enters the nodeshowDuration- how long the tooltip is shownhideDelay- the delay before the tooltip is hidden when the pointer is moved outside the node
public record TooltipConfig(Duration showDelay, Duration showDuration, Duration hideDelay)
extends Record
A record holding tooltip durations.
-
Constructor Summary
ConstructorsConstructorDescriptionTooltipConfig(Duration showDelay, Duration showDuration, Duration hideDelay) Creates an instance of aTooltipConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidApply this configuration to a tooltip.final booleanIndicates whether some other object is "equal to" this one.static TooltipConfigObtain configuration from a tooltip.static TooltipConfigGet the configuration with the default values as defined by JavaFX.final inthashCode()Returns a hash code value for this object.Returns the value of thehideDelayrecord component.Returns the value of theshowDelayrecord component.Returns the value of theshowDurationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TooltipConfig
Creates an instance of aTooltipConfigrecord class.- Parameters:
showDelay- the value for theshowDelayrecord componentshowDuration- the value for theshowDurationrecord componenthideDelay- the value for thehideDelayrecord component
-
-
Method Details
-
getDefault
Get the configuration with the default values as defined by JavaFX.- Returns:
- configuration with default values
-
applyTo
Apply this configuration to a tooltip.- Parameters:
tt- the tooltip
-
from
Obtain configuration from a tooltip.- Parameters:
tt- the tooltip- Returns:
- configuration with values from the tooltip
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
showDelay
Returns the value of theshowDelayrecord component.- Returns:
- the value of the
showDelayrecord component
-
showDuration
Returns the value of theshowDurationrecord component.- Returns:
- the value of the
showDurationrecord component
-
hideDelay
Returns the value of thehideDelayrecord component.- Returns:
- the value of the
hideDelayrecord component
-