21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.awt.X11;
27
28 import java.awt.datatransfer.DataFlavor;
29 import java.awt.datatransfer.Transferable;
30
31 import java.io.ByteArrayOutputStream;
32 import java.io.IOException;
33
34 import java.util.Hashtable;
35 import java.util.Map;
36
37 import sun.awt.AppContext;
38 import sun.awt.SunToolkit;
39 import sun.awt.UNIXToolkit;
40
41 import sun.awt.datatransfer.DataTransferer;
42
43 /**
44 * A class which interfaces with the X11 selection service.
45 */
46 public final class XSelection {
47
48 /* Maps atoms to XSelection instances. */
49 private static final Hashtable<XAtom, XSelection> table = new Hashtable<XAtom, XSelection>();
50 /* Prevents from parallel selection data request processing. */
51 private static final Object lock = new Object();
52 /* The property in which the owner should place the requested data. */
53 private static final XAtom selectionPropertyAtom = XAtom.get("XAWT_SELECTION");
54 /* The maximal length of the property data. */
55 public static final long MAX_LENGTH = 1000000;
56 /*
57 * The maximum data size for ChangeProperty request.
58 * 100 is for the structure prepended to the request.
59 */
60 public static final int MAX_PROPERTY_SIZE;
61 static {
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.awt.X11;
27
28 import java.awt.datatransfer.DataFlavor;
29 import java.awt.datatransfer.Transferable;
30
31 import java.io.ByteArrayOutputStream;
32 import java.io.IOException;
33
34 import java.util.Hashtable;
35 import java.util.Map;
36
37 import sun.awt.AppContext;
38 import sun.awt.SunToolkit;
39 import sun.awt.UNIXToolkit;
40
41 import sun.awt.datatransfer.desktop.DataTransferer;
42
43 /**
44 * A class which interfaces with the X11 selection service.
45 */
46 public final class XSelection {
47
48 /* Maps atoms to XSelection instances. */
49 private static final Hashtable<XAtom, XSelection> table = new Hashtable<XAtom, XSelection>();
50 /* Prevents from parallel selection data request processing. */
51 private static final Object lock = new Object();
52 /* The property in which the owner should place the requested data. */
53 private static final XAtom selectionPropertyAtom = XAtom.get("XAWT_SELECTION");
54 /* The maximal length of the property data. */
55 public static final long MAX_LENGTH = 1000000;
56 /*
57 * The maximum data size for ChangeProperty request.
58 * 100 is for the structure prepended to the request.
59 */
60 public static final int MAX_PROPERTY_SIZE;
61 static {
|