如何在 GWT 中获取 com.google.gwt.user.client.Window maxWidth 和 maxHeight

How to get com.google.gwt.user.client.Window maxWidth and maxHeight in GWT

如何在 GWT 中获得 com.google.gwt.user.client.Window maxWidthmaxHeight?我可以调用 Window.getClientWidth()Window.getClientHeight() 但它不会告诉我它是否是我的 Window 的最大宽度和高度:/

最佳

只需执行:

public native int getScreenWidth() /*-{
  return screen.width;
}-*/;

public native int getScreenHeight() /*-{
  return screen.height;
}-*/ ;