Interface Focusable

  • All Implemented Interfaces:

    
    public interface Focusable
    
                        

    implement this in order to receive focus event, such as key presses

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean accept(FocusedEvent event) Accept a FocusedEvent and handle it.
      Unit accept(Integer key, Boolean down) Accept a non-mapped key press.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • accept

         Unit accept(Integer key, Boolean down)

        Accept a non-mapped key press. This is called when any key is pressed that is not a mapped key.

        This method should not really be used in normal usage, as it is effectively platform-dependent. It is provided for usage where you need to use a key that is not mapped by PolyUI, such as keybindings.

        See PolyUI.getKeyName to get the name of the key.