author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
2 |
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
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 |
* |
|
5506 | 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. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.awt.datatransfer; |
|
27 |
||
28 |
import java.util.List; |
|
29 |
||
30 |
/** |
|
31 |
* A FlavorMap which relaxes the traditional 1-to-1 restriction of a Map. A |
|
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
32 |
* flavor is permitted to map to any number of natives, and likewise a native is |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
33 |
* permitted to map to any number of flavors. FlavorTables need not be |
2 | 34 |
* symmetric, but typically are. |
35 |
* |
|
36 |
* @author David Mendenhall |
|
37 |
* @since 1.4 |
|
38 |
*/ |
|
39 |
public interface FlavorTable extends FlavorMap { |
|
40 |
||
41 |
/** |
|
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
42 |
* Returns a {@code List} of {@code String} natives to which the specified |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
43 |
* {@code DataFlavor} corresponds. The {@code List} will be sorted from best |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
44 |
* native to worst. That is, the first native will best reflect data in the |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
45 |
* specified flavor to the underlying native platform. The returned |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
46 |
* {@code List} is a modifiable copy of this {@code FlavorTable}'s internal |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
47 |
* data. Client code is free to modify the {@code List} without affecting |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
48 |
* this object. |
2 | 49 |
* |
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
50 |
* @param flav the {@code DataFlavor} whose corresponding natives should be |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
51 |
* returned. If {@code null} is specified, all natives currently |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
52 |
* known to this {@code FlavorTable} are returned in a |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
53 |
* non-deterministic order. |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
54 |
* @return a {@code java.util.List} of {@code java.lang.String} objects |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
55 |
* which are platform-specific representations of platform-specific |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
56 |
* data formats |
2 | 57 |
*/ |
58 |
List<String> getNativesForFlavor(DataFlavor flav); |
|
59 |
||
60 |
/** |
|
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
61 |
* Returns a {@code List} of {@code DataFlavor}s to which the specified |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
62 |
* {@code String} corresponds. The {@code List} will be sorted from best |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
63 |
* {@code DataFlavor} to worst. That is, the first {@code DataFlavor} will |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
64 |
* best reflect data in the specified native to a Java application. The |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
65 |
* returned {@code List} is a modifiable copy of this {@code FlavorTable}'s |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
66 |
* internal data. Client code is free to modify the {@code List} without |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
67 |
* affecting this object. |
2 | 68 |
* |
45655
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
69 |
* @param nat the native whose corresponding {@code DataFlavor}s should be |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
70 |
* returned. If {@code null} is specified, all {@code DataFlavor}s |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
71 |
* currently known to this {@code FlavorTable} are returned in a |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
72 |
* non-deterministic order. |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
73 |
* @return a {@code java.util.List} of {@code DataFlavor} objects into which |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
74 |
* platform-specific data in the specified, platform-specific native |
02c95aa8a53a
8180889: Cleanup of javadoc in java.datatransfer module
serb
parents:
28987
diff
changeset
|
75 |
* can be translated |
2 | 76 |
*/ |
77 |
List<DataFlavor> getFlavorsForNative(String nat); |
|
78 |
} |