KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jnlp > ClipboardService


1 /*
2  * @(#)ClipboardService.java 1.10 04/03/12
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.jnlp;
9
10 import java.awt.datatransfer.Transferable;
11
12 /**
13  * <code>ClipboardService</code> provides methods for accessing
14  * the shared system-wide clipboard, even for applications that
15  * are running in the untrusted execution environment.
16  * Implementors should warn the user of the potential security
17  * risk of letting an untrusted application have access to
18  * potentially confidential information stored in the clipboard,
19  * or overwriting the contents of the clipboard.
20  *
21  * @since 1.0
22  */

23
24 public interface ClipboardService {
25
26   /**
27    * Returns a <code>Transferable</code> object representing
28    * the current contents of the clipboard. If the clipboard
29    * currently has no contents, it returns null.
30    *
31    * @return The current <code>Transferable</code> object on
32    * the clipboard.
33    */

34   public Transferable getContents();
35
36   /**
37    * Sets the current contents of the clipboard to the specified
38    * <code>Transferable</code> object.
39    *
40    * @param contents The <code>Transferable</code> object
41    * representing clipboard content.
42    */

43   public void setContents(Transferable contents);
44
45 }
46
Popular Tags