< prev index next >
test/jdk/java/awt/dnd/FileListBetweenJVMsTest/FileListBetweenJVMsTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, 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) 2007, 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,62 ****
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
! test
@bug 5079469
@summary DnD of File-List across JVM adds two empty items to the list
! @author : area=dnd
! @run applet FileListBetweenJVMsTest.html
*/
- /**
- * FileListBetweenJVMsTest.java
- *
- * summary: DnD of File-List across JVM adds two empty items to the list
- */
-
import static java.lang.Thread.sleep;
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
import test.java.awt.regtesthelpers.process.ProcessResults;
import test.java.awt.regtesthelpers.Util;
- import java.applet.Applet;
import java.awt.*;
import java.awt.event.InputEvent;
- import java.io.*;
! public class FileListBetweenJVMsTest extends Applet {
// information related to the test in common
static int VISIBLE_RAWS_IN_LIST=15;
- public void init() {
- setLayout(new BorderLayout());
-
- }//End init()
-
public void start() {
SourceFileListFrame sourceFrame = new SourceFileListFrame();
Util.waitForIdle(null);
--- 20,53 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
! @test
! @key headful
@bug 5079469
@summary DnD of File-List across JVM adds two empty items to the list
! @library ../../regtesthelpers
! @library ../../regtesthelpers/process
! @build Util
! @build ProcessResults ProcessCommunicator
! @run main/othervm FileListBetweenJVMsTest main
*/
import static java.lang.Thread.sleep;
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
import test.java.awt.regtesthelpers.process.ProcessResults;
import test.java.awt.regtesthelpers.Util;
import java.awt.*;
import java.awt.event.InputEvent;
! public class FileListBetweenJVMsTest {
// information related to the test in common
static int VISIBLE_RAWS_IN_LIST=15;
public void start() {
SourceFileListFrame sourceFrame = new SourceFileListFrame();
Util.waitForIdle(null);
*** 128,138 ****
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));
int transferredFilesNumber = InterprocessArguments.FILES_IN_THE_LIST_NUMBER_ARGUMENT.extract(args);
--- 119,133 ----
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 FileListBetweenJVMsTest().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));
int transferredFilesNumber = InterprocessArguments.FILES_IN_THE_LIST_NUMBER_ARGUMENT.extract(args);
< prev index next >