Can the imagepath check for PNG then GIF or tell me if an image exists? [message #583905] |
Mon, 05 October 2009 16:06 |
Matt Seashore Messages: 58 Registered: July 2009 |
Member |
|
|
Hi,
I have a scenario where Navigation tree icons are created based on the
type ID of the navigation node/view (ie. a node Person would be
"Person".gif).
The problem I'm having is that some of the icons are GIF and some are
PNG and it would be nice not to have to add the logic to each node to
have to know whether it's a PNG or GIF. I can't find a way to get Riena
to do this...is it possible to tell Riena to look for PNG and then GIF
in it's image paths?...or is it possible to figure out if a given image
exists on the riena image paths so I can do the right setIcon call myself?
I've looked at the ImageStore class and see it defaults to PNG if no
extension is specified, which is helpful, but it would never find the
GIFs. I also tried ImageStore.getInstance().getImage("Person.png") to
see if I can test and find if a given image exists, but I get an
exception because I'm not running in the UI thread. Before I go and
create a method which does this check through a runnable in the UI
thread, I figured I'd ask if there was a better way :).
Thanks much,
Matt
|
|
|
Powered by
FUDForum. Page generated in 0.01864 seconds