From ce7d43e3654f7f33357c51e578378a7b996bd587 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Mon, 13 Jun 2011 16:29:09 +0200 Subject: Viele viele Kommentare, einige zu lange oder zu komplexe Methoden gefixt git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@417 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/LoginControl.java | 44 +++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'src/jrummikub/control/LoginControl.java') diff --git a/src/jrummikub/control/LoginControl.java b/src/jrummikub/control/LoginControl.java index 2e6b853..9355220 100644 --- a/src/jrummikub/control/LoginControl.java +++ b/src/jrummikub/control/LoginControl.java @@ -13,12 +13,22 @@ import jrummikub.util.IListener1; import jrummikub.util.LoginData; import jrummikub.view.IView; +/** + * Control checking and processing login data for network game + * + */ public class LoginControl { private IView view; private Event1 loginEvent = new Event1(); private Event cancelEvent = new Event(); private List connections = new ArrayList(); + /** + * Constructor for login Control + * + * @param view + * for events which need handling + */ public LoginControl(final IView view) { this.view = view; connections.add(view.getLoginPanel().getLoginEvent() @@ -30,27 +40,47 @@ public class LoginControl { } })); - connections.add(view.getLoginPanel().getCancelEvent().add(new IListener() { - @Override - public void handle() { - abort(); - cancelEvent.emit(); - } - })); + connections.add(view.getLoginPanel().getCancelEvent() + .add(new IListener() { + @Override + public void handle() { + abort(); + cancelEvent.emit(); + } + })); } + /** + * Open Login panel + * + */ public void startLogin() { view.showLoginPanel(true); } + /** + * Getter for loginEvent + * + * @return loginEvent + */ public IEvent1 getLoginEvent() { return loginEvent; } + /** + * Getter for cancelEvent + * + * @return cancelEvent + */ public IEvent getCancelEvent() { return cancelEvent; } + /** + * Control abortion once all login data have been processed or login was + * canceled + * + */ public void abort() { view.showLoginPanel(false); for (Connection c : connections) { -- cgit v1.2.3