MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / getClipboard

Method getClipboard

StickyNotes/src/com/dosse/stickynotes/Note.java:183–190  ·  view source on GitHub ↗

read contents of system clipboard @return clipboard contents

()

Source from the content-addressed store, hash-verified

181 * @return clipboard contents
182 */
183 private static String getClipboard() {
184 try {
185 Transferable contents = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
186 return (String) contents.getTransferData(DataFlavor.stringFlavor);
187 } catch (Throwable t) {
188 return null;
189 }
190 }
191
192 /**
193 * load image from classpath (it will be the jar file)

Callers 2

mouseClickedMethod · 0.95
actionPerformedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected