Interface IFocusListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IFocusListener
The focus listener interface that is called when the focus engine changes focus component.

Focus processing is done in the following order:

  1. Focus is changed in the focus engine without notification, i.e. the call to IFocusEngine.getCurrentFocus() will reflect the new focus component,
     
  2. If the receiving focus component is non-null: focus veto processing using the focus listeners registered in the IFocusEngine using the IFocusVetoListener interface. If the FocusVetoException is thrown, the original focus is restored in the focus engine without notification.
     
  3. Focus lost sent to the component losing focus using method IFocusComp.onFocusLost(IFocusComp, IGProp, boolean) in the event FocusEvent.
     
  4. Focus lost is notified in a bubbling event PropFocusEvent to the component losing focus and its parents. with PropFocusEvent.isFocusLost() true.
     
  5. Focus lost is notified in a sinking event PropCnrFocusEvent to the component losing focus and its descendants with PropCnrFocusEvent.isFocusLost() true.
     
  6. Focus change sent to the focus listeners registered in the IFocusEngine using onFocusChanged(FocusEvent).
     
  7. Focus gained sent to the component gaining focus using method IFocusComp.onFocusGained(IFocusComp, IGProp, boolean) in the event FocusEvent.
     
  8. Focus gained is notified in a bubbling event PropFocusEvent to the component gaining focus and its parents. with PropFocusEvent.isFocusGained() true.
     
  9. Focus gained is notified in a sinking event PropCnrFocusEvent to the component gaining focus and its descendants with PropCnrFocusEvent.isFocusGained() true.
     
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the focus is changed.
  • Method Details

    • onFocusChanged

      void onFocusChanged(FocusEvent event)
      Called when the focus is changed.
      Parameters:
      event - The focus event.