📄 gefuipluginimages.java
字号:
/*******************************************************************************
* $Header: /cvsroot/EOS6/work_dir/niegy/com.primeton.studio.gef.ui/src/com/primeton/studio/gef/ui/GefUiPluginImages.java,v 1.4 2006/12/08 07:04:32 niegy Exp $
* $Revision: 1.4 $
* $Date: 2006/12/08 07:04:32 $
*
*==============================================================================
*
* Copyright (c) 2001-2006 Primeton Technologies, Ltd.
* All rights reserved.
*
* Created on 2006-11-16
*******************************************************************************/
package com.primeton.studio.gef.ui;
import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
/**
* TODO 此处填写 class 信息
*
* @author niegy (mailto:niegy@primeton.com)
*/
/*
* 修改历史
* $Log: GefUiPluginImages.java,v $
* Revision 1.4 2006/12/08 07:04:32 niegy
* 重构代码
*
* Revision 1.3 2006/11/22 07:07:38 niegy
* 增加table
*
* Revision 1.2 2006/11/18 12:13:53 niegy
* 增加容器模型
*
* Revision 1.1 2006/11/17 03:15:13 niegy
* create
*
*/
public class GefUiPluginImages {
static final URL BASE_URL = GefUiPlugin.getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
public static final Image IMG_FILE;
public static final Image IMG_FOLDER;
public static final Image CLASS;
public static final Image INTERFACE;
public static final Image FIELD_PUBLIC;
public static final Image METHOD_PUBLIC;
public static final ImageDescriptor GEF_OUTLINE;
public static final ImageDescriptor GEF_OVERVIEW;
public static final ImageDescriptor GEF_CONNECTION_16;
public static final ImageDescriptor GEF_CONNECTION_32;
public static final ImageDescriptor GEF_PROPERTIES;
public static final ImageDescriptor GEF_NOTE_16;
public static final ImageDescriptor GEF_NOTE_32;
static {
String iconPath = "icons/"; //$NON-NLS-1$
String prefix16 = iconPath + "16/"; //$NON-NLS-1$
String prefix32 = iconPath + "32/"; //$NON-NLS-1$
IMG_FILE = createImageDescriptor(iconPath
+ "file.gif").createImage();
IMG_FOLDER = createImageDescriptor(iconPath
+ "folder.gif").createImage();
CLASS = createImageDescriptor(iconPath
+ "class_obj.gif").createImage();
INTERFACE = createImageDescriptor(iconPath
+ "int_obj.gif").createImage();
FIELD_PUBLIC = createImageDescriptor(iconPath
+ "field_public_obj.gif").createImage();
METHOD_PUBLIC = createImageDescriptor(iconPath
+ "methpub_obj.gif").createImage();
GEF_PROPERTIES = createImageDescriptor(iconPath
+ "properties.gif");
GEF_OUTLINE = createImageDescriptor(iconPath
+ "outline.gif");
GEF_OVERVIEW = createImageDescriptor(iconPath
+ "overview.gif");
GEF_CONNECTION_16 = createImageDescriptor(prefix16
+ "connection.gif");
GEF_CONNECTION_32 = createImageDescriptor(prefix32
+ "connection.gif");
GEF_NOTE_16 = createImageDescriptor(prefix16
+ "note.gif");
GEF_NOTE_32 = createImageDescriptor(prefix32
+ "note.gif");
}
/**
* Utility method to create an <code>ImageDescriptor</code> from a path to
* a file.
*/
private static ImageDescriptor createImageDescriptor(String path) {
try {
URL url = new URL(BASE_URL, path);
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException e) {
}
return ImageDescriptor.getMissingImageDescriptor();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -