onModuleLoad()
.
- */
-public class FotoStream implements EntryPoint {
- /**
- * The message displayed to the user when the server cannot be reached or
- * returns an error.
- */
- private static final String SERVER_ERROR = "An error occurred while "
- + "attempting to contact the server. Please check your network " + "connection and try again.";
-
- /**
- * Create a remote service proxy to talk to the server-side Greeting service.
- */
- private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
+public class FotoStream implements EntryPoint
+{
private final CurrentImageURLServiceAsync imageURLService = GWT.create(CurrentImageURLService.class);
- /**
- * This is the entry point method.
- */
public void onModuleLoad() {
- final Button sendButton = new Button("Send");
- final TextBox nameField = new TextBox();
- nameField.setText("GWT User");
- final Label errorLabel = new Label();
-
final Image image = new Image();
image.setVisible(false);
image.addLoadHandler(new LoadHandler()
@@ -58,125 +27,37 @@ public class FotoStream implements EntryPoint {
}
});
- imageURLService.getCurrentImageURL(new AsyncCallbackGreetingService
.
- */
-public interface GreetingServiceAsync {
- void greetServer(String input, AsyncCallback- * FieldVerifier validates that the name the user enters is valid. - *
- *
- * This class is in the shared
package because we use it in both
- * the client code and on the server. On the client, we verify that the name is
- * valid before sending an RPC request so the user doesn't have to wait for a
- * network round trip to get feedback. On the server, we verify that the name is
- * correct to ensure that the input is correct regardless of where the RPC
- * originates.
- *
- * When creating a class that is used on both the client and the server, be sure - * that all code is translatable and does not use native JavaScript. Code that - * is not translatable (such as code that interacts with a database or the file - * system) cannot be compiled into client-side JavaScript. Code that uses native - * JavaScript (such as Widgets) cannot be run on the server. - *
- */ -public class FieldVerifier { - - /** - * Verifies that the specified name is valid for our service. - * - * In this example, we only require that the name is at least four - * characters. In your application, you can use more complex checks to ensure - * that usernames, passwords, email addresses, URLs, and other fields have the - * proper syntax. - * - * @param name the name to validate - * @return true if valid, false if invalid - */ - public static boolean isValidName(String name) { - if (name == null) { - return false; - } - return name.length() > 3; - } -} diff --git a/war/FotoStream.css b/war/FotoStream.css index 7aca7ac..c128d57 100644 --- a/war/FotoStream.css +++ b/war/FotoStream.css @@ -1,34 +1,8 @@ /** Add css rules here for your application. */ -/** Example rules used by the template application (remove for your app) */ -h1 { - font-size: 2em; - font-weight: bold; - color: #777777; - margin: 40px 0px 70px; - text-align: center; +body { + background-color: black; } -.sendButton { - display: block; - font-size: 16pt; -} -/** Most GWT widgets already have a style name defined */ -.gwt-DialogBox { - width: 400px; -} - -.dialogVPanel { - margin: 5px; -} - -.serverResponseLabelError { - color: red; -} - -/** Set ids using widget.getElement().setId("idOfElement") */ -#closeButton { - margin: 15px 6px 6px; -} diff --git a/war/FotoStream.html b/war/FotoStream.html index 2b610af..0b9d2cd 100644 --- a/war/FotoStream.html +++ b/war/FotoStream.html @@ -16,7 +16,7 @@ -Please enter your name: | -|
- | - |
- | |
- |