-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic structure of a (non-working) GWT toy client
There are still many things to fix in the code itself, see 'ant gwtc' for a complete list of things to fix. This commit adds the appropriate Ant targets, the GWT XML file, scaffolding HTML code and the Java source file for the frontend (which is just an alert() for now). Committing this code mostly for not keeping it in my local machine, it's unusable as of now (but the normal Ant targets should not be broken).
- Loading branch information
Showing
5 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.edumips64.client; | ||
|
||
import com.google.gwt.core.client.EntryPoint; | ||
import com.google.gwt.event.dom.client.ClickEvent; | ||
import com.google.gwt.event.dom.client.ClickHandler; | ||
import com.google.gwt.user.client.Window; | ||
import com.google.gwt.user.client.ui.Button; | ||
import com.google.gwt.user.client.ui.RootPanel; | ||
|
||
import org.edumips64.core.CPU; | ||
import org.edumips64.core.Parser; | ||
import org.edumips64.utils.ConfigStore; | ||
import org.edumips64.utils.ConfigManager; | ||
|
||
public class WebUi implements EntryPoint { | ||
private CPU cpu; | ||
private Parser parser; | ||
private ConfigStore config = ConfigManager.getTmpConfig(); | ||
|
||
public void onModuleLoad() { | ||
Button b = new Button("Start", new ClickHandler() { | ||
public void onClick(ClickEvent event) { | ||
Window.alert("THE RESULTS OF THE COMPUTATION."); | ||
} | ||
}); | ||
|
||
RootPanel.get().add(b); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<module rename-to="edumips64"> | ||
<inherits name="com.google.gwt.user.User"/> | ||
<entry-point class="org.edumips64.client.WebUi"/> | ||
<source path="client" /> | ||
<source path="core" /> | ||
<source path="utils" /> | ||
</module> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<title>EduMIPS64</title> | ||
<script type="text/javascript" language="javascript" src="webUi/webUi.nocache.js"></script> | ||
</head> | ||
<body bgcolor="white"> | ||
<noscript> | ||
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color:white; border: 1px solid red; padding: 4px; font-family: sans-serif"> | ||
Your web browser must have JavaScript enabled | ||
in order for this application to display correctly. | ||
</div> | ||
</noscript> | ||
</body> | ||
</html> |