package com.jme3.system;\r
\r
import com.jme3.renderer.Renderer;\r
-import java.awt.image.BufferedImage;\r
import java.io.IOException;\r
import java.io.InputStream;\r
import java.io.OutputStream;\r
* @param value An array of BufferedImages to use as icons.\r
* (Default: not set)\r
*/\r
- public void setIcons(BufferedImage[] value) {\r
+ public void setIcons(Object[] value) {\r
put("Icons", value);\r
}\r
\r
return getString("AudioRenderer");\r
}\r
\r
- public BufferedImage[] getIcons() {\r
- return (BufferedImage[]) get("Icons");\r
+ public Object[] getIcons() {\r
+ return (Object[]) get("Icons");\r
}\r
\r
public void setSettingsDialogImage(String path) {\r
import java.awt.event.KeyListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.awt.image.BufferedImage;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
}
});
- if(source.getIcons()!=null){
- safeSetIconImages(Arrays.asList(source.getIcons()));
+ if (source.getIcons() != null) {
+ safeSetIconImages( (List<BufferedImage>) Arrays.asList((BufferedImage[]) source.getIcons()) );
}
setTitle("Select Display Settings");
if (displayMode != null)\r
Display.setDisplayMode(displayMode);\r
\r
- if (settings.getIcons() != null)\r
+ if (settings.getIcons() != null) {\r
Display.setIcon(imagesToByteBuffers(settings.getIcons()));\r
+ }\r
\r
Display.setFullscreen(settings.isFullscreen());\r
Display.setVSyncEnabled(settings.isVSync());\r
Display.setTitle(title);\r
}\r
\r
- private ByteBuffer[] imagesToByteBuffers(BufferedImage[] images) {\r
+ private ByteBuffer[] imagesToByteBuffers(Object[] images) {\r
ByteBuffer[] out = new ByteBuffer[images.length];\r
for (int i = 0; i < images.length; i++) {\r
- out[i] = imageToByteBuffer(images[i]);\r
+ BufferedImage image = (BufferedImage) images[i];\r
+ out[i] = imageToByteBuffer(image);\r
}\r
return out;\r
}\r