Package org.eclipse.swt.dnd

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


      return;
    Clipboard clipboard = new Clipboard(getDisplay());
    Object[] o = new Object[] { getSelectionText() };
    Transfer[] t = new Transfer[] { TextTransfer.getInstance() };
    clipboard.setContents(o, t);
    clipboard.dispose();
  }

  /**
   * Returns the reference of the hyperlink that currently has keyboard focus,
   * or <code>null</code> if there are no hyperlinks in the receiver or no
View Full Code Here


        // if selected from the menu, check selection
        checkSelection(resultTable);
      }
      Clipboard clipboard = new Clipboard(event.display);
      clipboard.setContents(new Object[] {resultTable.getItem(resultTable.getSelectionIndex()).getText()}, new Transfer[] {TextTransfer.getInstance()});
      clipboard.dispose();
    }
  }
 
  public static final class CopyIPDetails implements Listener {
    private final ResultTable resultTable;
View Full Code Here

    public void handleEvent(Event event) {
      checkSelection(resultTable);
      Clipboard clipboard = new Clipboard(event.display);
      clipboard.setContents(new Object[] {resultTable.getSelectedResult().toString()}, new Transfer[] {TextTransfer.getInstance()});
      clipboard.dispose();
    }
  }
 
  public static final class ShowOpenersMenu implements Listener {
   
View Full Code Here

            processor.doReplace(selection, toInsert);
          } catch (BadLocationException x) {
            if (TRACE_ERRORS)
              System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.paste")); //$NON-NLS-1$
          } finally {
            clipboard.dispose();
          }
        }
      });
    }
    Point selection= fTextWidget.getSelectionRange();
View Full Code Here

      return;
    Clipboard clipboard = new Clipboard(getDisplay());
    Object[] o = new Object[] { getSelectionText() };
    Transfer[] t = new Transfer[] { TextTransfer.getInstance() };
    clipboard.setContents(o, t);
    clipboard.dispose();
  }

  /**
   * Returns the reference of the hyperlink that currently has keyboard focus,
   * or <code>null</code> if there are no hyperlinks in the receiver or no
View Full Code Here

           */
          return;
        }

      } finally {
        clipboard.dispose();
      }
    }

    if (delete) {
      try {
View Full Code Here

          if (template != null)
            insertTemplate(template);
          else
            fEditorOldPasteAction.run();
        } finally {
          clipboard.dispose();
        }
      }

      public void runWithEvent(Event event) {
        run();
View Full Code Here

          }
          TemplatePersistenceData[] templates= (TemplatePersistenceData[])clipboard.getContents(TemplatesTransfer.getInstance());
          if (templates != null)
            copyTemplates(templates, getContextTypeId());
        } finally {
          clipboard.dispose();
        }

      }
    };
View Full Code Here

      public void run() {
        Clipboard clipboard= new Clipboard(getShell().getDisplay());
        try {
          clipboard.setContents(new Object[] { getSelectedTemplates() }, new Transfer[] { TemplatesTransfer.getInstance() });
        } finally {
          clipboard.dispose();
        }
      }
    };
  }
View Full Code Here

    Display display = Display.getDefault();
    Clipboard clipboard = new Clipboard(display);
    TextTransfer textTransfer = TextTransfer.getInstance();
    clipboard.setContents(new Object[] { clipboardContent },
        new Transfer[] { textTransfer });
    clipboard.dispose();
  }

  /**
   * {@inheritDoc}
   *
 
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.