diff options
author | John Ahlroos <john@vaadin.com> | 2012-08-31 14:22:26 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-08-31 14:23:03 +0300 |
commit | dc8bc6119c1bd019600559db552ec26b4db2ec54 (patch) | |
tree | 3d83f592737c9ed3610c62025a788ed689ac2e62 /uitest | |
parent | 01646b14df5708e50e4eb031ec5b4f0da4ab5d15 (diff) | |
download | vaadin-framework-dc8bc6119c1bd019600559db552ec26b4db2ec54.tar.gz vaadin-framework-dc8bc6119c1bd019600559db552ec26b4db2ec54.zip |
More state getter removal
Diffstat (limited to 'uitest')
-rwxr-xr-x | uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java b/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java index b3ebb02751..58656cb7bf 100755 --- a/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java +++ b/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java @@ -1,52 +1,52 @@ -package com.vaadin.tests.components.loginform;
-
-import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.LoginForm;
-import com.vaadin.ui.LoginForm.LoginEvent;
-import com.vaadin.ui.LoginForm.LoginListener;
-import com.vaadin.ui.UI;
-
-public class LoginFormUIInLoginHandler extends TestBase {
-
- @Override
- protected void setup() {
- LoginForm lf = new LoginForm();
- lf.addListener(new LoginListener() {
-
- @Override
- public void onLogin(LoginEvent event) {
- UI r1 = UI.getCurrent();
- if (r1 != null) {
- addComponent(new Label("UI.getCurrent().data: "
- + r1.getData()));
- } else {
- addComponent(new Label("UI.getCurrent() is null"));
- }
- UI r2 = ((LoginForm) event.getSource()).getUI();
- if (r2 != null) {
- addComponent(new Label("event.getSource().data: "
- + r2.getData()));
- } else {
- addComponent(new Label(
- "event.getSource().getRoot() is null"));
- }
- }
- });
- addComponent(lf);
- getLayout().getUI().setData("This UI");
- }
-
- @Override
- protected String getDescription() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- protected Integer getTicketNumber() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
+package com.vaadin.tests.components.loginform; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Label; +import com.vaadin.ui.LoginForm; +import com.vaadin.ui.LoginForm.LoginEvent; +import com.vaadin.ui.LoginForm.LoginListener; +import com.vaadin.ui.UI; + +public class LoginFormUIInLoginHandler extends TestBase { + + @Override + protected void setup() { + LoginForm lf = new LoginForm(); + lf.addListener(new LoginListener() { + + @Override + public void onLogin(LoginEvent event) { + UI r1 = UI.getCurrent(); + if (r1 != null) { + addComponent(new Label("UI.getCurrent().data: " + + r1.getData())); + } else { + addComponent(new Label("UI.getCurrent() is null")); + } + UI r2 = ((LoginForm) event.getSource()).getUI(); + if (r2 != null) { + addComponent(new Label("event.getSource().data: " + + r2.getData())); + } else { + addComponent(new Label( + "event.getSource().getRoot() is null")); + } + } + }); + addComponent(lf); + getLayout().getUI().setData("This UI"); + } + + @Override + protected String getDescription() { + // TODO Auto-generated method stub + return null; + } + + @Override + protected Integer getTicketNumber() { + // TODO Auto-generated method stub + return null; + } + +} |