mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
0feccdc8b9
Tags: #pair[mra106, ajm412] #story[1245]
42 lines
859 B
Java
42 lines
859 B
Java
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;
|
|
}
|
|
|
|
}
|