Class ComponentKeyListener.Adapter

  • All Implemented Interfaces:
    ComponentKeyListener
    Enclosing interface:
    ComponentKeyListener

    @Deprecated
    public static class ComponentKeyListener.Adapter
    extends java.lang.Object
    implements ComponentKeyListener
    Deprecated.
    Since 2.1 and Java 8 the interface itself has default implementations.
    Component key listener adapter.
    • Constructor Detail

      • Adapter

        public Adapter()
        Deprecated.
    • Method Detail

      • keyTyped

        public boolean keyTyped​(Component component,
                                char character)
        Deprecated.
        Description copied from interface: ComponentKeyListener
        Called when a key has been typed.
        Specified by:
        keyTyped in interface ComponentKeyListener
        Parameters:
        component - Component that has the focus, that is receiving this key.
        character - The decoded character that was typed.
        Returns:
        true to consume the event; false to allow it to propagate.
      • keyPressed

        public boolean keyPressed​(Component component,
                                  int keyCode,
                                  Keyboard.KeyLocation keyLocation)
        Deprecated.
        Description copied from interface: ComponentKeyListener
        Called when a key has been pressed.
        Specified by:
        keyPressed in interface ComponentKeyListener
        Parameters:
        component - Component that has the focus.
        keyCode - The key code for the key that was pressed.
        keyLocation - Location value for the key (left or right for shift keys, etc.).
        Returns:
        true to consume the event; false to allow it to propagate.
      • keyReleased

        public boolean keyReleased​(Component component,
                                   int keyCode,
                                   Keyboard.KeyLocation keyLocation)
        Deprecated.
        Description copied from interface: ComponentKeyListener
        Called when a key has been released.
        Specified by:
        keyReleased in interface ComponentKeyListener
        Parameters:
        component - Component that has the focus, that is receiving this key event.
        keyCode - Code for the key that was released.
        keyLocation - Location of the key.
        Returns:
        true to consume the event; false to allow it to propagate.