Package limn.scene
Record Class TooltipStyle
java.lang.Object
java.lang.Record
limn.scene.TooltipStyle
- Record Components:
fill- panel backgroundborder- panel outlinetext- label colorfont- label fontradius- corner radiuspadH- horizontal padding, per sidepadV- vertical padding, per side
public record TooltipStyle(Color fill, Color border, Color text, Font font, float radius, float padH, float padV)
extends Record
Appearance of the scene's hover tooltip panel. The toolkit renders tooltips but
has no theme of its own, so the components layer installs a supplier of this
(reading its
Theme at paint time) via
Scene.installTooltipStyle(java.util.function.Function<limn.scene.ControlSize, limn.scene.TooltipStyle>). Without one, tooltips are not painted.
The box travels with the ink: a tooltip anchored to an XSMALL control gets an 11pt label in a box padded for one, because leaving the padding pinned would put an 11pt label inside a MEDIUM box, with padding at ~27% of the panel, the inverse of the whole design.
-
Constructor Summary
ConstructorsConstructorDescriptionTooltipStyle(Color fill, Color border, Color text, Font font, float radius, float padH, float padV) Creates an instance of aTooltipStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionborder()Returns the value of theborderrecord component.final booleanIndicates whether some other object is "equal to" this one.fill()Returns the value of thefillrecord component.font()Returns the value of thefontrecord component.final inthashCode()Returns a hash code value for this object.floatpadH()Returns the value of thepadHrecord component.floatpadV()Returns the value of thepadVrecord component.floatradius()Returns the value of theradiusrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TooltipStyle
public TooltipStyle(Color fill, Color border, Color text, Font font, float radius, float padH, float padV) Creates an instance of aTooltipStylerecord class.- Parameters:
fill- the value for thefillrecord componentborder- the value for theborderrecord componenttext- the value for thetextrecord componentfont- the value for thefontrecord componentradius- the value for theradiusrecord componentpadH- the value for thepadHrecord componentpadV- the value for thepadVrecord component
-
-
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 '=='. -
fill
Returns the value of thefillrecord component.- Returns:
- the value of the
fillrecord component
-
border
Returns the value of theborderrecord component.- Returns:
- the value of the
borderrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
font
Returns the value of thefontrecord component.- Returns:
- the value of the
fontrecord component
-
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
padH
public float padH()Returns the value of thepadHrecord component.- Returns:
- the value of the
padHrecord component
-
padV
public float padV()Returns the value of thepadVrecord component.- Returns:
- the value of the
padVrecord component
-