Verified Owner
Top Description Inners Fields Constructors Methods
org.jabref.gui.icon

public final Class IkonliIcon

extends Object
implements JabRefIcon
Class Inheritance
All Implemented Interfaces
org.jabref.gui.icon.JabRefIcon
Annotations
@NullMarked
Imports
java.util.Collections, .EnumSet, .LinkedHashSet, .List, .Locale, .Map, .Optional, .SequencedSet, .ServiceLoader, java.util.function.Function, java.util.stream.Collectors, javafx.scene.Node, javafx.scene.layout.HBox, javafx.scene.paint.Color, org.jspecify.annotations.NullMarked, .Nullable, org.kordamp.ikonli.Ikon, .IkonProvider, org.kordamp.ikonli.javafx.FontIcon

JabRefIcon backed by an Ikonli font glyph, rendered as a FontIcon. The font-backed counterpart to SvgIcon. Immutable: withColor and withSize return copies.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
IkonliIcon.IkonliIcons

Holds every Ikon discovered via the IkonProvider service loader.

Field Summary

Modifier and TypeField and Description
private final @Nullable Color
private static final int
DEFAULT_SIZE

Ikonli's own default, so an icon that was never given a size renders as it always has.

private final List<Ikon>
private final int

Constructor Summary

AccessConstructor and Description
public
IkonliIcon(Ikon... icons)

public
public
IkonliIcon(Color color, Ikon... icons)

pack-priv
IkonliIcon(Color color, List<Ikon> icons)

private
IkonliIcon(List<Ikon> icons, @Nullable Color color, int size)

Method Summary

Modifier and TypeMethod and Description
public static SequencedSet<Ikon>
private FontIcon
public JabRefIcon
public static Optional<JabRefIcon>
findIcon(String code)

Finds the Ikonli icon whose name matches code (case-insensitive).

public static Optional<JabRefIcon>
findIconByDescription(String description)

Finds the Ikonli icon whose pack-qualified description matches description (case-insensitive).

public Node
public boolean
public String
public JabRefIcon
public JabRefIcon
withSize(int size)

Implements org.jabref.gui.icon.JabRefIcon.withSize.

Returns a copy of this icon rendered at size pixels.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorback to summary
private final @Nullable Color color
DEFAULT_SIZEback to summary
private static final int DEFAULT_SIZE

Ikonli's own default, so an icon that was never given a size renders as it always has.

iconsback to summary
private final List<Ikon> icons
sizeback to summary
private final int size

Constructor Detail

IkonliIconback to summary
public IkonliIcon(Ikon... icons)
IkonliIconback to summary
public IkonliIcon(List<Ikon> icons)
IkonliIconback to summary
public IkonliIcon(Color color, Ikon... icons)
IkonliIconback to summary
pack-priv IkonliIcon(Color color, List<Ikon> icons)
IkonliIconback to summary
private IkonliIcon(List<Ikon> icons, @Nullable Color color, int size)

Method Detail

allIconsback to summary
public static SequencedSet<Ikon> allIcons()
buildFontIconback to summary
private FontIcon buildFontIcon(Ikon ikon)
disabledback to summary
public JabRefIcon disabled()

Implements org.jabref.gui.icon.JabRefIcon.disabled.

Annotations
@Override
findIconback to summary
public static Optional<JabRefIcon> findIcon(String code)

Finds the Ikonli icon whose name matches code (case-insensitive).

findIconByDescriptionback to summary
public static Optional<JabRefIcon> findIconByDescription(String description)

Finds the Ikonli icon whose pack-qualified description matches description (case-insensitive).

getGraphicNodeback to summary
public Node getGraphicNode()

Implements org.jabref.gui.icon.JabRefIcon.getGraphicNode.

Annotations
@Override
matchesback to summary
public boolean matches(Node graphicNode)

Implements org.jabref.gui.icon.JabRefIcon.matches.

Annotations
@Override
nameback to summary
public String name()

Implements org.jabref.gui.icon.JabRefIcon.name.

Annotations
@Override
withColorback to summary
public JabRefIcon withColor(Color color)

Implements org.jabref.gui.icon.JabRefIcon.withColor.

Annotations
@Override
withSizeback to summary
public JabRefIcon withSize(int size)

Implements org.jabref.gui.icon.JabRefIcon.withSize.

Doc from org.jabref.gui.icon.JabRefIcon.withSize.

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.

Annotations
@Override
org.jabref.gui.icon back to summary

private final Class IkonliIcon.IkonliIcons

extends Object
Class Inheritance

Holds every Ikon discovered via the IkonProvider service loader. Initialization on first access guaranteed by JVM.

Field Summary

Modifier and TypeField and Description
private static final SequencedSet<Ikon>
private static final Map<String, Ikon>
private static final Map<String, Ikon>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static SequencedSet<Ikon>
load()

private static Map<String, Ikon>
loadMap(Function<Ikon, String> keyMapper)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLback to summary
private static final SequencedSet<Ikon> ALL
BY_DESCRIPTIONback to summary
private static final Map<String, Ikon> BY_DESCRIPTION
BY_NAMEback to summary
private static final Map<String, Ikon> BY_NAME

Constructor Detail

IkonliIconsback to summary
private IkonliIcons()

Method Detail

loadback to summary
private static SequencedSet<Ikon> load()
loadMapback to summary
private static Map<String, Ikon> loadMap(Function<Ikon, String> keyMapper)