src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorTable.java
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 47216 71c04702a3d5
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.awt.datatransfer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * symmetric, but typically are.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @author David Mendenhall
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
public interface FlavorTable extends FlavorMap {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    List<String> getNativesForFlavor(DataFlavor flav);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    List<DataFlavor> getFlavorsForNative(String nat);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
}