/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package ChatProgramm.controller.commands; import ChatProgramm.model.ChatModel; import ChatProgramm.model.Figur; import ChatProgramm.util.OhmLogger; import ChatProgramm.view.ChatView; import java.util.logging.Logger; /** * * @author ahren */ public class CommandSend implements CommandInterface { private static Logger lg = OhmLogger.getLogger(); private ChatView view; private ChatModel model; public CommandSend(ChatView view, ChatModel model) { this.view = view; this.model = model; } @Override public void execute() { Figur aktuelleFigur = model.getGrafikDaten().getFiguren().getLast(); try { model.getTransmitter().send(aktuelleFigur); } catch(Exception NullPointerExeption) { lg.info("Der Transmitter ist null"); } } @Override public boolean isUndoable() { return false; } @Override public void undo() { } }