Search in sources :

Example 1 with FlatSVGIcon

use of com.formdev.flatlaf.extras.FlatSVGIcon in project jadx by skylot.

the class UiUtils method openSvgIcon.

public static FlatSVGIcon openSvgIcon(String name) {
    String iconPath = "icons/" + name + ".svg";
    FlatSVGIcon icon = new FlatSVGIcon(iconPath);
    boolean found;
    try {
        found = icon.hasFound();
    } catch (Exception e) {
        throw new JadxRuntimeException("Failed to load icon: " + iconPath, e);
    }
    if (!found) {
        throw new JadxRuntimeException("Icon not found: " + iconPath);
    }
    return icon;
}
Also used : FlatSVGIcon(com.formdev.flatlaf.extras.FlatSVGIcon) JadxRuntimeException(jadx.core.utils.exceptions.JadxRuntimeException) JadxRuntimeException(jadx.core.utils.exceptions.JadxRuntimeException)

Aggregations

FlatSVGIcon (com.formdev.flatlaf.extras.FlatSVGIcon)1 JadxRuntimeException (jadx.core.utils.exceptions.JadxRuntimeException)1