Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement