com.acrolinx.sidebar.utils.IconUtils Maven / Gradle / Ivy
/* Copyright (c) 2018 Acrolinx GmbH */
package com.acrolinx.sidebar.utils;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.InputStream;
import java.net.URL;
/** Use this class to retrieve the Acrolinx Logo from package resources. */
public final class IconUtils {
public static InputStream getAcrolinxIcon_16_16_AsStream() {
return IconUtils.class.getResourceAsStream("/icons/acrolinxIcon16px.png");
}
public static InputStream getAcrolinxIcon_32_32_AsStream() {
return IconUtils.class.getResourceAsStream("/icons/[email protected]");
}
public static InputStream getAcrolinxIcon_24_24_AsStream() {
return IconUtils.class.getResourceAsStream("/icons/acrolinxIcon24px.png");
}
public static InputStream getAcrolinxIcon_48_48_AsStream() {
return IconUtils.class.getResourceAsStream("/icons/[email protected]");
}
public static URL getAcrolinxIcon_16_16_URL() {
return IconUtils.class.getResource("/icons/acrolinxIcon16px.png");
}
public static URL getAcrolinxIcon_32_32_URL() {
return IconUtils.class.getResource("/icons/[email protected]");
}
public static URL getAcrolinxIcon_24_24_URL() {
return IconUtils.class.getResource("/icons/acrolinxIcon24px.png");
}
public static URL getAcrolinxIcon_48_48_URL() {
return IconUtils.class.getResource("/icons/[email protected]");
}
/** This method loads a scaled instance of the image for retina displays. */
public static Image getAcrolinxIcon_16_16() {
return Toolkit.getDefaultToolkit().getImage(getAcrolinxIcon_16_16_URL());
}
/** This method loads a scaled instance of the image for retina displays. */
public static Image getAcrolinxIcon_24_24() {
return Toolkit.getDefaultToolkit().getImage(getAcrolinxIcon_24_24_URL());
}
private IconUtils() {
throw new IllegalStateException();
}
}