Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 9 → Rev 10

/trunk/src/org/tela_botanica/client/Coel.java
New file
0,0 → 1,64
package org.tela_botanica.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 Coel 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();
}
});
}
}
/trunk/src/org/tela_botanica/public/Coel.html
New 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>Coel</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="org.tela_botanica.Coel.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>
/trunk/src/org/tela_botanica/public/Coel.css
New 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;
}
/trunk/src/org/tela_botanica/Coel.gwt.xml
New file
0,0 → 1,26
<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 -->
<inherits name='com.gwtext.GwtExt' />
 
<!-- Specify the app entry point class. -->
<entry-point class='org.tela_botanica.client.Coel'/>
 
<!-- Specify the application specific style sheet. -->
<stylesheet src="js/ext/resources/css/ext-all.css" />
<stylesheet src='Coel.css' />
 
<!-- Specify the application specific Javascript. -->
<script src="js/ext/adapter/ext/ext-base.js" />
<script src="js/ext/ext-all.js" />
 
</module>