test/jdk/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java
author jdv
Wed, 15 May 2019 10:10:53 +0530
branchmetal-prototype-branch
changeset 57357 f3beca8f19fc
parent 47216 71c04702a3d5
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20167
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     1
/*
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     4
 *
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     8
 *
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    13
 * accompanied this code).
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    14
 *
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    18
 *
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    21
 * questions.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    22
 */
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    23
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    24
/*
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    25
  test
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    26
  @bug 6384984 8004032
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    27
  @summary TrayIcon try to dispay a tooltip when is not visible
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    28
  @author Dmitry.Cherepanov@sun.com area=awt.tray
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    29
  @run applet/manual=yesno ShowAfterDisposeTest.html
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    30
*/
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    31
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    32
import java.applet.*;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    33
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    34
import java.awt.*;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    35
import java.awt.event.*;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    36
import java.awt.image.*;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    37
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    38
public class ShowAfterDisposeTest extends Applet
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    39
{
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    40
    boolean traySupported;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    41
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    42
    public void init()
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    43
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    44
        this.setLayout (new BorderLayout ());
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    45
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    46
        String[] instructions;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    47
        traySupported = SystemTray.isSupported();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    48
        if (traySupported)
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    49
        {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    50
            String[] s =
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    51
            {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    52
                "1) When the test starts an icon is added to the SystemTray area.",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    53
                "2a) If you use Apple OS X,",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    54
                "    right click on this icon (it's important to click before the tooltip is shown).",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    55
                "    The icon should disappear.",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    56
                "2b) If you use other os (Windows, Linux, Solaris),",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    57
                "    double click on this icon (it's important to click before the tooltip is shown).",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    58
                "    The icon should disappear.",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    59
                "3) If the bug is reproducible then the test will fail without assistance.",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    60
                "4) Just press the 'pass' button."
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    61
            };
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    62
            instructions = s;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    63
        }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    64
        else
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    65
        {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    66
            String[] s =
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    67
            {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    68
              "The test cannot be run because SystemTray is not supported.",
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    69
              "Simply press PASS button."
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    70
            };
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    71
            instructions = s;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    72
        }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    73
        Sysout.createDialogWithInstructions(instructions);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    74
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    75
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    76
    public void start ()
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    77
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    78
        setSize (200,200);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    79
        setVisible(true);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    80
        validate();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    81
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    82
        if (!traySupported)
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    83
        {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    84
            return;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    85
        }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    86
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    87
        BufferedImage img = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    88
        Graphics g = img.createGraphics();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    89
        g.setColor(Color.WHITE);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    90
        g.fillRect(0, 0, 32, 32);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    91
        g.setColor(Color.RED);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    92
        g.fillRect(6, 6, 20, 20);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    93
        g.dispose();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    94
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    95
        final SystemTray tray = SystemTray.getSystemTray();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    96
        final TrayIcon icon = new TrayIcon(img);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    97
        icon.setImageAutoSize(true);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    98
        icon.addActionListener(new ActionListener()
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
    99
            {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   100
                public void actionPerformed(ActionEvent ev)
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   101
                {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   102
                    tray.remove(icon);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   103
                }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   104
            }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   105
        );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   106
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   107
        try {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   108
            tray.add(icon);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   109
        } catch (AWTException e) {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   110
            Sysout.println(e.toString());
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   111
            Sysout.println("!!! The test coudn't be performed !!!");
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   112
            return;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   113
        }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   114
        icon.setToolTip("tooltip");
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   115
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   116
}
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   117
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   118
/****************************************************
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   119
 Standard Test Machinery
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   120
 DO NOT modify anything below -- it's a standard
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   121
  chunk of code whose purpose is to make user
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   122
  interaction uniform, and thereby make it simpler
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   123
  to read and understand someone else's test.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   124
 ****************************************************/
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   125
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   126
/**
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   127
 This is part of the standard test machinery.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   128
 It creates a dialog (with the instructions), and is the interface
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   129
  for sending text messages to the user.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   130
 To print the instructions, send an array of strings to Sysout.createDialog
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   131
  WithInstructions method.  Put one line of instructions per array entry.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   132
 To display a message for the tester to see, simply call Sysout.println
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   133
  with the string to be displayed.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   134
 This mimics System.out.println but works within the test harness as well
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   135
  as standalone.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   136
 */
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   137
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   138
class Sysout
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   139
{
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   140
    private static TestDialog dialog;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   141
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   142
    public static void createDialogWithInstructions( String[] instructions )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   143
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   144
        dialog = new TestDialog( new Frame(), "Instructions" );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   145
        dialog.printInstructions( instructions );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   146
        dialog.setVisible(true);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   147
        println( "Any messages for the tester will display here." );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   148
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   149
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   150
    public static void createDialog( )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   151
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   152
        dialog = new TestDialog( new Frame(), "Instructions" );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   153
        String[] defInstr = { "Instructions will appear here. ", "" } ;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   154
        dialog.printInstructions( defInstr );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   155
        dialog.setVisible(true);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   156
        println( "Any messages for the tester will display here." );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   157
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   158
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   159
    public static void printInstructions( String[] instructions )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   160
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   161
        dialog.printInstructions( instructions );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   162
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   163
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   164
    public static void println( String messageIn )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   165
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   166
        dialog.displayMessage( messageIn );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   167
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   168
}
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   169
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   170
/**
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   171
  This is part of the standard test machinery.  It provides a place for the
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   172
   test instructions to be displayed, and a place for interactive messages
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   173
   to the user to be displayed.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   174
  To have the test instructions displayed, see Sysout.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   175
  To have a message to the user be displayed, see Sysout.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   176
  Do not call anything in this dialog directly.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   177
  */
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   178
class TestDialog extends Dialog
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   179
{
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   180
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   181
    TextArea instructionsText;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   182
    TextArea messageText;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   183
    int maxStringLength = 80;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   184
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   185
    //DO NOT call this directly, go through Sysout
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   186
    public TestDialog( Frame frame, String name )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   187
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   188
        super( frame, name );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   189
        int scrollBoth = TextArea.SCROLLBARS_BOTH;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   190
        instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   191
        add( "North", instructionsText );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   192
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   193
        messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   194
        add("Center", messageText);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   195
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   196
        pack();
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   197
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   198
        setVisible(true);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   199
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   200
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   201
    //DO NOT call this directly, go through Sysout
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   202
    public void printInstructions( String[] instructions )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   203
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   204
        //Clear out any current instructions
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   205
        instructionsText.setText( "" );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   206
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   207
        //Go down array of instruction strings
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   208
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   209
        String printStr, remainingStr;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   210
        for( int i=0; i < instructions.length; i++ )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   211
        {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   212
            //chop up each into pieces maxSringLength long
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   213
            remainingStr = instructions[ i ];
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   214
            while( remainingStr.length() > 0 )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   215
            {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   216
                //if longer than max then chop off first max chars to print
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   217
                if( remainingStr.length() >= maxStringLength )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   218
                {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   219
                    //Try to chop on a word boundary
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   220
                    int posOfSpace = remainingStr.
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   221
                        lastIndexOf( ' ', maxStringLength - 1 );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   222
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   223
                    if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   224
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   225
                    printStr = remainingStr.substring( 0, posOfSpace + 1 );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   226
                    remainingStr = remainingStr.substring( posOfSpace + 1 );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   227
                }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   228
                //else just print
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   229
                else
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   230
                {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   231
                    printStr = remainingStr;
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   232
                    remainingStr = "";
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   233
                }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   234
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   235
                instructionsText.append( printStr + "\n" );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   236
            }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   237
        }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   238
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   239
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   240
    //DO NOT call this directly, go through Sysout
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   241
    public void displayMessage( String messageIn )
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   242
    {
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   243
        messageText.append( messageIn + "\n" );
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   244
        System.out.println(messageIn);
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   245
    }
341d5373a64e 8004032: [TEST_BUG] [macosx] There is no effect when double clicking on the Icon, after right clicking on the Icon and the Icon disappear
kshefov
parents:
diff changeset
   246
}