|
|
@ -35,6 +35,8 @@ import Model.DDSImageFile; |
|
|
|
import com.jme3.gde.core.assets.ProjectAssetManager; |
|
|
|
import com.jme3.gde.core.assets.ProjectAssetManager; |
|
|
|
import com.jme3.gde.core.util.TreeUtil; |
|
|
|
import com.jme3.gde.core.util.TreeUtil; |
|
|
|
import com.jme3.texture.Texture; |
|
|
|
import com.jme3.texture.Texture; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
@ -303,6 +305,11 @@ public class TextureBrowser extends javax.swing.JDialog implements TreeSelection |
|
|
|
newicon = new ImageIcon(bufferedImage); |
|
|
|
newicon = new ImageIcon(bufferedImage); |
|
|
|
} catch (IOException ex) { |
|
|
|
} catch (IOException ex) { |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
BufferedImage img = new BufferedImage(320, 240, BufferedImage.TYPE_INT_ARGB); |
|
|
|
|
|
|
|
Graphics2D g2d = (Graphics2D) img.getGraphics(); |
|
|
|
|
|
|
|
g2d.setColor(Color.white); |
|
|
|
|
|
|
|
g2d.drawString("Cannot display image", 15, 15); |
|
|
|
|
|
|
|
newicon = new ImageIcon(img); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
newicon = ImageUtilities.image2Icon(ImageToAwt.convert(tex.getImage(), false, true, 0)); |
|
|
|
newicon = ImageUtilities.image2Icon(ImageToAwt.convert(tex.getImage(), false, true, 0)); |
|
|
|