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.
52 lines
1.7 KiB
52 lines
1.7 KiB
package wow.doge.chatto.controller
|
|
|
|
import javafx.fxml.FXML
|
|
import javafx.scene.control.MenuBar
|
|
|
|
import com.sfxcode.sapphire.core.controller.ViewController
|
|
import com.sfxcode.sapphire.core.scene.ContentManager
|
|
import com.typesafe.scalalogging.LazyLogging
|
|
import scalafx.Includes._
|
|
import javafx.scene.layout.HBox
|
|
import javafx.scene.layout.Priority
|
|
|
|
class MainViewController extends ViewController with LazyLogging {
|
|
|
|
@FXML private var menuBar: MenuBar = _
|
|
// @FXML
|
|
// var workspacePane: Pane = _
|
|
// @FXML
|
|
// var statusPane: Pane = _
|
|
// @FXML
|
|
// var navigationPane: Pane = _
|
|
|
|
@FXML private var mainPane: HBox = _
|
|
|
|
lazy val workspaceController = getController[WorkspaceController]()
|
|
lazy val navigationController = getController[NavigationController]()
|
|
lazy val statusBarController = getBean[StatusBarController]()
|
|
lazy val loginController = getController[LoginController]()
|
|
lazy val chatController = getController[ChatController]()
|
|
|
|
var workspaceManager: ContentManager = _
|
|
var navigationManager: ContentManager = _
|
|
var statusBarManager: ContentManager = _
|
|
var mainManager: ContentManager = _
|
|
|
|
override def didGainVisibilityFirstTime() = {
|
|
menuBar.setUseSystemMenuBar(true)
|
|
// menuBar.setVisible(false)
|
|
|
|
// navigationManager =
|
|
// ContentManager(navigationPane, this, navigationController)
|
|
// statusBarManager = ContentManager(statusPane, this, statusBarController)
|
|
// workspaceManager = ContentManager(workspacePane, this, workspaceController)
|
|
mainManager = ContentManager(mainPane, this)
|
|
chatController.chatMainPane.hgrow = Priority.ALWAYS
|
|
}
|
|
|
|
def showChatController(): Unit = {
|
|
mainManager.updatePaneContent(chatController)
|
|
}
|
|
|
|
}
|