Interface Focusable

All Known Implementing Classes:
SimpleListModel

public interface Focusable
   Ability to focus view. Mostly used to focus detail view in list-detail view pattern.
   First set setOnFocusView which will be used when calling focusView.
 
   class FocusableImpl implements Focusable {
     private Runnable onFocusView;

     public void focusView() {
       if (onFocusView != null) {
         onFocusView.run();
       }
     }

     public void setOnFocusView(Runnable command) {
       onFocusView = command;
     }
   }
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Runs predefined runnable.
    void
    Sets runnable command which should be executed in focusView.
  • Method Details

    • focusView

      void focusView()
      Runs predefined runnable.
    • setOnFocusView

      void setOnFocusView(Runnable command)
      Sets runnable command which should be executed in focusView.