123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- package ui.controller;
- import java.awt.Color;
- import ui.model.Model;
- /**
- * Controller for the Global Variables.
- *
- * @author Gruppe14
- */
- public class GlobalController {
- private Model model;
- /**
- * Constructor.
- *
- * @param model
- * the Model
- */
- public GlobalController(Model model) {
- this.model = model;
- }
- /**
- * Returns SCALE.
- *
- * @return SCALE
- */
- public int getScale() {
- return model.getScale();
- }
- /**
- * Returns SCALE Divided by 2.
- *
- * @return SCALE Divided by 2
- */
- public int getScaleDiv2() {
- return model.getScaleDiv2();
- }
- /**
- * Changes the value of SCALE and SCALEDIV2.
- *
- * @param s
- * Scale
- */
- public void setScale(int s) {
- model.setScale(s);
- }
- /**
- * sets the current Iteration.
- *
- * @param curit
- * the current Iteration
- */
- public void setCurIteration(int curit) {
- model.setCurIteration(curit);
- }
- /**
- * Returns numberOfSaves.
- *
- * @return numberOfSaves
- */
- public int getNumbersOfSaves() {
- return model.getNumberOfSaves();
- }
- /**
- * sets the max number of autosaves.
- *
- * @param numberofSaves
- * the max number of autosaves
- */
- public void setNumberOfSaves(int numberofSaves) {
- model.setNumberOfSaves(numberofSaves);
- ;
- }
- /**
- * Set the timerSpeed.
- * @param t
- * Interval in ms
- */
- public void setTimerSpeed(int t) {
- model.setTimerSpeed(t);
- }
- /**
- * Set isSimulation.
- *
- * @param b
- * boolean for for isSimulation
- */
- public void setIsSimulation(boolean b) {
- model.setIsSimulation(b);
- }
- /**
- * Set the Canvas X Size.
- *
- * @param canvasX the cANVAS_X to set
- */
- public void setCanvasX(int canvasX) {
- model.setCanvasX(canvasX);
- }
- /**
- * Set the Canvas Y Size.
- *
- * @param canvasY the cANVAS_Y to set
- */
- public void setCanvasY(int canvasY) {
- model.setCanvasY(canvasY);
- }
-
- /**
- * Add a SubNetColor.
- *
- * @param c
- * the Color
- */
- public void addSubNetColor(Color c) {
- model.addSubNetColor(c);
- }
- }
|