Package com.onec.ui.divkit
Record Class SurfaceDivBuilder.HeaderAction
java.lang.Object
java.lang.Record
com.onec.ui.divkit.SurfaceDivBuilder.HeaderAction
- Enclosing class:
SurfaceDivBuilder
public static record SurfaceDivBuilder.HeaderAction(String icon, String label, String tone, String url, String placement)
extends Record
One detail-header action.
tone is "primary" (solid success —
Post), "accent" (solid brand — the surface's main action, e.g. Edit),
"danger" (Delete) or "normal" (neutral); placement is
"primary" (inline button) or "menu" (overflow ⋯). icon
is a kebab-case lucide name. A null url drops the action.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.label()Returns the value of thelabelrecord component.Returns the value of theplacementrecord component.tone()Returns the value of thetonerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
HeaderAction
Creates an instance of aHeaderActionrecord class.- Parameters:
icon- the value for theiconrecord componentlabel- the value for thelabelrecord componenttone- the value for thetonerecord componenturl- the value for theurlrecord componentplacement- the value for theplacementrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
tone
Returns the value of thetonerecord component.- Returns:
- the value of the
tonerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
placement
Returns the value of theplacementrecord component.- Returns:
- the value of the
placementrecord component
-