📄 util.java
字号:
/**
*
*/
package org.oscar.explorer;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
public class Util {
private static ImageRegistry imageRegistry;
public static URL newURL(String urlName) {
try {
return new URL(urlName);
} catch (Exception e) {
throw new RuntimeException("Err:" + urlName, e);
}
}
public static ImageRegistry getRegistry() {
if (imageRegistry == null) {
imageRegistry = new ImageRegistry();
imageRegistry.put("folder", ImageDescriptor
.createFromURL(newURL("file:icons/fldr_obj.gif")));
imageRegistry.put("file", ImageDescriptor
.createFromURL(newURL("file:icons/file_obj.gif")));
}
return imageRegistry;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -