soundsres.java
来自「开源项目openfire的完整源程序」· Java 代码 · 共 46 行
JAVA
46 行
/**
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Lesser Public License (LGPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.resource;
import javax.swing.ImageIcon;
import java.net.URL;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
public class SoundsRes {
private static PropertyResourceBundle prb;
public static final String INCOMING_USER = "INCOMING_USER";
public static final String TRAY_SHOWING = "TRAY_SHOWING";
public static final String OPENING = "OPENING";
public static final String CLOSING = "CLOSING";
static ClassLoader cl = SoundsRes.class.getClassLoader();
static {
prb = (PropertyResourceBundle)ResourceBundle.getBundle("org/jivesoftware/resource/sounds");
}
public static final String getString(String propertyName) {
return prb.getString(propertyName);
}
public static final ImageIcon getImageIcon(String imageName) {
final String iconURI = getString(imageName);
final URL imageURL = cl.getResource(iconURI);
return new ImageIcon(imageURL);
}
public static final URL getURL(String propertyName) {
return cl.getResource(getString(propertyName));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?