wir hängen irgendwo in der IO
This commit is contained in:
@@ -34,7 +34,7 @@ public class CommandController implements ActionListener{
|
||||
}
|
||||
|
||||
public void registerCommands(){
|
||||
CommandSend commandSend = new CommandSend(view);
|
||||
CommandSend commandSend = new CommandSend(view.getGvZeichenflaeche());
|
||||
invoker.addCommand(view.getBtnConnect(), new CommandConnect(view, commandSend));
|
||||
//invoker.addCommand(view.getTfNachricht(), commandSend);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
package ChatProgramm.controller;
|
||||
|
||||
import ChatProgramm.controller.commands.CommandConnect;
|
||||
import ChatProgramm.controller.commands.CommandInvoker;
|
||||
import ChatProgramm.controller.commands.CommandSend;
|
||||
import java.awt.Point;
|
||||
import java.awt.event.MouseAdapter;
|
||||
@@ -14,7 +12,6 @@ import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseMotionListener;
|
||||
import ChatProgramm.model.GrafikModel;
|
||||
import ChatProgramm.view.GrafikView;
|
||||
import java.awt.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -24,12 +21,13 @@ public class GrafikController extends MouseAdapter implements MouseMotionListene
|
||||
{
|
||||
private GrafikView view;
|
||||
private GrafikModel model;
|
||||
private CommandInvoker invoker;
|
||||
private CommandSend commandSend;
|
||||
|
||||
public GrafikController(GrafikView view, GrafikModel model)
|
||||
{
|
||||
this.view = view;
|
||||
this.model = model;
|
||||
commandSend = new CommandSend(view);
|
||||
}
|
||||
|
||||
public void registerEvents()
|
||||
@@ -37,10 +35,7 @@ public class GrafikController extends MouseAdapter implements MouseMotionListene
|
||||
view.addMouseMotionListener(this);
|
||||
view.addMouseListener(this);
|
||||
}
|
||||
public void registerCommands(){
|
||||
CommandSend commandSend = new CommandSend(view);
|
||||
invoker.addCommand(view.getTNachricht(), commandSend);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@@ -60,8 +55,7 @@ public class GrafikController extends MouseAdapter implements MouseMotionListene
|
||||
public void mouseReleased(MouseEvent evt)
|
||||
{
|
||||
model.endShape();
|
||||
Component key = (Component)evt.getSource();
|
||||
invoker.executeCommand(key);
|
||||
commandSend.execute();
|
||||
// if (evt.getButton() == MouseEvent.BUTTON3)
|
||||
// {
|
||||
// view.doPrint();
|
||||
|
||||
@@ -43,6 +43,7 @@ public class CommandSend implements CommandInterface
|
||||
@Override
|
||||
public void execute()
|
||||
{
|
||||
lg.info("wir sind drin");
|
||||
//ToDo in dieser methode muss die Figur serialisiert werden und zum
|
||||
//übermitteln bereitgestellt werden
|
||||
|
||||
|
||||
Reference in New Issue
Block a user