]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/dnd/ElementClassTransfer.java
Two rendering glitch fixes for time series charts
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / dnd / ElementClassTransfer.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.g2d.dnd;
13
14 import org.eclipse.swt.dnd.ByteArrayTransfer;
15 import org.eclipse.swt.dnd.TransferData;
16
17 /**
18  * Unusable - ElementClass is not serializable
19  *
20  * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
21  */
22 public class ElementClassTransfer extends ByteArrayTransfer {
23
24         private static final String TYPE_NAME = "Element Class";
25         private static final int TYPE_ID = registerType ( "JAVA_DATAFLAVOR:" + TYPE_NAME );
26     public static final ElementClassTransfer INSTANCE = new ElementClassTransfer();
27         
28         protected int[] getTypeIds() {
29                 return new int[] { TYPE_ID };
30         }
31
32         @Override
33         protected String[] getTypeNames() {
34                 return new String[] { TYPE_NAME };
35         }
36
37         @Override
38         protected Object nativeToJava(TransferData transferData) {
39                 return super.nativeToJava(transferData);
40         }
41         
42         @Override
43         protected void javaToNative(Object object, TransferData transferData) {
44                 super.javaToNative(object, transferData);
45         }
46         
47 }
48