Record Class FontDisplay
java.lang.Object
java.lang.Record
megamek.client.ui.displayWrappers.FontDisplay
- Record Components:
font- region Variable Declarations
FontDisplay is a display wrapper around a Font, primarily to be used in ComboBoxes. This is largely for performance
reasons, as it doesn't require recalculating the font and/ or proper name each time.
-
Constructor Summary
ConstructorsConstructorDescriptionFontDisplay(Font font, String displayName) Creates an instance of aFontDisplayrecord class.FontDisplay(String familyName) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.booleanIndicates whether some other object is "equal to" this one.font()Returns the value of thefontrecord component.static List<FontDisplay> inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.
-
Constructor Details
-
FontDisplay
-
FontDisplay
Creates an instance of aFontDisplayrecord class.- Parameters:
font- the value for thefontrecord componentdisplayName- the value for thedisplayNamerecord component
-
-
Method Details
-
getSortedFontDisplays
-
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. -
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
font
Returns the value of thefontrecord component.- Returns:
- the value of the
fontrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-