CharBindingMap.java revision 13978:1993af50385d
1246122Shselasky/* 2184610Salfred * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 3184610Salfred * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4184610Salfred * 5184610Salfred * This code is free software; you can redistribute it and/or modify it 6184610Salfred * under the terms of the GNU General Public License version 2 only, as 7184610Salfred * published by the Free Software Foundation. 8184610Salfred * 9184610Salfred * This code is distributed in the hope that it will be useful, but WITHOUT 10184610Salfred * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11184610Salfred * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12184610Salfred * version 2 for more details (a copy is included in the LICENSE file that 13184610Salfred * accompanied this code). 14184610Salfred * 15184610Salfred * You should have received a copy of the GNU General Public License version 16184610Salfred * 2 along with this work; if not, write to the Free Software Foundation, 17184610Salfred * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18184610Salfred * 19184610Salfred * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20184610Salfred * or visit www.oracle.com if you need additional information or have any 21184610Salfred * questions. 22184610Salfred */ 23184610Salfredpackage org.netbeans.jemmy; 24184610Salfred 25184610Salfred/** 26184610Salfred * 27184610Salfred * Defines char-to-key binding. The generation of a symbol will, in general, 28184610Salfred * require modifier keys to be pressed prior to pressing a primary key. Classes 29184610Salfred * that implement {@code CharBindingMap} communicate what modifiers and 30184610Salfred * primary key are required to generate a given symbol. 31184610Salfred * 32184610Salfred * @see org.netbeans.jemmy.DefaultCharBindingMap 33190754Sthompsa * 34184610Salfred * @author Alexandre Iline (alexandre.iline@oracle.com) 35184610Salfred */ 36246122Shselaskypublic interface CharBindingMap { 37246122Shselasky 38246122Shselasky /** 39194677Sthompsa * Returns the code of the primary key used to type a symbol. 40194677Sthompsa * 41194677Sthompsa * @param c Symbol code. 42194677Sthompsa * @return a key code. 43194677Sthompsa * @see java.awt.event.InputEvent 44194677Sthompsa */ 45194677Sthompsa public int getCharKey(char c); 46194677Sthompsa 47194677Sthompsa /** 48194677Sthompsa * Returns the modifiers that should be pressed to type a symbol. 49194677Sthompsa * 50194677Sthompsa * @param c Symbol code. 51194677Sthompsa * @return a combination of InputEvent MASK fields. 52194677Sthompsa * @see java.awt.event.InputEvent 53194677Sthompsa */ 54194677Sthompsa public int getCharModifiers(char c); 55194677Sthompsa} 56194677Sthompsa