public class ClipboardAssistance extends Object
Constructor and Description |
---|
ClipboardAssistance(String cipboardName)
Creates clipboard with mentioned name
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(int action)
Called by system and notifies about successful data transfer.
|
void |
close()
Close the notification channel
|
void |
contentChanged()
Called by system and notifies that data set in shared buffer were changed
|
void |
emptyCache()
Cleans the local cache.
|
void |
flush()
Synchronize prepared dataset with local/global clipboard content.
|
Object |
getData(String mimeType)
Returns the data from clipboard by mime type key.
|
String[] |
getMimeTypes() |
int |
getSupportedSourceActions()
Gets the actions that are supported by source.
|
boolean |
isCacheEmpty() |
void |
setData(String mimeType,
Object data)
Fills the cache by a new (mime type, data) pair.
|
void |
setSupportedActions(int supportedActions)
Sets the actions that are supported by source.
|
void |
setTargetAction(int actionDone)
Sets the action that clipboard target performed of DnD target can.
|
String |
toString() |
public ClipboardAssistance(String cipboardName)
cipboardName
- the clipboard namepublic void close()
public void flush()
public void emptyCache()
public boolean isCacheEmpty()
public void setData(String mimeType, Object data)
mimeType
- data
- public Object getData(String mimeType)
mimeType
- public void setSupportedActions(int supportedActions)
supportedActions
- combination of Clipboard.ACTION_XXXX constantspublic int getSupportedSourceActions()
public void setTargetAction(int actionDone)
actionDone
- Clipboard.ACTION_COPY, or Clipboard.ACTION_MOVE, or Clipboard.ACTION_REFERENCEpublic void contentChanged()
public void actionPerformed(int action)
action
- Clipboard.ACTION_COPY, or Clipboard.ACTION_MOVE, or Clipboard.ACTION_REFERENCEpublic String[] getMimeTypes()
Copyright © 2020. All rights reserved.