![JAR search and dependency download from the Maven repository](/logo.png)
freeseawind.lf.utils.LuckUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of littleluck Show documentation
Show all versions of littleluck Show documentation
Java Swing cross platform LookAndFeel
package freeseawind.lf.utils;
import java.awt.Toolkit;
import java.awt.event.InputEvent;
import java.awt.image.BufferedImage;
import javax.swing.UIManager;
import freeseawind.ninepatch.swing.SwingNinePatch;
public class LuckUtils
{
public static boolean isMenuShortcutKeyDown(InputEvent event)
{
return (event.getModifiers()
& Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
}
public static BufferedImage getUiImage(String imageKey)
{
return (BufferedImage) UIManager.get(imageKey);
}
public static SwingNinePatch createNinePatch(String imageKey)
{
return new SwingNinePatch(getUiImage(imageKey));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy