Record Class PaletteEntries.Entry
java.lang.Object
java.lang.Record
com.iizigo.prop.editor.color.swt.PaletteEntries.Entry
- Record Components:
kind- "group" for a non-selectable header, "role", "color" or "member".label- The text shown.ref- The reference the entry stands for, null for a group.light- The ARGB the entry resolves to in the light scheme.lightResolved- true when the light value resolved.dark- The ARGB the entry resolves to in the dark scheme.darkResolved- true when the dark value resolved.
- Enclosing class:
PaletteEntries
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionintdark()Returns the value of thedarkrecord component.booleanReturns the value of thedarkResolvedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if the entry can be chosen.kind()Returns the value of thekindrecord component.label()Returns the value of thelabelrecord component.intlight()Returns the value of thelightrecord component.booleanReturns the value of thelightResolvedrecord component.intliteral(boolean dark) Gets the literal of a scheme, the magenta marker for an unresolved value.ref()Returns the value of therefrecord component.final StringtoString()Returns a string representation of this record class.
Constructor Details
Entry
public Entry(String kind, String label, String ref, int light, boolean lightResolved, int dark, boolean darkResolved) Creates an instance of aEntryrecord class.- Parameters:
kind- the value for thekindrecord componentlabel- the value for thelabelrecord componentref- the value for therefrecord componentlight- the value for thelightrecord componentlightResolved- the value for thelightResolvedrecord componentdark- the value for thedarkrecord componentdarkResolved- the value for thedarkResolvedrecord component
Method Details
isSelectable
public boolean isSelectable()Checks if the entry can be chosen.literal
public int literal(boolean dark) Gets the literal of a scheme, the magenta marker for an unresolved value.- Parameters:
dark- true for the dark scheme.
toString
hashCode
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 thecomparemethod from their corresponding wrapper classes.kind
label
ref
light
lightResolved
public boolean lightResolved()Returns the value of thelightResolvedrecord component.- Returns:
- the value of the
lightResolvedrecord component
dark
darkResolved
public boolean darkResolved()Returns the value of thedarkResolvedrecord component.- Returns:
- the value of the
darkResolvedrecord component