mirror of
https://github.com/mirror/jdownloader.git
synced 2025-03-03 09:57:30 +00:00
GWT initial commit
GWT Compiler works currently only under linux, just run compile git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@4411 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
634d02a511
commit
3bc65d1976
64
src/jd/plugins/optional/webinterface/gwt/client/jd.java
Normal file
64
src/jd/plugins/optional/webinterface/gwt/client/jd.java
Normal file
@ -0,0 +1,64 @@
|
||||
package jd.plugins.optional.webinterface.gwt.client;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.DialogBox;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
/**
|
||||
* Entry point classes define <code>onModuleLoad()</code>.
|
||||
*/
|
||||
public class jd implements EntryPoint {
|
||||
|
||||
/**
|
||||
* This is the entry point method.
|
||||
*/
|
||||
public void onModuleLoad() {
|
||||
Image img = new Image("http://code.google.com/webtoolkit/logo-185x175.png");
|
||||
Button button = new Button("Click me");
|
||||
|
||||
// We can add style names
|
||||
button.addStyleName("pc-template-btn");
|
||||
// or we can set an id on a specific element for styling
|
||||
img.getElement().setId("pc-template-img");
|
||||
|
||||
VerticalPanel vPanel = new VerticalPanel();
|
||||
vPanel.setWidth("100%");
|
||||
vPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
|
||||
vPanel.add(img);
|
||||
vPanel.add(button);
|
||||
|
||||
// Add image and button to the RootPanel
|
||||
RootPanel.get().add(vPanel);
|
||||
|
||||
// Create the dialog box
|
||||
final DialogBox dialogBox = new DialogBox();
|
||||
dialogBox.setText("Welcome to GWT!");
|
||||
dialogBox.setAnimationEnabled(true);
|
||||
Button closeButton = new Button("close");
|
||||
VerticalPanel dialogVPanel = new VerticalPanel();
|
||||
dialogVPanel.setWidth("100%");
|
||||
dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
|
||||
dialogVPanel.add(closeButton);
|
||||
|
||||
closeButton.addClickListener(new ClickListener() {
|
||||
public void onClick(Widget sender) {
|
||||
dialogBox.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Set the contents of the Widget
|
||||
dialogBox.setWidget(dialogVPanel);
|
||||
|
||||
button.addClickListener(new ClickListener() {
|
||||
public void onClick(Widget sender) {
|
||||
dialogBox.center();
|
||||
dialogBox.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
22
src/jd/plugins/optional/webinterface/gwt/jd.gwt.xml
Normal file
22
src/jd/plugins/optional/webinterface/gwt/jd.gwt.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<module>
|
||||
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='jd.plugins.optional.webinterface.gwt.client.jd'/>
|
||||
|
||||
<!-- Specify the application specific style sheet. -->
|
||||
<stylesheet src='jd.css' />
|
||||
|
||||
</module>
|
12
src/jd/plugins/optional/webinterface/gwt/public/jd.css
Normal file
12
src/jd/plugins/optional/webinterface/gwt/public/jd.css
Normal file
@ -0,0 +1,12 @@
|
||||
/** Add css rules here for your application. */
|
||||
|
||||
|
||||
/** Example rules used by the template application (remove for your app) */
|
||||
.pc-template-btn {
|
||||
display: block;
|
||||
font-size: 16pt
|
||||
}
|
||||
|
||||
#pc-template-img {
|
||||
margin-top: 20px;
|
||||
}
|
36
src/jd/plugins/optional/webinterface/gwt/public/jd.html
Normal file
36
src/jd/plugins/optional/webinterface/gwt/public/jd.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
|
||||
<!-- above set at the top of the file will set -->
|
||||
<!-- the browser's rendering engine into -->
|
||||
<!-- "Quirks Mode". Replacing this declaration -->
|
||||
<!-- with a "Standards Mode" doctype is supported, -->
|
||||
<!-- but may lead to some differences in layout. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<!-- -->
|
||||
<!-- Any title is fine -->
|
||||
<!-- -->
|
||||
<title>jd</title>
|
||||
|
||||
<!-- -->
|
||||
<!-- This script loads your compiled module. -->
|
||||
<!-- If you add any GWT meta tags, they must -->
|
||||
<!-- be added before this line. -->
|
||||
<!-- -->
|
||||
<script type="text/javascript" language="javascript" src="jd.plugins.optional.webinterface.gwt.jd.nocache.js"></script>
|
||||
</head>
|
||||
|
||||
<!-- -->
|
||||
<!-- The body can have arbitrary html, or -->
|
||||
<!-- you can leave the body empty if you want -->
|
||||
<!-- to create a completely dynamic UI. -->
|
||||
<!-- -->
|
||||
<body>
|
||||
|
||||
<!-- OPTIONAL: include this if you want history support -->
|
||||
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
3
tools/GWTCompiler/compile
Executable file
3
tools/GWTCompiler/compile
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
APPDIR=`dirname $0`;
|
||||
java -Xmx256M -cp "$APPDIR/../../src/:$APPDIR/../../bin:gwt-user.jar:gwt-dev-linux.jar" com.google.gwt.dev.GWTCompiler -out "$APPDIR/output" "$@" jd.plugins.optional.webinterface.gwt.jd;
|
BIN
tools/GWTCompiler/gwt-benchmark-viewer.jar
Normal file
BIN
tools/GWTCompiler/gwt-benchmark-viewer.jar
Normal file
Binary file not shown.
BIN
tools/GWTCompiler/gwt-dev-linux.jar
Normal file
BIN
tools/GWTCompiler/gwt-dev-linux.jar
Normal file
Binary file not shown.
BIN
tools/GWTCompiler/gwt-servlet.jar
Normal file
BIN
tools/GWTCompiler/gwt-servlet.jar
Normal file
Binary file not shown.
BIN
tools/GWTCompiler/gwt-user.jar
Normal file
BIN
tools/GWTCompiler/gwt-user.jar
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user