mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Replaced existing views with new views and controllers from the test repository.
Tags: #pair[mra106, ajm412] #story[1245]
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package seng302.visualiser.controllers;
|
||||
|
||||
import com.jfoenix.controls.JFXDecorator;
|
||||
import javafx.scene.Node;
|
||||
import seng302.visualiser.GameClient;
|
||||
|
||||
public class ViewManager {
|
||||
|
||||
private static ViewManager instance;
|
||||
private GameClient gameClient;
|
||||
private JFXDecorator decorator;
|
||||
|
||||
private ViewManager(){
|
||||
gameClient = new GameClient(decorator);
|
||||
}
|
||||
|
||||
public static ViewManager getInstance(){
|
||||
if (instance == null){
|
||||
instance = new ViewManager();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setDecorator(JFXDecorator decorator){
|
||||
this.decorator = decorator;
|
||||
}
|
||||
|
||||
public JFXDecorator getDecorator(){
|
||||
return decorator;
|
||||
}
|
||||
|
||||
public void setScene(Node scene){
|
||||
decorator.setContent(scene);
|
||||
}
|
||||
|
||||
public GameClient getGameClient(){
|
||||
return gameClient;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user