Set up eventbus system
This commit is contained in:
@@ -3,15 +3,27 @@ package app.controllers;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
|
||||
import app.model.Model;
|
||||
import javafx.fxml.Initializable;
|
||||
|
||||
public class MenubarController implements Initializable {
|
||||
public class MenubarController implements Initializable, Controller {
|
||||
|
||||
// TODO: Add component references, and event handlers
|
||||
|
||||
private EventBus eventBus;
|
||||
private Model model;
|
||||
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEventBus(EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
this.eventBus.register(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Links the controller to the global model
|
||||
* @param model The model to be linked
|
||||
@@ -20,12 +32,5 @@ public class MenubarController implements Initializable {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes and customizes the properties of the javafx objects.
|
||||
*/
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user