1 11 package org.eclipse.swt.dnd; 12 13 14 28 public class TextTransfer extends ByteArrayTransfer { 29 30 private static TextTransfer _instance = new TextTransfer(); 31 private static final String TYPENAME1 = "STRING\0"; 32 private static final int TYPEID1 = registerType(TYPENAME1); 33 private static final String TYPENAME2 = "text/plain\0"; 34 private static final int TYPEID2 = registerType(TYPENAME2); 35 private static final String TYPENAME3 = "text/text\0"; 36 private static final int TYPEID3 = registerType(TYPENAME3); 37 38 private TextTransfer() { 39 } 40 45 public static TextTransfer getInstance () { 46 return _instance; 47 } 48 58 public void javaToNative (Object object, TransferData transferData){ 59 } 60 69 public Object nativeToJava(TransferData transferData){ 70 return null; 71 } 72 protected String [] getTypeNames(){ 73 return new String []{TYPENAME1, TYPENAME2, TYPENAME3}; 74 } 75 protected int[] getTypeIds(){ 76 return new int[]{TYPEID1, TYPEID2, TYPEID3}; 77 } 78 } 79 | Popular Tags |