SHARE
TWEET

Untitled

a guest Jul 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class AccountsOverviewView {
  2.     public AccountsOverviewView(ConnectedStateNavigator navigator, ...) {
  3.         (...)
  4.         accountDetailsButton.onClick(e -> navigator.goToAccountDetails(account));
  5.         (...)
  6.     }
  7. }
  8.  
  9. public class ConnectedStateNavigator {
  10.     public ConnectedStateNavigator(ConnectedStateViewFactory viewFactory, ...) { ... }  
  11.  
  12.     public void goToAccountDetails(Account account) {
  13.         viewChanger.changeView(viewFactory.createAccountDetailsView(account));
  14.     }
  15. }
  16.  
  17. public class ConnectedStateViewFactory {
  18.     public ConnectedStateViewFactory(ConnectedStateNavigator navigator, ...) { ... }
  19.  
  20.     public View createAccountsOverviewView() {
  21.         return new AccountsOverviewView(new AccountsOverviewViewModel(navigator, ...));
  22.     }
  23.  
  24.     public View createAccountDetailsView(Account account) { ... }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top