|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.datatransfer.Clipboard
public class Clipboard
This class allows data to be transferred using a cut and paste type mechanism.
| Field Summary | |
|---|---|
protected Transferable |
contents
The data currently on this clipboard. |
protected ClipboardOwner |
owner
The owner of this clipboard. |
| Constructor Summary | |
|---|---|
Clipboard(String name)
Initializes a new instance of Clipboard with the
specified name. |
|
| Method Summary | |
|---|---|
void |
addFlavorListener(FlavorListener listener)
|
DataFlavor[] |
getAvailableDataFlavors()
|
Transferable |
getContents(Object requestor)
Returns the contents of the clipboard. |
Object |
getData(DataFlavor flavor)
|
FlavorListener[] |
getFlavorListeners()
|
String |
getName()
Returns the name of the clipboard. |
boolean |
isDataFlavorAvailable(DataFlavor flavor)
|
void |
removeFlavorListener(FlavorListener listener)
|
void |
setContents(Transferable contents,
ClipboardOwner owner)
Sets the content and owner of this clipboard. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Transferable contents
protected ClipboardOwner owner
| Constructor Detail |
|---|
public Clipboard(String name)
Clipboard with the
specified name.
name - The clipboard name.| Method Detail |
|---|
public String getName()
public Transferable getContents(Object requestor)
requestor - The object requesting the contents. This
implementation ignores this parameter.
IllegalStateException - If the clipboard is currently unavailable
public void setContents(Transferable contents,
ClipboardOwner owner)
lostOwnership()
is called on the current owner with the old contents of the given
clipboard.
contents - The new clipboard contents.owner - The new clipboard owner
IllegalStateException - If the clipboard is currently unavailablepublic DataFlavor[] getAvailableDataFlavors()
public boolean isDataFlavorAvailable(DataFlavor flavor)
public Object getData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
UnsupportedFlavorException
IOExceptionpublic void addFlavorListener(FlavorListener listener)
public void removeFlavorListener(FlavorListener listener)
public FlavorListener[] getFlavorListeners()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||