From e4ac4b55cd048f83b0c545026191c6df2ae990d0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 10 Jun 2011 17:47:45 +0200 Subject: Move LoginControl to control package git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@402 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/network/LoginControl.java | 61 ------------------------- 1 file changed, 61 deletions(-) delete mode 100644 src/jrummikub/control/network/LoginControl.java (limited to 'src/jrummikub/control/network') diff --git a/src/jrummikub/control/network/LoginControl.java b/src/jrummikub/control/network/LoginControl.java deleted file mode 100644 index 07e0b71..0000000 --- a/src/jrummikub/control/network/LoginControl.java +++ /dev/null @@ -1,61 +0,0 @@ -package jrummikub.control.network; - -import java.util.ArrayList; -import java.util.List; - -import jrummikub.util.Connection; -import jrummikub.util.Event; -import jrummikub.util.Event3; -import jrummikub.util.IEvent; -import jrummikub.util.IEvent3; -import jrummikub.util.IListener; -import jrummikub.util.IListener3; -import jrummikub.view.IView; - -public class LoginControl { - private IView view; - private Event3 loginEvent = new Event3(); - private Event cancelEvent = new Event(); - private List connections = new ArrayList(); - - public LoginControl(final IView view) { - this.view = view; - connections.add(view.getLoginPanel().getLoginEvent() - .add(new IListener3() { - @Override - public void handle(String userName, String password, - String channelName) { - abort(); - loginEvent.emit(userName, password, channelName); - } - })); - - connections.add(view.getLoginPanel().getCancelEvent().add(new IListener() { - @Override - public void handle() { - abort(); - cancelEvent.emit(); - } - })); - } - - public void startLogin() { - view.showLoginPanel(true); - } - - public IEvent3 getLoginEvent() { - return loginEvent; - } - - public IEvent getCancelEvent() { - return cancelEvent; - } - - public void abort() { - view.showLoginPanel(false); - for (Connection c : connections) { - c.remove(); - } - } - -} -- cgit v1.2.3