2362N/A * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 2129N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2129N/A * This code is free software; you can redistribute it and/or modify it 2129N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 2129N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 2129N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2129N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2129N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2129N/A * version 2 for more details (a copy is included in the LICENSE file that 2129N/A * You should have received a copy of the GNU General Public License version 2129N/A * 2 along with this work; if not, write to the Free Software Foundation, 2129N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 2129N/A @summary Tests basic DnD functionality 2129N/A @author Your Name: Alexey Utkin area=dnd 2129N/A //Declare things used in the test, like buttons and labels here 2129N/A //Create instructions for the user here, as well as set up 2129N/A // the environment -- set the layout manager, add buttons, 2129N/A "A Frame, which contains a yellow button labeled \"Drag ME!\" and ",
2129N/A "a red panel, will appear below. ",
2129N/A "1. The button would be clicked and dragged to the red panel. ",
2129N/A "2. When the mouse enters the red panel during the drag, the panel ",
2129N/A "should turn yellow. On the systems that supports pictured drag, ",
2129N/A "the image under the drag-cursor should appear (ancor is shifted ",
2129N/A "from top-left corner of the picture inside the picture to 10pt in both dimensions ). ",
2129N/A "In WIN32 systems the image under cursor would be visible ONLY over ",
2129N/A "the drop targets with activated extended OLE D\'n\'D support (that are ",
2129N/A "3. The mouse would be released.",
2129N/A "The panel should turn red again and a yellow button labeled ",
2129N/A "\"Drag ME!\" should appear inside the panel. You should be able ",
2129N/A "to repeat this operation multiple times." 2129N/A for(
int i =
2; i <
5; ++i){
2129N/A * ************************************************* 2129N/A * DO NOT modify anything below -- it's a standard 2129N/A * chunk of code whose purpose is to make user 2129N/A * interaction uniform, and thereby make it simpler 2129N/A * to read and understand someone else's test. 2129N/A * ************************************************** 2129N/A //DO NOT call this directly, go through Sysout 2129N/A //DO NOT call this directly, go through Sysout 2129N/A //Clear out any current instructions 2129N/A //Go down array of instruction strings 2129N/A //chop up each into pieces maxSringLength long 2129N/A //if longer than max then chop off first max chars to print 2129N/A //Try to chop on a word boundary 2129N/A //DO NOT call this directly, go through Sysout