Professional Documents
Culture Documents
GWT
EXT
GWT-EXT
CONFIGURANDO
• File>New>Project>Designer>GWT>GWT Java
Project>Next.
• Agora entra em Project Name>DemoGwtExt>Next.
Click on > create Gwt module.
• Digite o nome do módulo(ExGwtExt) e nome do
pacote (com.sfeir).
• Agora, um projeto chamado ExGwtExt é criada no
eclipse.
• Em seguida, veremos as bibliotecas necessárias
para ser transferido.
• Primeiro fazer download de Ext:
http://extjs.com/download
• Download gwtext-0.9.1.Zip
http://code.google.com/p/gwt-ext/
• Guarde as duas bibliotecas na sua pasta do projeto,
descompacte o arquivo gwtext-0.9.1.Zip e você
pode encontrar o arquivo Jar gwtext.jar nessa
pasta.
<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.gwtext.GwtExt"/> //line to
be added//
<entry-point class="com.sfeir.client.ExGwtExt"/>
</module>
<html>
<head>
<title>Wrapper HTML for ExGwtExt</title>
<meta name='gwt:module'
content='com.sfeir.ExGwtExt'/>
<link type="text/css" rel='stylesheet'
href='ExGwtExt.css'/>
<link rel="stylesheet" type="text/css" href="js/
ext/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="js/
ext/resources/css/xtheme-aero.css" />
<script type="text/javascript" src="js/ext/
adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="js/ext/
adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="js/ext/ext-
all.js"></script>
</head>
<body>
<script language="javascript" src="gwt.js"></script>
<! -- OPTIONAL: include this if you want history support -
->
<iframe id="__gwt_historyFrame"
style="width:0;height:0;border:0"></iframe>
</body>
</html>
package com.sfeir.client;
/**
*Import the necessary package to run the program
*/
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.ButtonConfig;
import com.gwtext.client.widgets.MessageBox;
import
com.gwtext.client.widgets.event.ButtonListenerAdapter;
/**
* Entry point classes define <code>onModuleLoad ()
</code>.
*/
public class gwtExt implements EntryPoint
{
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get ();
Button but= new Button (new ButtonConfig () {
{
setText("Example of hello world");
setButtonListener (new ButtonListenerAdapter()
{
public void onClick(Button button, EventObject e)
{
MessageBox.alert("Gwt-Ext", "<< hello World
example >>");
}
});
}
});
rootPanel.add (but, 300,300);
}
}
Conclusão
Referência