From 91a04460db80dc505730c0deb5ac451235ace54e Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 31 Jan 2013 16:55:33 +0200 Subject: Add "v-overlay-container" class name to the overlay container for easier customization (related to #10860) Change-Id: I5cd37e7305b72840f3cca2eba68632055f06d599 --- client/src/com/vaadin/client/ui/VOverlay.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'client/src') diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java index 83abccf2bb..d35201460e 100644 --- a/client/src/com/vaadin/client/ui/VOverlay.java +++ b/client/src/com/vaadin/client/ui/VOverlay.java @@ -112,21 +112,27 @@ public class VOverlay extends PopupPanel implements CloseHandler { private static int topFix = -1; - /* + /** * Shadow element style. If an extending class wishes to use a different * style of shadow, it can use setShadowStyle(String) to give the shadow * element a new style name. */ public static final String CLASSNAME_SHADOW = "v-shadow"; + /** + * Style name for the overlay container element (see + * {@link #getOverlayContainer()} + */ + public static final String CLASSNAME_CONTAINER = "v-overlay-container"; + /* * The shadow element for this overlay. */ private Element shadow; /* - * Creator of VOverlow (widget that made the instance, not the layout - * parent) + * The creator of this VOverlay (the widget that made the instance, not the + * layout parent) */ private Widget owner; @@ -650,7 +656,7 @@ public class VOverlay extends PopupPanel implements CloseHandler { if (ac == null) { // could not figure out which one we belong to, styling will // probably fail - VConsole.error("Could not determin ApplicationConnection for Overlay. Overlay will be attached directly to the root panel"); + VConsole.error("Could not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel"); return RootPanel.get().getElement(); } else { return getOverlayContainer(ac); @@ -676,7 +682,8 @@ public class VOverlay extends PopupPanel implements CloseHandler { container.setId(id); String styles = ac.getUIConnector().getWidget().getParent() .getStyleName(); - container.setClassName(styles); + container.addClassName(styles); + container.addClassName(CLASSNAME_CONTAINER); RootPanel.get().getElement().appendChild(container); } return container; -- cgit v1.2.3