package ui.controller; import java.awt.Color; import javax.swing.text.BadLocationException; import javax.swing.text.StyleConstants; import ui.model.Model; import ui.view.Console; public class ConsoleController { private Model MODEL; public ConsoleController(Model model) { this.MODEL = model; } /** * Print Text on the console * * @param text * String the Text * @param color * the color of the Text * @param p * size of the Text * @param bold * bold or not * @param italic * italic or not * @param ln * new line or not * * @return selected CpsObject */ public void addTextToConsole(String text, Color color, int p, boolean bold, boolean italic, boolean nl) { MODEL.getConsole().addText(text, color, p, bold, italic, nl); } /** * Print Text on the console in black and font size 12 * * @param text * String the Text */ public void addTextToConsole(String text) { MODEL.getConsole().addText(text); } /** * Clears the console */ public void clearConsole() { MODEL.getConsole().clearConsole(); } }