WIP desktop client for Chatto reimplemented in ScalaFX and Sapphire Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
892 B

4 years ago
  1. package wow.doge.chatto.controller
  2. import com.sfxcode.sapphire.core.controller.ViewController
  3. import com.typesafe.scalalogging.LazyLogging
  4. import wow.doge.chatto.ApplicationController
  5. abstract class AbstractViewController extends ViewController with LazyLogging {
  6. override def didGainVisibility(): Unit = {
  7. statusBarController.statusLabel.setText(
  8. "%s loaded".format(getClass.getSimpleName)
  9. )
  10. }
  11. def applicationController: ApplicationController = {
  12. getBean[ApplicationController]()
  13. }
  14. def mainViewController: MainViewController =
  15. applicationController.mainViewController
  16. /**
  17. *
  18. * @return
  19. */
  20. def statusBarController = getBean[StatusBarController]()
  21. /**
  22. *
  23. * @return workspace manager resolved by parent
  24. */
  25. def workspaceManager = mainViewController.workspaceManager
  26. // def loginManager = mainViewController.loginManager
  27. }