summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-05-31 15:26:11 +0300
committerVaadin Code Review <review@vaadin.com>2013-05-31 12:41:06 +0000
commit1ed09802b376c61bef15579ff4ca9261dffff927 (patch)
tree35c6fade0a174b9eb059a43d4653cad855bee5f8 /client
parent0f9b689130aa1fc1405cc10cf2d840bc98298eec (diff)
downloadvaadin-framework-1ed09802b376c61bef15579ff4ca9261dffff927.tar.gz
vaadin-framework-1ed09802b376c61bef15579ff4ca9261dffff927.zip
Move ApplicationConnection.setOverlayContainerLabel to VOverlay (#11965)
Change-Id: I747097fe7be8872f6c2ab04b272f88677b6e0663
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java16
-rw-r--r--client/src/com/vaadin/client/ui/VOverlay.java18
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java3
3 files changed, 22 insertions, 15 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index ed9fe88269..2f5401a75b 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -466,7 +466,8 @@ public class ApplicationConnection {
Element overlayContainer = VOverlay.getOverlayContainer(this);
Roles.getAlertRole().setAriaLiveProperty(overlayContainer,
LiveValue.ASSERTIVE);
- setOverlayContainerLabel(getUIConnector().getState().overlayContainerLabel);
+ VOverlay.setOverlayContainerLabel(this,
+ getUIConnector().getState().overlayContainerLabel);
Roles.getAlertRole().setAriaRelevantProperty(overlayContainer,
RelevantValue.ADDITIONS);
}
@@ -3433,17 +3434,4 @@ public class ApplicationConnection {
public void handlePushMessage(String message) {
handleJSONText(message, 200);
}
-
- /**
- * Set the label of the container element, where tooltip, notification and
- * dialgs are added to.
- *
- * @param overlayContainerLabel
- * label for the container
- */
- public void setOverlayContainerLabel(String overlayContainerLabel) {
- Roles.getAlertRole().setAriaLabelProperty(
- VOverlay.getOverlayContainer(this),
- getUIConnector().getState().overlayContainerLabel);
- }
}
diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java
index 9e809758ca..ced476f9dd 100644
--- a/client/src/com/vaadin/client/ui/VOverlay.java
+++ b/client/src/com/vaadin/client/ui/VOverlay.java
@@ -17,6 +17,7 @@
package com.vaadin.client.ui;
import com.google.gwt.animation.client.Animation;
+import com.google.gwt.aria.client.Roles;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.IFrameElement;
import com.google.gwt.dom.client.Style;
@@ -690,6 +691,23 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> {
return container;
}
+ /**
+ * Set the label of the container element, where tooltip, notification and
+ * dialgs are added to.
+ *
+ * @param applicationConnection
+ * the application connection for which to change the label
+ * @param overlayContainerLabel
+ * label for the container
+ */
+ public static void setOverlayContainerLabel(
+ ApplicationConnection applicationConnection,
+ String overlayContainerLabel) {
+ Roles.getAlertRole().setAriaLabelProperty(
+ VOverlay.getOverlayContainer(applicationConnection),
+ overlayContainerLabel);
+ }
+
@Override
public void center() {
super.center();
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java
index e734d420f2..bba9252d47 100644
--- a/client/src/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java
@@ -58,6 +58,7 @@ import com.vaadin.client.ui.AbstractSingleComponentContainerConnector;
import com.vaadin.client.ui.ClickEventHandler;
import com.vaadin.client.ui.ShortcutActionHandler;
import com.vaadin.client.ui.VNotification;
+import com.vaadin.client.ui.VOverlay;
import com.vaadin.client.ui.VUI;
import com.vaadin.client.ui.layout.MayScrollChildren;
import com.vaadin.client.ui.window.WindowConnector;
@@ -631,7 +632,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
if (stateChangeEvent.hasPropertyChanged("overlayContainerLabel")) {
- getConnection().setOverlayContainerLabel(
+ VOverlay.setOverlayContainerLabel(getConnection(),
getState().overlayContainerLabel);
}
}