Verified Owner
Top Description Methods
org.jabref.gui.icon

public sealed Interface JabRefIcon

permits JabRefIcons, IkonliIcon, SvgIcon
Known Direct Implementers
org.jabref.gui.icon.SvgIcon, org.jabref.gui.icon.IconTheme.JabRefIcons, org.jabref.gui.icon.IkonliIcon
Annotations
@NullMarked
Imports
javafx.scene.Node, javafx.scene.paint.Color, org.jspecify.annotations.NullMarked

Library-agnostic icon contract, with two parallel implementations: IconTheme.JabRefIcons enum delegates to implementation per glyph.

Method Summary

Modifier and TypeMethod and Description
public JabRefIcon
public Node
public boolean
matches(Node graphicNode)

public String
name()

public JabRefIcon
public JabRefIcon
withSize(int size)

Returns a copy of this icon rendered at size pixels.

Method Detail

disabledback to summary
public JabRefIcon disabled()
getGraphicNodeback to summary
public Node getGraphicNode()
matchesback to summary
public boolean matches(Node graphicNode)
nameback to summary
public String name()
withColorback to summary
public JabRefIcon withColor(Color color)
withSizeback to summary
public JabRefIcon withSize(int size)

Returns a copy of this icon rendered at size pixels. Each implementation applies the size to its own backing node type, so callers (e.g. JabRefIconView) need not know whether it is a font or SVG node.

Note the unit differs by backing type: for a font glyph size is the em/font size, so the glyph sits inside that box with the font's intrinsic padding; for an SVG the path is fitted edge-to-edge into a size×size square. The same size can thus render an SVG slightly larger than the font glyph.