Package de.t68.utils.keyboard.adapter

Examples of de.t68.utils.keyboard.adapter.JTextFieldAdapter


        @Override
        public void itemStateChanged(ItemEvent e)
        {
            for (VirtualKeyListener l : vkListener)
            {
                l.imeKeyActivated(new ImeKeyEvent(ToggleKeyboardButton.this, imeMode));
            }
        }
View Full Code Here


            @Override
            public void actionPerformed(ActionEvent e)
            {
                for (VirtualKeyListener l : vkListener)
                {
                    l.keyPressed(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_PRESSED,
                            System.currentTimeMillis(), 0, keyCode, keyChar, 0));
                    l.keyReleased(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_RELEASED,
                            System.currentTimeMillis(), 0, keyCode, keyChar, 0));
                    if (keyChar != KeyEvent.CHAR_UNDEFINED && keyCode != KeyEvent.VK_TAB
                            && keyCode != KeyEvent.VK_ENTER)
                        l.keyTyped(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_TYPED,
                                System.currentTimeMillis(), 0, KeyEvent.VK_UNDEFINED, keyChar));
                }
            }
        });
    }
View Full Code Here

        {
            if (e.getStateChange() == ItemEvent.SELECTED)
            {
                for (VirtualKeyListener l : vkListener)
                {
                    l.keyPressed(new VirtualKeyEvent(ToggleKeyboardButton.this, KeyEvent.KEY_PRESSED,
                            System.currentTimeMillis(), 0, keyCode, keyChar, 0));

                }
            } else
            {
                for (VirtualKeyListener l : vkListener)
                    l.keyReleased(new VirtualKeyEvent(ToggleKeyboardButton.this, KeyEvent.KEY_RELEASED,
                            System.currentTimeMillis(), 0, keyCode, keyChar, 0));
            }
        }
View Full Code Here

                imeButton.addItemListener(new SelectKeyboardLayout(keyboard));
                button = imeButton;
                break;
            case BACKSPACE:
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                kButton.setIcon(new Backspace(32, 32));
                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case ENTER: // Enter
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
View Full Code Here

        ToggleKeyboardButton toggleButton = null;
        switch (key.toLowerCase())
        {
            case CAPSLOCK: // Caps Look
                toggleButton = new ToggleKeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                toggleButton.setIcon(new Capslock(32, 32));
                toggleButton.addVirtualKeyListener(vkListener);
                button = toggleButton;
                break;
            case ALT: // alt
                toggleButton = new ToggleKeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
View Full Code Here

                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case ENTER: // Enter
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                kButton.setIcon(new Enter(32, 32));
                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case LEFT: // left
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
View Full Code Here

                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case LEFT: // left
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                kButton.setIcon(new Left(32, 32));
                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case RIGHT: // right
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
View Full Code Here

                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case RIGHT: // right
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                kButton.setIcon(new Right(32, 32));
                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case TAB:
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
View Full Code Here

                else
                    button.setModel(keyboard.getAltgrModel());
                break;
            case SHIFT: // left shift
                toggleButton = new ToggleKeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                toggleButton.setIcon(new Shift(32, 32));
                toggleButton.addVirtualKeyListener(vkListener);
                button = toggleButton;
                if (keyboard.getShiftModel() == null)
                    keyboard.setShiftModel(button.getModel());
                else
View Full Code Here

                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            case TAB:
                kButton = new KeyboardButton(fontName, keyFontSize, getKeyCode(), getKeyChar());
                kButton.setIcon(new Tab(32, 32));
                kButton.addVirtualKeyListener(vkListener);
                button = kButton;
                break;
            // All other special keys re
            default:
View Full Code Here

TOP

Related Classes of de.t68.utils.keyboard.adapter.JTextFieldAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.