This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.testing.client; | |
import java.util.HashSet; | |
import java.util.Set; | |
import com.google.gwt.event.dom.client.ClickEvent; | |
import com.google.gwt.event.dom.client.KeyDownEvent; | |
import com.google.gwt.event.shared.GwtEvent; | |
public class TestingClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple login view. | |
*/ | |
public class LoginView { | |
private TextBox username; | |
private TextBox password; | |
public LoginView(TextBox username, TextBox password) { | |
this.username = username; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginViewTest { | |
@Mock | |
private TextBox username; | |
@Mock | |
private TextBox password; | |
private LoginView loginView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginViewTest { | |
@Mock | |
private TextBox username; | |
@Mock | |
private TextBox password; | |
private LoginView loginView; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Email implements Serializable { | |
private String email; | |
public Email() { | |
} | |
public Email(String email) { | |
this.email = email; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailDriver { | |
interface Driver extends SimpleBeanEditorDriver<Email, EmailEditor> { | |
} | |
Driver driver = GWT.create(Driver.class); | |
void edit(Email p) { | |
EmailEditor editor = new EmailEditor(); | |
// initialize the driver and edit the given email. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailEditor extends Composite implements Editor<Email> { | |
private static EmailEditorUiBinder uiBinder = GWT | |
.create(EmailEditorUiBinder.class); | |
interface EmailEditorUiBinder extends UiBinder<Widget, EmailEditor> { | |
} | |
@UiField | |
TextBox email; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Customer implements Serializable { | |
private String id; | |
private String firstName, lastName; | |
private Address address; | |
private Email email; | |
// getters, setters, constructor. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerEditor extends Composite implements Editor<Customer> { | |
private static CustomerEditorUiBinder uiBinder = GWT | |
.create(CustomerEditorUiBinder.class); | |
interface CustomerEditorUiBinder extends UiBinder<Widget, CustomerEditor> { | |
} | |
@UiField | |
TextBox firstName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerDemo implements EntryPoint { | |
interface Driver extends SimpleBeanEditorDriver<Customer, CustomerEditor> { | |
} | |
Driver driver = GWT.create(Driver.class); | |
public void onModuleLoad() { | |
CustomerEditor editor = new CustomerEditor(); | |
driver.initialize(editor); |
OlderNewer