summaryrefslogtreecommitdiffstats
path: root/shared/src/com/vaadin
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2013-05-17 09:10:31 +0300
committerHenri Sara <hesara@vaadin.com>2013-05-17 09:10:31 +0300
commit145a3e3dad46e1aa04e4c8166e309ee8aaa8deeb (patch)
tree58b475a7224a6c932f77819b5c7a599749832499 /shared/src/com/vaadin
parentb79c0aa5bec3cf294dbc58ff66dbaa8686229654 (diff)
downloadvaadin-framework-145a3e3dad46e1aa04e4c8166e309ee8aaa8deeb.tar.gz
vaadin-framework-145a3e3dad46e1aa04e4c8166e309ee8aaa8deeb.zip
Send browser window resizes if there is a listener (#10055)
This also introduces PageState, which is at the moment a part of UIState. Change-Id: I4f927e6b8217fa789d83ce5e0d8254b141f485c7
Diffstat (limited to 'shared/src/com/vaadin')
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/PageState.java35
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIState.java5
2 files changed, 40 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/ui/PageState.java b/shared/src/com/vaadin/shared/ui/ui/PageState.java
new file mode 100644
index 0000000000..d7c4268530
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/ui/PageState.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.ui;
+
+import java.io.Serializable;
+
+import com.vaadin.server.Page;
+
+/**
+ * The shared state of a {@link Page}.
+ *
+ * Note that at the moment this is not a stand-alone state class but embedded in
+ * {@link UIState}. This might change in the future.
+ *
+ * @since 7.1
+ */
+public class PageState implements Serializable {
+ /**
+ * True if the page has browser window resize listeners.
+ */
+ public boolean hasResizeListeners = false;
+} \ No newline at end of file
diff --git a/shared/src/com/vaadin/shared/ui/ui/UIState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java
index e8be9d674c..2565de59df 100644
--- a/shared/src/com/vaadin/shared/ui/ui/UIState.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java
@@ -42,6 +42,11 @@ public class UIState extends TabIndexState {
public int maxWidth = 500;
}
+ /**
+ * State related to the {@link Page} class.
+ */
+ public PageState pageState = new PageState();
+
{
primaryStyleName = "v-ui";
// Default is 1 for legacy reasons