Package org.eclipse.swt.dnd

Examples of org.eclipse.swt.dnd.Clipboard.clearContents()


     * a deadlock during opening an OpenOffice.org document.
     */
    Clipboard clipboard = new Clipboard(Display.getCurrent());
    if(clipboard.getAvailableTypeNames().length != 0) {     
      clipboard.setContents(new Object[] {" "}, new Transfer[] {TextTransfer.getInstance()}); //$NON-NLS-1$
      clipboard.clearContents();
    }
    clipboard.dispose();
    /**
     * XXX: End.
     */
 
View Full Code Here


    waitInUI();
    Display.getDefault().syncExec(new Runnable() {

      public void run() {
        Clipboard clp = new Clipboard(Display.getCurrent());
        clp.clearContents();
        clp.setContents(new Object[] { "x" },
            new TextTransfer[] { TextTransfer.getInstance() });
        String value = (String) clp.getContents(TextTransfer
            .getInstance());
        assertEquals("Clipboard content should be x", "x", value);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.