summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-20 08:53:33 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-20 08:53:33 +0300
commit890356e6ab17661364a04d60ded9fe01628b0830 (patch)
treef602189d4f3f47e1026f7327eb4324e89b3c5a9d /server/src/com/vaadin/ui
parente69c4908ba61b1fd09f0b50ecbc2e0ec11cd06f5 (diff)
downloadvaadin-framework-890356e6ab17661364a04d60ded9fe01628b0830.tar.gz
vaadin-framework-890356e6ab17661364a04d60ded9fe01628b0830.zip
Support @Delayable and change window size update to use it (#8421)
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r--server/src/com/vaadin/ui/Root.java13
-rw-r--r--server/src/com/vaadin/ui/Window.java19
2 files changed, 7 insertions, 25 deletions
diff --git a/server/src/com/vaadin/ui/Root.java b/server/src/com/vaadin/ui/Root.java
index 685296c55a..b37005a16e 100644
--- a/server/src/com/vaadin/ui/Root.java
+++ b/server/src/com/vaadin/ui/Root.java
@@ -434,6 +434,13 @@ public abstract class Root extends AbstractComponentContainer implements
public void click(MouseEventDetails mouseDetails) {
fireEvent(new ClickEvent(Root.this, mouseDetails));
}
+
+ @Override
+ public void resize(int viewWidth, int viewHeight, int windowWidth,
+ int windowHeight) {
+ // TODO We're not doing anything with the view dimensions
+ getPage().setBrowserWindowSize(windowWidth, windowHeight);
+ }
};
/**
@@ -582,12 +589,6 @@ public abstract class Root extends AbstractComponentContainer implements
.get(RootConstants.FRAGMENT_VARIABLE);
getPage().setFragment(fragment, true);
}
-
- if (variables.containsKey("height") || variables.containsKey("width")) {
- getPage().setBrowserWindowSize((Integer) variables.get("width"),
- (Integer) variables.get("height"));
- }
-
}
/*
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index 13ef7e5784..d1d2c25d8b 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -32,7 +32,6 @@ import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.event.ShortcutAction.ModifierKey;
import com.vaadin.event.ShortcutListener;
import com.vaadin.shared.MouseEventDetails;
-import com.vaadin.shared.ui.root.RootConstants;
import com.vaadin.shared.ui.window.WindowServerRpc;
import com.vaadin.shared.ui.window.WindowState;
import com.vaadin.terminal.PaintException;
@@ -76,10 +75,6 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
}
};
- private int browserWindowWidth = -1;
-
- private int browserWindowHeight = -1;
-
/**
* Creates a new unnamed window with a default layout.
*/
@@ -170,20 +165,6 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
.get("width") != getWidth())) {
sizeHasChanged = true;
}
- Integer browserHeightVar = (Integer) variables
- .get(RootConstants.BROWSER_HEIGHT_VAR);
- if (browserHeightVar != null
- && browserHeightVar.intValue() != browserWindowHeight) {
- browserWindowHeight = browserHeightVar.intValue();
- sizeHasChanged = true;
- }
- Integer browserWidthVar = (Integer) variables
- .get(RootConstants.BROWSER_WIDTH_VAR);
- if (browserWidthVar != null
- && browserWidthVar.intValue() != browserWindowWidth) {
- browserWindowWidth = browserWidthVar.intValue();
- sizeHasChanged = true;
- }
super.changeVariables(source, variables);