Revision 38372 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFramePicture.java
FFramePicture.java | ||
---|---|---|
355 | 355 |
if (file == null || !f.exists()) { |
356 | 356 |
return null; |
357 | 357 |
} |
358 |
setPath(file); |
|
359 |
String iString = file.toLowerCase(); |
|
360 | 358 |
|
361 |
if (iString.endsWith("jpg") || iString.endsWith("jpeg") || |
|
362 |
iString.endsWith("gif")) { |
|
363 |
tmpIcon = new ImageIcon(Jimi.getImage(file, Jimi.VIRTUAL_MEMORY)); //((File)main.allImages.elementAt(x)).getAbsolutePath()); |
|
364 |
} else if (iString.endsWith("png") || iString.endsWith("tif") || |
|
365 |
iString.endsWith("ico") || iString.endsWith("xpm") || |
|
366 |
iString.endsWith("bmp")) { |
|
367 |
tmpIcon = new ImageIcon(Jimi.getImage(file, Jimi.VIRTUAL_MEMORY)); //new ImageIcon(f.getPath()); |
|
368 |
} else if (iString.endsWith("svg")) { |
|
369 |
isSVG = true; |
|
370 |
obtainStaticRenderer(new File(file)); |
|
371 |
}else { |
|
372 |
tmpIcon=new ImageIcon(file); |
|
359 |
if (new File(file).isFile()) { |
|
360 |
setPath(file); |
|
361 |
String iString = file.toLowerCase(); |
|
362 |
|
|
363 |
if (iString.endsWith("jpg") || iString.endsWith("jpeg") || |
|
364 |
iString.endsWith("gif")) { |
|
365 |
tmpIcon = new ImageIcon(Jimi.getImage(file, Jimi.VIRTUAL_MEMORY)); //((File)main.allImages.elementAt(x)).getAbsolutePath()); |
|
366 |
} else if (iString.endsWith("png") || iString.endsWith("tif") || |
|
367 |
iString.endsWith("ico") || iString.endsWith("xpm") || |
|
368 |
iString.endsWith("bmp")) { |
|
369 |
tmpIcon = new ImageIcon(Jimi.getImage(file, Jimi.VIRTUAL_MEMORY)); //new ImageIcon(f.getPath()); |
|
370 |
} else if (iString.endsWith("svg")) { |
|
371 |
isSVG = true; |
|
372 |
obtainStaticRenderer(new File(file)); |
|
373 |
}else { |
|
374 |
tmpIcon=new ImageIcon(file); |
|
375 |
} |
|
373 | 376 |
} |
374 | 377 |
|
375 | 378 |
if (!isSVG && (tmpIcon != null)) { |
Also available in: Unified diff