这只是我谁时遇到谁时记录的,以后有新的内容会谁时更新 1 . Image.win32_new (Display.getDefault(), SWT.ICON, 65545) Image org.eclipse.swt.graphics.Image.win32_new(Device device, int type, int handle)Invokes platform specific functionality to allocate a new image. IMPORTANT: This method is not part of the public API for
Display.getDefault().getSystemImage(SWT.ICON_WORKING) Image org.eclipse.swt.widgets.Display.getSystemImage(int id)Returns the matching standard platform image for the given constant, which
should be one of the icon constants specified in class
AbstractUIPlugin.imageDescriptorFromPlugin(Application.ID,"icons/types.gif") ImageDescriptor org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin(String pluginId, String imageFilePath)Creates and returns a new image descriptor for an image file located within the specified plug-in. This is a convenience method that simply locates the image file in within the plug-in (no image registries are involved). The path is relative to the root of the plug-in, and takes into account files coming from plug-in fragments. The path may include $arg$ elements. However, the path must not have a leading "." or path separator. Clients should use a path like "icons/mysample.gif" rather than "./icons/mysample.gif" or "/icons/mysample.gif".
4。 static final Image UNCHECKED = createImage("images/checkboxenabledoff.gif"), //$NON-NLS-1$ CHECKED = createImage("images/checkboxenabledon.gif"); //$NON-NLS-1$ private static Image createImage(String name) { InputStream stream = CheckBox.class.getResourceAsStream(name); Image image = new Image(null, stream); try { stream.close(); } catch (IOException ioe) { } return image; } 5。 ImageRegistry reg = JFaceResources.getImageRegistry(); reg.put(CELL_EDITOR_IMG_DOTS_BUTTON, ImageDescriptor.createFromFile( DialogCellEditor.class, "images/dots_button.gif")); |
|