|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.ui.Multimedia
This class provides easy access to animations and sounds. Both animations and sounds are cached for more efficient memory usage and improved setup time. Media items can be prefetched or fetched on demand (the first time they are requested).
A mapping file can be specified that maps alias names onto actual path names (of the media items that are loaded). The format of this file is that of a simple Java Properties file.
When prefetching media items (using the -cache option), the media type must be specified:
AnimatedIcon
Field Summary | |
private static Map |
animations_
The cache of animations. |
private static Set |
cache_
The multimedia items that are prefetched and cached permanently. |
static String |
DEFAULT_MAP
The name of the default mapping file. |
static String |
DESCR
The command line parameter definitions of this class. |
private static Map |
images_
The cache of images. |
private static Properties |
props_
The properties that are used to resolve aliases of media items to resource names. |
private static Map |
sounds_
The cache of sounds. |
protected static String |
UNAVAILABLE
A placeholder for unavailable media. |
Constructor Summary | |
Multimedia()
|
Method Summary | |
static AnimatedIcon |
getAnimatedIcon(String name)
|
private static AnimatedIcon |
getAnimatedIcon0(String name)
|
static Image |
getImage(String name)
|
private static AudioClip |
getSound(String name)
|
static void |
main(String[] argv)
|
static void |
playSound(String name)
|
private static String |
resolve(String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DEFAULT_MAP
public static final String DESCR
protected static final String UNAVAILABLE
private static volatile Set cache_
private static Properties props_
private static Map sounds_
private static Map animations_
private static Map images_
Constructor Detail |
public Multimedia()
Method Detail |
public static void playSound(String name)
private static AudioClip getSound(String name)
public static AnimatedIcon getAnimatedIcon(String name)
private static AnimatedIcon getAnimatedIcon0(String name)
public static Image getImage(String name)
private static String resolve(String name)
public static void main(String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |