LostFocusListener.java 392 B

1234567891011121314151617181920
  1. package holeg.utility.listener;
  2. import java.awt.event.FocusEvent;
  3. import java.awt.event.FocusListener;
  4. /**
  5. * A functional interface to streamline lost focus events.
  6. */
  7. @FunctionalInterface
  8. public interface LostFocusListener extends FocusListener {
  9. void update(FocusEvent e);
  10. default void focusGained(FocusEvent e) {
  11. }
  12. default void focusLost(FocusEvent e) {
  13. update(e);
  14. }
  15. }