Tabnine Logo
ClipboardService
Code IndexAdd Tabnine to your IDE (free)

How to use
ClipboardService
in
javax.jnlp

Best Java code snippets using javax.jnlp.ClipboardService (Showing top 2 results out of 315)

origin: org.jbundle.util/org.jbundle.util.muffinmanager

/**
 * Get data from the system clipboard.
 * @return
 */
public Transferable getClipboardContents()
{
  if ((clipboardReadStatus & CLIPBOARD_DISABLED) == CLIPBOARD_DISABLED)
    return null;    // Rejected it last time, don't ask again
  clipboardReadStatus = CLIPBOARD_DISABLED;
  if (cs == null)
  {
    try {
      cs = (ClipboardService)ServiceManager.lookup("javax.jnlp.ClipboardService"); 
    } catch (UnavailableServiceException e) { 
      cs = null;
    }
  }
  if (cs != null) { 
    // get the contents of the system clipboard and print them 
    Transferable tr = cs.getContents(); 
    if (tr != null)
      clipboardReadStatus = CLIPBOARD_ENABLED;
    return tr;
  }
  return null;
}
/**
origin: org.jbundle.util/org.jbundle.util.muffinmanager

cs.setContents(data);
clipboardWriteStatus = CLIPBOARD_ENABLED;
return true;
javax.jnlpClipboardService

Most used methods

  • getContents
  • setContents

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JTextField (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now