1 21 22 package swingwt.awt.datatransfer; 23 24 import org.eclipse.swt.dnd.*; 25 26 34 public class Clipboard { 35 36 private org.eclipse.swt.dnd.Clipboard clip = new org.eclipse.swt.dnd.Clipboard(swingwtx.swing.SwingWTUtils.getDisplay()); 37 38 public Clipboard() {} 39 40 public Object getContents() { 41 return clip.getContents(TextTransfer.getInstance()); 42 } 43 44 45 public void setContents(Transferable contents, ClipboardOwner owner) { 46 } 47 48 49 public Transferable getContents(Object owner) { 50 return null; 51 } 52 53 public String getName() { 54 return ""; 55 } 56 57 public void setContents(Object contents) { 58 clip.setContents(new Object [] { contents }, new Transfer[] { TextTransfer.getInstance() }); 59 } 60 61 } 62 | Popular Tags |