|
@@ -7,6 +7,7 @@ package de.nplusc.izc.izpl.plugins.jukebox;
|
|
|
|
|
|
import de.nplusc.izc.iZpl.API.UIPlugin;
|
|
|
import java.awt.Image;
|
|
|
+import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
import java.lang.reflect.Method;
|
|
@@ -18,6 +19,11 @@ import javax.imageio.ImageIO;
|
|
|
*/
|
|
|
public class APIWrapper
|
|
|
{
|
|
|
+
|
|
|
+ /**
|
|
|
+ * defines the application directory of iZpl where it got installed
|
|
|
+ */
|
|
|
+ private static final String APPDIR = new File(APIWrapper.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParentFile().getParent();
|
|
|
public static UIPlugin getUiPlugin()
|
|
|
{
|
|
|
try
|
|
@@ -45,6 +51,18 @@ public class APIWrapper
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ try
|
|
|
+ {
|
|
|
+ File f = new File(APPDIR+File.separator+"res"+File.separator+"program.png");
|
|
|
+ if(f.exists())
|
|
|
+ {
|
|
|
+ return ImageIO.read(f);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (IOException ex)
|
|
|
+ {
|
|
|
+ //empty since catch and else are same,
|
|
|
+ }
|
|
|
return ImageIO.read(APIWrapper.class.getResource("/fallbackIcon.png"));
|
|
|
} catch (IOException ex)
|
|
|
{
|