forked from GitHub/gf-core
upgrade to GWT 2.0.4
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="/Users/bringert/src/gwt-mac-1.5.3/gwt-user.jar"/>
|
||||
<classpathentry kind="lib" path="lib/gwt-dnd-2.5.6.jar"/>
|
||||
<classpathentry kind="output" path="src"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="src"/>
|
||||
</classpath>
|
||||
|
||||
@@ -1,15 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<projectDescription>
|
||||
<name>GF-GWT</name>
|
||||
<comment>GF-GWT project</comment>
|
||||
<projects/>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments/>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>GF-GWT</name>
|
||||
<comment>GF-GWT project</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
Binary file not shown.
@@ -4,8 +4,6 @@
|
||||
<inherits name="com.google.gwt.user.User" />
|
||||
<inherits name="com.google.gwt.http.HTTP" />
|
||||
<inherits name="com.google.gwt.json.JSON" />
|
||||
|
||||
<!-- Inherit gwt-dnd support -->
|
||||
<inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
|
||||
|
||||
<inherits name="com.google.gwt.xml.XML" />
|
||||
|
||||
</module>
|
||||
|
||||
@@ -2,8 +2,6 @@ package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.google.gwt.core.client.*;
|
||||
import com.google.gwt.user.client.*;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import java.util.*;
|
||||
import java.lang.*;
|
||||
import com.google.gwt.core.client.*;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
import com.google.gwt.http.client.*;
|
||||
import com.google.gwt.dom.client.*;
|
||||
|
||||
public class BrowsePanel extends Composite {
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.google.gwt.core.client.*;
|
||||
import com.google.gwt.user.client.*;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
@@ -2,8 +2,6 @@ package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.allen_sauer.gwt.dnd.client.PickupDragController;
|
||||
import com.allen_sauer.gwt.dnd.client.drop.DropController;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.user.client.*;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
@@ -124,28 +122,13 @@ public class FridgeApp implements EntryPoint {
|
||||
// GUI
|
||||
|
||||
protected Widget createUI() {
|
||||
PickupDragController dragController = new PickupDragController(RootPanel.get(), false);
|
||||
dragController.setBehaviorDragStartSensitivity(1);
|
||||
dragController.setBehaviorDragProxy(true);
|
||||
dragController.setBehaviorConstrainedToBoundaryPanel(true);
|
||||
/*
|
||||
dragController.addDragHandler(new DragHandlerAdapter() {
|
||||
public void onDragStart(DragStartEvent event) {
|
||||
Widget w = event.getContext().draggable;
|
||||
if (w instanceof Magnet) {
|
||||
bagPanel.cloneMagnet((Magnet)w);
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
ClickListener magnetClickListener = new ClickListener () {
|
||||
public void onClick(Widget widget) {
|
||||
Magnet magnet = (Magnet)widget;
|
||||
textPanel.addMagnet(magnet);
|
||||
}
|
||||
};
|
||||
magnetFactory = new MagnetFactory(dragController, magnetClickListener);
|
||||
magnetFactory = new MagnetFactory(magnetClickListener);
|
||||
|
||||
textPanel = new FridgeTextPanel(magnetFactory);
|
||||
textPanel.addChangeListener(new ChangeListener() {
|
||||
@@ -172,9 +155,6 @@ public class FridgeApp implements EntryPoint {
|
||||
mainPanel.setCellHorizontalAlignment(outputPanel, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||
mainPanel.setCellWidth(settingsPanel, "100%");
|
||||
|
||||
DropController dropController = new FridgeTextPanelDropController(textPanel);
|
||||
dragController.registerDropController(dropController);
|
||||
|
||||
Window.addWindowResizeListener(new WindowResizeListener() {
|
||||
public void onWindowResized(int w, int h) {
|
||||
mainPanel.setPixelSize(w, h);
|
||||
|
||||
@@ -3,13 +3,7 @@ package se.chalmers.cs.gf.gwt.client;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.ScrollPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
public class FridgeBagPanel extends Composite {
|
||||
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import com.google.gwt.user.client.ui.ChangeListener;
|
||||
import com.google.gwt.user.client.ui.ChangeListenerCollection;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.DockPanel;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.Panel;
|
||||
import com.google.gwt.user.client.ui.PushButton;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
public class FridgeTextPanel extends Composite {
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import com.allen_sauer.gwt.dnd.client.DragContext;
|
||||
import com.allen_sauer.gwt.dnd.client.drop.SimpleDropController;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class FridgeTextPanelDropController extends SimpleDropController {
|
||||
|
||||
private FridgeTextPanel textPanel;
|
||||
|
||||
public FridgeTextPanelDropController (FridgeTextPanel textPanel) {
|
||||
super(textPanel);
|
||||
this.textPanel = textPanel;
|
||||
}
|
||||
|
||||
public void onEnter(DragContext context) {
|
||||
super.onEnter(context);
|
||||
textPanel.setEngaged(true);
|
||||
}
|
||||
|
||||
public void onLeave(DragContext context) {
|
||||
textPanel.setEngaged(false);
|
||||
super.onLeave(context);
|
||||
}
|
||||
|
||||
public void onDrop(DragContext context) {
|
||||
for (Widget widget : context.selectedWidgets) {
|
||||
Magnet magnet = (Magnet)widget;
|
||||
textPanel.addMagnet(magnet);
|
||||
}
|
||||
super.onDrop(context);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import com.allen_sauer.gwt.dnd.client.PickupDragController;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
public class MagnetFactory {
|
||||
|
||||
private PickupDragController dragController;
|
||||
|
||||
private ClickListener clickListener;
|
||||
|
||||
public MagnetFactory (PickupDragController dragController, ClickListener clickListener) {
|
||||
this.dragController = dragController;
|
||||
public MagnetFactory (ClickListener clickListener) {
|
||||
this.clickListener = clickListener;
|
||||
}
|
||||
|
||||
@@ -29,7 +25,6 @@ public class MagnetFactory {
|
||||
public Magnet createMagnet(String text, String language) {
|
||||
Magnet magnet = new Magnet(text, language);
|
||||
magnet.addClickListener(clickListener);
|
||||
dragController.makeDraggable(magnet);
|
||||
return magnet;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class PGFWrapper {
|
||||
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url));
|
||||
try
|
||||
{
|
||||
Request request = builder.sendRequest(null, new RequestCallback() {
|
||||
builder.sendRequest(null, new RequestCallback() {
|
||||
public void onResponseReceived(Request request, Response response)
|
||||
{
|
||||
if (200 == response.getStatusCode())
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import com.google.gwt.user.client.ui.ChangeListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
public class SettingsPanel extends Composite {
|
||||
|
||||
|
||||
@@ -4,15 +4,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.DockPanel;
|
||||
import com.google.gwt.user.client.ui.HasText;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
|
||||
import com.google.gwt.user.client.ui.SuggestBox;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
public class SuggestPanel extends Composite implements HasText {
|
||||
|
||||
|
||||
@@ -2,10 +2,8 @@ package se.chalmers.cs.gf.gwt.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.History;
|
||||
import com.google.gwt.user.client.HistoryListener;
|
||||
import com.google.gwt.core.client.*;
|
||||
import com.google.gwt.user.client.*;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user