diff options
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r-- | src/jrummikub/control/ApplicationControl.java | 6 | ||||
-rw-r--r-- | src/jrummikub/control/LoginControl.java | 19 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/jrummikub/control/ApplicationControl.java b/src/jrummikub/control/ApplicationControl.java index 5cd1116..b42bc4f 100644 --- a/src/jrummikub/control/ApplicationControl.java +++ b/src/jrummikub/control/ApplicationControl.java @@ -6,6 +6,7 @@ import jrummikub.model.IRoundState; import jrummikub.util.IListener; import jrummikub.util.IListener1; import jrummikub.util.IListener3; +import jrummikub.util.LoginData; import jrummikub.view.IView; import jrummikub.view.IView.BottomPanelType; @@ -76,10 +77,9 @@ public class ApplicationControl { loginControl = new LoginControl(view); loginControl.getLoginEvent().add( - new IListener3<String, String, String>() { + new IListener1<LoginData>() { @Override - public void handle(String userName, String password, - String channelName) { + public void handle(LoginData loginData) { // TODO Auto-generated method stub } }); diff --git a/src/jrummikub/control/LoginControl.java b/src/jrummikub/control/LoginControl.java index 233a2d3..2e6b853 100644 --- a/src/jrummikub/control/LoginControl.java +++ b/src/jrummikub/control/LoginControl.java @@ -5,28 +5,28 @@ import java.util.List; import jrummikub.util.Connection; import jrummikub.util.Event; -import jrummikub.util.Event3; +import jrummikub.util.Event1; import jrummikub.util.IEvent; -import jrummikub.util.IEvent3; +import jrummikub.util.IEvent1; import jrummikub.util.IListener; -import jrummikub.util.IListener3; +import jrummikub.util.IListener1; +import jrummikub.util.LoginData; import jrummikub.view.IView; public class LoginControl { private IView view; - private Event3<String, String, String> loginEvent = new Event3<String, String, String>(); + private Event1<LoginData> loginEvent = new Event1<LoginData>(); private Event cancelEvent = new Event(); private List<Connection> connections = new ArrayList<Connection>(); public LoginControl(final IView view) { this.view = view; connections.add(view.getLoginPanel().getLoginEvent() - .add(new IListener3<String, String, String>() { + .add(new IListener1<LoginData>() { @Override - public void handle(String userName, String password, - String channelName) { + public void handle(LoginData loginData) { abort(); - loginEvent.emit(userName, password, channelName); + loginEvent.emit(loginData); } })); @@ -43,7 +43,7 @@ public class LoginControl { view.showLoginPanel(true); } - public IEvent3<String, String, String> getLoginEvent() { + public IEvent1<LoginData> getLoginEvent() { return loginEvent; } @@ -57,5 +57,4 @@ public class LoginControl { c.remove(); } } - } |