summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Window.java
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan@vaadin.com>2014-04-14 11:53:11 +0300
committerJonatan Kronqvist <jonatan@vaadin.com>2014-04-14 12:06:05 +0300
commit416e2f97bcaf93e4d2a782149a963fca95b8400e (patch)
treeeac6d22107b7c2d7bf6371e5278078f02bb860e9 /server/src/com/vaadin/ui/Window.java
parentd2e24feb09ccba7f3a2f253687488774af2bc340 (diff)
parenteda9edcbde781d29ff5939defb61ba5fb159e206 (diff)
downloadvaadin-framework-416e2f97bcaf93e4d2a782149a963fca95b8400e.tar.gz
vaadin-framework-416e2f97bcaf93e4d2a782149a963fca95b8400e.zip
Merge branch 'master' into 7.2
72d0aa0 Update Window Javadoc based on 7.2 API review changes ee203f5 Apply abstract ordered layout settings for replaced component (#13568) 02998d8 Updated Window API based on 7.2 API review cd94b21 Discourage use of setNeedsLayout while a layout is running (#13542) f374bc7 Make ComboBox always immediate (#4054) aec102a Update 3rd party license information (#13449) 013d32d Remove old widget from tab content on replace (#12931). 3d0ff32 Prevent duplicate detach() calls with push (#13261) a452bad Refactor VaadinPortletRequest extending. (#13551) 55dfd29 Prevent duplicate session destroy events (#12612) 2067d4e Don't allocate unnecessary memory for empty array of Objects in MethodProperty (#10446). 00a9af5 Refactor PushConfigurationTest. Merge: no Change-Id: I6563769a77f91a68cfeadcb3306dd71fe431863c
Diffstat (limited to 'server/src/com/vaadin/ui/Window.java')
-rw-r--r--server/src/com/vaadin/ui/Window.java29
1 files changed, 17 insertions, 12 deletions
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index 022adc6373..11a6fde853 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -18,9 +18,6 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
import java.util.Map;
import com.vaadin.event.FieldEvents.BlurEvent;
@@ -1017,15 +1014,15 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* window. Text contained in these components will be read by assistive
* devices when it is opened.
*
- * @param connectors
- * with the components to use as description
+ * @param components
+ * the components to use as description
*/
- public void setAssistiveDescription(Connector... connectors) {
- if (connectors == null) {
+ public void setAssistiveDescription(Component... components) {
+ if (components == null) {
throw new IllegalArgumentException(
"Parameter connectors must be non-null");
} else {
- getState().contentDescription = connectors;
+ getState().contentDescription = components;
}
}
@@ -1034,11 +1031,19 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* contained in these components will be read by assistive devices when the
* window is opened.
*
- * @return list of previously set components
+ * @return array of previously set components
*/
- public List<Connector> getAssistiveDescription() {
- return Collections.unmodifiableList(Arrays
- .asList(getState().contentDescription));
+ public Component[] getAssistiveDescription() {
+ Connector[] contentDescription = getState().contentDescription;
+ if (contentDescription == null) {
+ return null;
+ }
+
+ Component[] target = new Component[contentDescription.length];
+ System.arraycopy(contentDescription, 0, target, 0,
+ contentDescription.length);
+
+ return target;
}
/**