18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
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.datatransfer;
27
28 import java.awt.datatransfer.DataFlavor;
29 import java.awt.datatransfer.FlavorMap;
30 import java.util.LinkedHashSet;
31 import java.util.function.Supplier;
32
33 /**
34 * Contains services which desktop provides to the datatransfer system
35 * to enrich it's functionality
36 *
37 * @author Petr Pchelko
38 * @since 1.9
39 */
40 public interface DesktopDatatransferService {
41
42 /**
43 * If desktop is present - invokes a {@code Runnable} on
44 * the event dispatch thread. Otherwise invokes a {@code run()}
45 * method directly.
46 *
47 * @param r a {@code Runnable} to invoke
48 */
49 void invokeOnEventThread(Runnable r);
50
51 /**
52 * Get a platform-dependent default unicode encoding to use in
53 * datatransfer system.
54 *
55 * @return default unicode encoding
56 */
57 String getDefaultUnicodeEncoding();
58
|
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
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.datatransfer;
27
28 import java.awt.datatransfer.DataFlavor;
29 import java.awt.datatransfer.FlavorMap;
30 import java.util.LinkedHashSet;
31 import java.util.function.Supplier;
32
33 /**
34 * Contains services which desktop provides to the datatransfer system
35 * to enrich it's functionality
36 *
37 * @author Petr Pchelko
38 * @since 9
39 */
40 public interface DesktopDatatransferService {
41
42 /**
43 * If desktop is present - invokes a {@code Runnable} on
44 * the event dispatch thread. Otherwise invokes a {@code run()}
45 * method directly.
46 *
47 * @param r a {@code Runnable} to invoke
48 */
49 void invokeOnEventThread(Runnable r);
50
51 /**
52 * Get a platform-dependent default unicode encoding to use in
53 * datatransfer system.
54 *
55 * @return default unicode encoding
56 */
57 String getDefaultUnicodeEncoding();
58
|