Record Class AlphaIcon
java.lang.Object
java.lang.Record
smile.swing.AlphaIcon
- Record Components:
icon- the Icon to wrapalpha- the opacity should be in the range 0.0F (fully transparent) to 1.0F (fully opaque).
- All Implemented Interfaces:
Icon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha()Returns the value of thealpharecord component.final booleanIndicates whether some other object is "equal to" this one.intGets the height of the bounding rectangle of thisAlphaIcon.intGets the width of the bounding rectangle of thisAlphaIcon.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.voidPaints the wrapped icon with thisAlphaIcon's transparency.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AlphaIcon
-
-
Method Details
-
paintIcon
Paints the wrapped icon with thisAlphaIcon's transparency. -
getIconWidth
public int getIconWidth()Gets the width of the bounding rectangle of thisAlphaIcon. Returns the width of the wrapped icon.- Specified by:
getIconWidthin interfaceIcon- Returns:
- the width in pixels
-
getIconHeight
public int getIconHeight()Gets the height of the bounding rectangle of thisAlphaIcon. * Returns the height of the wrapped icon.- Specified by:
getIconHeightin interfaceIcon- Returns:
- the height in pixels
-
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. -
icon
-
alpha
-