FMJ(freedom media for java)是java视频开发的新选择

源代码在线查看: images.java

软件大小: 10804 K
上传用户: ADGFS
关键词: java freedom media FMJ
下载地址: 免注册下载 普通下载 VIP

相关代码

				package net.sf.fmj.ui.images;								import java.util.HashMap;								import javax.swing.ImageIcon;								/**				 * 				 * @author Warren Bloomer				 *				 */				public class Images {										public static final String SLIDER_THUMB_HORIZ = "slider_thumb_horiz.png";					public static final String SLIDER_THUMB_VERT = "slider_thumb_vert.png";									public static final String MEDIA_PLAY = "Play24.gif";					public static final String MEDIA_STOP = "Stop24.gif";					public static final String MEDIA_PAUSE = "Pause24.gif";					public static final String MEDIA_REWIND = "Rewind24.gif";					public static final String MEDIA_FASTFORWARD = "FastForward24.gif";					public static final String MEDIA_STEPBACK = "StepBack24.gif";					public static final String MEDIA_STEPFORWARD = "StepForward24.gif";										public static ImageIcon get(String name) {						return singleton.doGet(name);					}										public static void flush() {						singleton.doFlush();					}										private static final Images singleton = new Images();										private static final String basePath = "/net/sf/fmj/ui/images/";										private HashMap images = new HashMap();										private void doFlush() {						images.clear();					}									private ImageIcon doGet(String imageName) {						ImageIcon icon = (ImageIcon) images.get(imageName);						if (icon == null) {														icon = new ImageIcon(getClass().getResource(basePath + imageName));							if (icon != null) {								images.put(imageName, icon);							}						}										return icon;					}								}							

相关资源