1)我注意到下面的庫,提供font rendering for the GWT Canvas。希望有所幫助。
2)在上GWTCanvas wiki評論以下代碼是由「matt.d.hilliard」粘貼(直接鏈接出現不可能唉):
import com.google.gwt.event.dom.client.HasMouseDownHandlers;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.widgetideas.graphics.client.GWTCanvas;
public class Canvas extends GWTCanvas implements HasMouseDownHandlers {
public Canvas() {
super();
}
public Canvas(int coordX, int coordY) {
super(coordX, coordY);
}
public Canvas(int coordX, int coordY, int pixelX, int pixelY) {
super(coordX, coordY, pixelX, pixelY);
}
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) {
return addDomHandler(handler, MouseDownEvent.getType());
}
}