|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.ntnu.vegare.visualizer.client.utils.Resources
public class Resources
Thread safe singleton implementation by Bill Pugh: http://en.wikipedia.org/wiki/Singleton_pattern
Provides access to static resources related to the project.
Allows preloading of large images by using the method
preloadResources()
. Keeps all loaded resources in memory.
Method Summary | |
---|---|
javax.swing.ImageIcon |
getImage(java.lang.String name)
Return an imageicon from memory if cached, otherwise load it from disk. |
static Resources |
getInstance()
|
void |
preloadResources()
Preload big images |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Resources getInstance()
public void preloadResources()
public javax.swing.ImageIcon getImage(java.lang.String name)
name
- Path to file located in the img/ folder
ImageIcon
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |