Package su.onno.ui
Record Class RefOptionDecoration
java.lang.Object
java.lang.Record
su.onno.ui.RefOptionDecoration
- Record Components:
badge- short status label shown beside the optiontone- semantic badge colour; ignored whencoloris setcolor- optional explicit CSS colour (normally a hex value)disabled- whether the option can be selectedreason- optional explanation shown below a disabled option- whether the option is filtered out of this contextual result page
public record RefOptionDecoration(String badge, RefOptionTone tone, String color, boolean disabled, String reason, boolean hidden)
extends Record
Context-dependent presentation and selection state for one reference-picker option.
-
Constructor Summary
ConstructorsConstructorDescriptionRefOptionDecoration(String badge, RefOptionTone tone, String color, boolean disabled, String reason, boolean hidden) Creates an instance of aRefOptionDecorationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbadge()Returns the value of thebadgerecord component.static RefOptionDecorationbadge(String label, RefOptionTone tone) color()Returns the value of thecolorrecord component.booleandisabled()Returns the value of thedisabledrecord component.static RefOptionDecorationdisabled(String label, RefOptionTone tone, String reason) final booleanIndicates whether some other object is "equal to" this one.static RefOptionDecorationFilter an option from the current search result using live form/row context.final inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord component.reason()Returns the value of thereasonrecord component.tone()Returns the value of thetonerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RefOptionDecoration
public RefOptionDecoration(String badge, RefOptionTone tone, String color, boolean disabled, String reason, boolean hidden) Creates an instance of aRefOptionDecorationrecord class.- Parameters:
badge- the value for thebadgerecord componenttone- the value for thetonerecord componentcolor- the value for thecolorrecord componentdisabled- the value for thedisabledrecord componentreason- the value for thereasonrecord componenthidden- the value for thehiddenrecord component
-
-
Method Details
-
badge
-
disabled
-
filteredOut
Filter an option from the current search result using live form/row context. -
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 '=='. -
badge
Returns the value of thebadgerecord component.- Returns:
- the value of the
badgerecord component
-
tone
Returns the value of thetonerecord component.- Returns:
- the value of the
tonerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
disabled
public boolean disabled()Returns the value of thedisabledrecord component.- Returns:
- the value of the
disabledrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-