< prev index next >

test/jdk/java/awt/datatransfer/DragUnicodeBetweenJVMTest/DragUnicodeBetweenJVMTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,66 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 5098433 @summary REG: DnD of File-List between JVM is broken for non ASCII file names - Win32 - @author Denis Fokin: area=dnd @library ../../regtesthelpers @library ../../regtesthelpers/process @build Util @build ProcessResults ProcessCommunicator ! ! ! @run applet/othervm DragUnicodeBetweenJVMTest.html */ - /** - * DragUnicodeBetweenJVMTest.java - * - * summary: The test drags a list of files (DataFlavor.javaFileListFlavor) from one jvm to another. - * The files have Unicode names. The list on target side must be equal to - * the list on the source side. - */ - - import java.awt.*; import java.awt.event.*; - import java.applet.Applet; import test.java.awt.regtesthelpers.process.ProcessCommunicator; import test.java.awt.regtesthelpers.process.ProcessResults; import test.java.awt.regtesthelpers.Util; import static java.lang.Thread.sleep; ! public class DragUnicodeBetweenJVMTest extends Applet ! { ! ! public void init() { ! setLayout(new BorderLayout()); ! }//End init() public void start() { String toolkit = Toolkit.getDefaultToolkit().getClass().getName(); if (!toolkit.equals("sun.awt.windows.WToolkit")){ --- 20,49 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 5098433 @summary REG: DnD of File-List between JVM is broken for non ASCII file names - Win32 @library ../../regtesthelpers @library ../../regtesthelpers/process @build Util @build ProcessResults ProcessCommunicator ! @run main/othervm DragUnicodeBetweenJVMTest main */ import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.process.ProcessCommunicator; import test.java.awt.regtesthelpers.process.ProcessResults; import test.java.awt.regtesthelpers.Util; import static java.lang.Thread.sleep; ! public class DragUnicodeBetweenJVMTest { public void start() { String toolkit = Toolkit.getDefaultToolkit().getClass().getName(); if (!toolkit.equals("sun.awt.windows.WToolkit")){
*** 174,184 **** int extract (String [] args) { return Integer.parseInt(args[this.ordinal()]); } } ! public static void main (String [] args) { Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args), InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args)); Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args), InterprocessArguments.TARGET_FRAME_Y_POSITION_ARGUMENT.extract(args)); --- 157,171 ---- int extract (String [] args) { return Integer.parseInt(args[this.ordinal()]); } } ! public static void main(final String [] args) { ! if (args.length > 0 && args[0].equals("main")) { ! new DragUnicodeBetweenJVMTest().start(); ! return; ! } Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args), InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args)); Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args), InterprocessArguments.TARGET_FRAME_Y_POSITION_ARGUMENT.extract(args));
*** 186,193 **** new DragUnicodeBetweenJVMTest(targetFrameLocation, dragSourcePoint); } catch (InterruptedException e) { e.printStackTrace(); } } - - } --- 173,178 ----
< prev index next >