1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g2d.dnd;
14 import org.eclipse.swt.dnd.ByteArrayTransfer;
15 import org.eclipse.swt.dnd.TransferData;
18 * Unusable - ElementClass is not serializable
20 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
22 public class ElementClassTransfer extends ByteArrayTransfer {
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();
28 protected int[] getTypeIds() {
29 return new int[] { TYPE_ID };
33 protected String[] getTypeNames() {
34 return new String[] { TYPE_NAME };
38 protected Object nativeToJava(TransferData transferData) {
39 return super.nativeToJava(transferData);
43 protected void javaToNative(Object object, TransferData transferData) {
44 super.javaToNative(object, transferData);