|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.Clipboard
Provides a global clipboard for cut and paste operations.
// Retrieve the Clipboard object. Clipboard cp = Clipboard.getClipboard(); // Copy to clipboard. cp.put(str); // Retrieve the clipboard's current contents String str = (String) cp.get(); // Clean the clipboard. cp.put(null);
| Method Summary | ||
Object |
get()
Retrieves the clipboard's current contents. |
|
static Clipboard |
getClipboard()
Retrieves the system's clipboard object. |
|
Object |
put(Object o)
Copies an object to the clipboard. |
|
String |
toString()
Retrieves string equivalent of clipboard's contents. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public Object get()
Notice that this get is not destructive: the clipboard remains loaded with this object until a new one gets put to replace it.
public static Clipboard getClipboard()
public Object put(Object o)
This operation replaces the existing object with your new one. Accordingly, you can clear out the clipboard by passing null into this method.
Note: This method throws a SecurityException if
third-party applications provide an object other than a String or
StringBuffer as parameter to this method.
o - New object to put on the clipboard.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.