diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-01-31 16:55:33 +0200 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2013-02-08 13:40:31 +0200 |
commit | 91a04460db80dc505730c0deb5ac451235ace54e (patch) | |
tree | 78581f77c054356f17ff6b33503c9108a67a0034 /client/src | |
parent | 9c6f83505896145c6d84534c610720ede83993e0 (diff) | |
download | vaadin-framework-91a04460db80dc505730c0deb5ac451235ace54e.tar.gz vaadin-framework-91a04460db80dc505730c0deb5ac451235ace54e.zip |
Add "v-overlay-container" class name to the overlay container for easier customization (related to #10860)
Change-Id: I5cd37e7305b72840f3cca2eba68632055f06d599
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/VOverlay.java | 17 |
1 files changed, 12 insertions, 5 deletions
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<PopupPanel> { 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<PopupPanel> { 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<PopupPanel> { 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; |