< prev index next >

test/java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java

Print this page
rev 14836 : 8159690: [TESTBUG] Mark headful tests with @key headful.


  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 import java.awt.Toolkit;
  24 import java.awt.datatransfer.Clipboard;
  25 import java.awt.datatransfer.DataFlavor;
  26 import java.awt.datatransfer.SystemFlavorMap;
  27 import java.io.IOException;
  28 import java.io.Reader;
  29 import javax.swing.JLabel;
  30 import javax.swing.TransferHandler;
  31 /*
  32  * @test

  33  * @bug 8130329
  34  * @summary  Audit Core Reflection in module java.desktop AWT/Miscellaneous area
  35  *           for places that will require changes to work with modules
  36  * @author Alexander Scherbatiy
  37  */
  38 public class ConstructFlavoredObjectTest {
  39 
  40     private static final String TEST_MIME_TYPE = "text/plain;class="
  41             + MyStringReader.class.getName();
  42 
  43     public static void main(String[] args) throws Exception {
  44 
  45         final DataFlavor dataFlavor = new DataFlavor(TEST_MIME_TYPE);
  46         SystemFlavorMap systemFlavorMap = (SystemFlavorMap) SystemFlavorMap.
  47                 getDefaultFlavorMap();
  48         systemFlavorMap.addUnencodedNativeForFlavor(dataFlavor, "TEXT");
  49         systemFlavorMap.addFlavorForUnencodedNative("TEXT", dataFlavor);
  50 
  51         TransferHandler transferHandler = new TransferHandler("Test Handler");
  52 




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 import java.awt.Toolkit;
  24 import java.awt.datatransfer.Clipboard;
  25 import java.awt.datatransfer.DataFlavor;
  26 import java.awt.datatransfer.SystemFlavorMap;
  27 import java.io.IOException;
  28 import java.io.Reader;
  29 import javax.swing.JLabel;
  30 import javax.swing.TransferHandler;
  31 /*
  32  * @test
  33  * @key headful
  34  * @bug 8130329
  35  * @summary  Audit Core Reflection in module java.desktop AWT/Miscellaneous area
  36  *           for places that will require changes to work with modules
  37  * @author Alexander Scherbatiy
  38  */
  39 public class ConstructFlavoredObjectTest {
  40 
  41     private static final String TEST_MIME_TYPE = "text/plain;class="
  42             + MyStringReader.class.getName();
  43 
  44     public static void main(String[] args) throws Exception {
  45 
  46         final DataFlavor dataFlavor = new DataFlavor(TEST_MIME_TYPE);
  47         SystemFlavorMap systemFlavorMap = (SystemFlavorMap) SystemFlavorMap.
  48                 getDefaultFlavorMap();
  49         systemFlavorMap.addUnencodedNativeForFlavor(dataFlavor, "TEXT");
  50         systemFlavorMap.addFlavorForUnencodedNative("TEXT", dataFlavor);
  51 
  52         TransferHandler transferHandler = new TransferHandler("Test Handler");
  53 


< prev index next >