]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.editors.win32/src/org/simantics/editors/win32/ole/PreviewDefinition.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.editors.win32 / src / org / simantics / editors / win32 / ole / PreviewDefinition.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.editors.win32.ole;
13
14 import org.eclipse.swt.ole.win32.OleAutomation;
15 import org.eclipse.swt.ole.win32.OleClientSite;
16 import org.eclipse.swt.ole.win32.OleFrame;
17
18 /**
19  * Embedding for Windows Picture and Fax Preview
20  * 
21  * @author Marko Luukkainen <marko.luukkainen@vtt.fi>
22  *
23  */
24 public class PreviewDefinition implements EditorDefinition{
25         
26         @Override
27         public OleController createController(OleFrame frame, OleClientSite site,
28                         OleAutomation auto) {
29                 return new PreviewController(frame,site,auto);
30         }
31         
32         @Override
33         public String getProgID() {
34                 return "Preview.Preview";
35         }
36         
37         @Override
38         public boolean supportSuffix(String suffix) {
39                 if (suffix.equals("png"))
40                         return true;
41                 if (suffix.equals("jpg"))
42                         return true;
43                 if (suffix.equals("bmp"))
44                         return true;
45                 return false;
46         }
47         
48         @Override
49         public boolean useBrowser() {
50                 return false;
51         }
52         
53         @Override
54         public boolean useFileInput() {
55                 return false;
56         }
57
58 }