< prev index next >

test/java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java

Print this page
rev 14989 : 8160974: [TESTBUG] Mark more headful tests with @key headful.


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 
  24 import java.awt.*;
  25 import java.awt.event.KeyEvent;
  26 
  27 /*
  28   @test

  29   @summary verify LOCK buttons toogle
  30   @author Yuri.Nesterenko, Dmitriy.Ermashov
  31   @library ../../../../lib/testlibrary
  32   @build ExtendedRobot
  33   @run main LockingKeyStateTest
  34 */
  35 
  36 public class LockingKeyStateTest {
  37 
  38     Frame frame;
  39     ExtendedRobot robot;
  40 
  41     // Note that Kana lock you may actually toggle only if you have one.
  42     static int[] lockingKeys = { KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_NUM_LOCK,
  43             KeyEvent.VK_SCROLL_LOCK, KeyEvent.VK_KANA_LOCK };
  44     boolean[] getSupported = new boolean[lockingKeys.length];
  45     boolean[] setSupported = new boolean[lockingKeys.length];
  46     boolean[] state0 = new boolean[lockingKeys.length];
  47 
  48     Toolkit toolkit = Toolkit.getDefaultToolkit();




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 
  24 import java.awt.*;
  25 import java.awt.event.KeyEvent;
  26 
  27 /*
  28   @test
  29   @key headful
  30   @summary verify LOCK buttons toogle
  31   @author Yuri.Nesterenko, Dmitriy.Ermashov
  32   @library ../../../../lib/testlibrary
  33   @build ExtendedRobot
  34   @run main LockingKeyStateTest
  35 */
  36 
  37 public class LockingKeyStateTest {
  38 
  39     Frame frame;
  40     ExtendedRobot robot;
  41 
  42     // Note that Kana lock you may actually toggle only if you have one.
  43     static int[] lockingKeys = { KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_NUM_LOCK,
  44             KeyEvent.VK_SCROLL_LOCK, KeyEvent.VK_KANA_LOCK };
  45     boolean[] getSupported = new boolean[lockingKeys.length];
  46     boolean[] setSupported = new boolean[lockingKeys.length];
  47     boolean[] state0 = new boolean[lockingKeys.length];
  48 
  49     Toolkit toolkit = Toolkit.getDefaultToolkit();


< prev index next >