public class ClipboardState extends Object
Constructor and Description |
---|
ClipboardState() |
Modifier and Type | Method and Description |
---|---|
void |
append(byte[] data)
Appends the given data to the clipboard contents.
|
void |
begin(String mimetype)
Begins a new update of the clipboard contents.
|
void |
commit()
Commits the pending contents to the clipboard, notifying any threads
waiting for clipboard updates.
|
byte[] |
getContents()
Returns the current clipboard contents.
|
String |
getMimetype()
Returns the mimetype of the current clipboard contents.
|
boolean |
waitForContents(int timeout)
Wait up to the given timeout for new clipboard data.
|
public byte[] getContents()
public String getMimetype()
public void begin(String mimetype)
mimetype
- The mimetype of the contents being added.public void append(byte[] data)
data
- The raw data to append.public void commit()
public boolean waitForContents(int timeout)
timeout
- The amount of time to wait, in milliseconds.Copyright © 2017. All rights reserved.