OverlayIcon

data class OverlayIcon(val base: Icon, val background: Icon? = null) : Icon(source)

An overlay icon, which can be displayed on top of other icons.

This icon is drawn as the base surrounded by a small margin of background color, which creates visual distance between the overlay and the rest of the icon this overlay is shown in top of. The background color is determined when the icon is drawn.

Constructors

Link copied to clipboard
constructor(base: Icon, background: Icon? = null)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard
val background: Icon? = null

The background shape to ensure that the small margin of background color is also applied inside the base, or null if base is already a solid shape.

Link copied to clipboard
val base: Icon

The base of the icon; must be square.

Functions

Link copied to clipboard
open override fun getIconHeight(): Int

The height of the base icon.

Link copied to clipboard
open override fun getIconWidth(): Int

The width of the base icon.

Link copied to clipboard
open override fun paintIcon(c: Component?, g: Graphics?, x: Int, y: Int)

Paints the overlay icon.