01 /*
02 * Created on 2005/03/04
03 * Author aki@www.xucker.jpn.org
04 * License Apache2.0 or Common Public License
05 */
06 package org.jpn.xucker.rcp.optipngwrapper;
07
08 import org.eclipse.core.runtime.Path;
09 import org.eclipse.jface.resource.ImageDescriptor;
10 import org.eclipse.swt.SWT;
11 import org.eclipse.swt.graphics.Image;
12 import org.eclipse.swt.widgets.Composite;
13 import org.eclipse.ui.part.ViewPart;
14 import org.jpn.xucker.commons.swt.ui.FileListImage;
15
16 /**
17 *
18 *
19 */
20 public class FileListImageView extends ViewPart{
21 public static final String ID_VIEW="org.jpn.xucker.rcp.optipngwrapper.FileListImageView";
22
23 private FileListImage fileListImage;
24
25 /* (non-Javadoc)
26 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
27 */
28 public void createPartControl(Composite parent) {
29
30 fileListImage = new FileListImage(parent,SWT.NULL);
31 Image canvasImage=ImageDescriptor.createFromURL(OptipngWrapperPlugin.getDefault().find(new Path(Messages.getString("drag_and_drop.icon")))).createImage();
32 fileListImage.setImage(canvasImage);
33
34 //set
35 OptipngWrapperPlugin.getDefault().setFileListImage(fileListImage);
36
37 }
38
39 /* (non-Javadoc)
40 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
41 */
42 public void setFocus() {
43 // TODO Auto-generated method stub
44
45 }
46
47 }
|