MCPcopy Create free account
hub / github.com/demoth/jake2 / GetClipboardData

Method GetClipboardData

qcommon/src/main/java/jake2/qcommon/sys/Sys.java:224–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222 // sfranzyshen -start
223 // public static String GetClipboardData() {
224 public static String GetClipboardData() {
225 Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard()
226 .getContents(null);
227
228 try {
229 if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
230 String text = (String) t
231 .getTransferData(DataFlavor.stringFlavor);
232 return text;
233 }
234 } catch (UnsupportedFlavorException e) {
235 } catch (IOException e) {
236 }
237 return null;
238 }
239
240
241}

Callers 2

Field_KeyMethod · 0.95
ConsoleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected