X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fui%2FElementClassTransferable.java;h=af5c675811bef7339d1a0108b0e401fd4426e890;hb=refs%2Fchanges%2F13%2F2213%2F1;hp=b219e52cb855b4813ac5334cb3546d1a3ebbdb40;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/ElementClassTransferable.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/ElementClassTransferable.java
index b219e52cb..af5c67581 100644
--- a/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/ElementClassTransferable.java
+++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/ui/ElementClassTransferable.java
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.diagram.ui;
-
-import java.awt.datatransfer.Clipboard;
-import java.awt.datatransfer.ClipboardOwner;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.io.IOException;
-import java.io.Serializable;
-
-public class ElementClassTransferable implements Transferable, ClipboardOwner {
-
- public static final DataFlavor FLAVOR = new DataFlavor( ResourceElementClassTransferData.class, "Element Class" );
-
- public static class ResourceElementClassTransferData implements Serializable {
- private static final long serialVersionUID = -4990050837054070697L;
- public String elementClassResourceRandomAccessReference[];
- }
-
- private ResourceElementClassTransferData data;
-
- /**
- * Creates a Transferable
capable of transferring the specified
- * String
.
- */
- public ElementClassTransferable(ResourceElementClassTransferData data) {
- this.data = data;
- }
-
- /**
- * Returns an array of flavors in which this Transferable
can
- * provide the data. DataFlavor.stringFlavor
is properly
- * supported. Support for DataFlavor.plainTextFlavor
is
- * deprecated.
- *
- * @return an array of length two, whose elements are DataFlavor.
- * stringFlavor
and DataFlavor.plainTextFlavor
- */
- public DataFlavor[] getTransferDataFlavors() {
- return new DataFlavor[] { FLAVOR };
- }
-
- public boolean isDataFlavorSupported(DataFlavor flavor) {
- return flavor.equals(FLAVOR);
- }
-
- public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
- if (flavor.equals(FLAVOR))
- return (ResourceElementClassTransferData) data;
- throw new UnsupportedFlavorException(flavor);
- }
-
- public void lostOwnership(Clipboard clipboard, Transferable contents) {
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.ui;
+
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.ClipboardOwner;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.io.Serializable;
+
+public class ElementClassTransferable implements Transferable, ClipboardOwner {
+
+ public static final DataFlavor FLAVOR = new DataFlavor( ResourceElementClassTransferData.class, "Element Class" );
+
+ public static class ResourceElementClassTransferData implements Serializable {
+ private static final long serialVersionUID = -4990050837054070697L;
+ public String elementClassResourceRandomAccessReference[];
+ }
+
+ private ResourceElementClassTransferData data;
+
+ /**
+ * Creates a Transferable
capable of transferring the specified
+ * String
.
+ */
+ public ElementClassTransferable(ResourceElementClassTransferData data) {
+ this.data = data;
+ }
+
+ /**
+ * Returns an array of flavors in which this Transferable
can
+ * provide the data. DataFlavor.stringFlavor
is properly
+ * supported. Support for DataFlavor.plainTextFlavor
is
+ * deprecated.
+ *
+ * @return an array of length two, whose elements are DataFlavor.
+ * stringFlavor
and DataFlavor.plainTextFlavor
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ return new DataFlavor[] { FLAVOR };
+ }
+
+ public boolean isDataFlavorSupported(DataFlavor flavor) {
+ return flavor.equals(FLAVOR);
+ }
+
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
+ if (flavor.equals(FLAVOR))
+ return (ResourceElementClassTransferData) data;
+ throw new UnsupportedFlavorException(flavor);
+ }
+
+ public void lostOwnership(Clipboard clipboard, Transferable contents) {
+ }
+
+}