com.badlogic.gdx.scenes.scene2d.ui.utils
Class DesktopClipboard
java.lang.Object
com.badlogic.gdx.scenes.scene2d.ui.utils.Clipboard
com.badlogic.gdx.scenes.scene2d.ui.utils.DesktopClipboard
- All Implemented Interfaces:
- java.awt.datatransfer.ClipboardOwner
public class DesktopClipboard
- extends Clipboard
- implements java.awt.datatransfer.ClipboardOwner
Implementation of the Clipboard
interface for the desktop. Uses the system clipboard via the default Toolkit
.
- Author:
- mzechner
Method Summary |
java.lang.String |
getContents()
gets the current content of the clipboard if it contains text |
void |
lostOwnership(java.awt.datatransfer.Clipboard arg0,
java.awt.datatransfer.Transferable arg1)
|
void |
setContents(java.lang.String content)
Sets the content of the system clipboard. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DesktopClipboard
public DesktopClipboard()
getContents
public java.lang.String getContents()
- Description copied from class:
Clipboard
- gets the current content of the clipboard if it contains text
- Specified by:
getContents
in class Clipboard
- Returns:
- the clipboard content or null
setContents
public void setContents(java.lang.String content)
- Description copied from class:
Clipboard
- Sets the content of the system clipboard.
- Specified by:
setContents
in class Clipboard
- Parameters:
content
- the content
lostOwnership
public void lostOwnership(java.awt.datatransfer.Clipboard arg0,
java.awt.datatransfer.Transferable arg1)
- Specified by:
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)