From 3db6df2eabcb7c3d9461ea6ff2b89b95cf6446d3 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 23 Jun 2014 20:10:50 +0300 Subject: [PATCH] Remove unused VWindowOverlay (#14055) Change-Id: I3125dec887106e746b95c220f587a8d3e39be0f0 --- client/src/com/vaadin/client/VTooltip.java | 4 +- client/src/com/vaadin/client/ui/VWindow.java | 6 +- .../com/vaadin/client/ui/VWindowOverlay.java | 78 ------------------- 3 files changed, 5 insertions(+), 83 deletions(-) delete mode 100644 client/src/com/vaadin/client/ui/VWindowOverlay.java diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java index 7d28b2e543..d61af537a9 100644 --- a/client/src/com/vaadin/client/VTooltip.java +++ b/client/src/com/vaadin/client/VTooltip.java @@ -38,12 +38,12 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; -import com.vaadin.client.ui.VWindowOverlay; +import com.vaadin.client.ui.VOverlay; /** * TODO open for extension */ -public class VTooltip extends VWindowOverlay { +public class VTooltip extends VOverlay { private static final String CLASSNAME = "v-tooltip"; private static final int MARGIN = 4; public static final int TOOLTIP_EVENTS = Event.ONKEYDOWN diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index 7c1a21f654..1cee727bc9 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -76,9 +76,9 @@ import com.vaadin.shared.ui.window.WindowRole; * * @author Vaadin Ltd */ -public class VWindow extends VWindowOverlay implements - ShortcutActionHandlerOwner, ScrollHandler, KeyDownHandler, - KeyUpHandler, FocusHandler, BlurHandler, Focusable { +public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, + ScrollHandler, KeyDownHandler, KeyUpHandler, FocusHandler, BlurHandler, + Focusable { private static ArrayList windowOrder = new ArrayList(); diff --git a/client/src/com/vaadin/client/ui/VWindowOverlay.java b/client/src/com/vaadin/client/ui/VWindowOverlay.java deleted file mode 100644 index 41a8276402..0000000000 --- a/client/src/com/vaadin/client/ui/VWindowOverlay.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2000-2014 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.client.ui; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.RootPanel; -import com.vaadin.client.ApplicationConnection; - -public class VWindowOverlay extends VOverlay { - public VWindowOverlay() { - } - - public VWindowOverlay(boolean autoHide, boolean modal, boolean showShadow) { - super(autoHide, modal, showShadow); - } - - /** - * Gets the 'overlay container' element. Tries to find the current - * {@link ApplicationConnection} using {@link #getApplicationConnection()}. - * - * @return the overlay container element for the current - * {@link ApplicationConnection} or another element if the current - * {@link ApplicationConnection} cannot be determined. - */ - @Override - public com.google.gwt.user.client.Element getOverlayContainer() { - ApplicationConnection ac = getApplicationConnection(); - if (ac == null) { - return super.getOverlayContainer(); - } else { - Element overlayContainer = getOverlayContainer(ac); - return DOM.asOld(overlayContainer); - } - } - - /** - * Gets the 'overlay container' element pertaining to the given - * {@link ApplicationConnection}. Each overlay should be created in a - * overlay container element, so that the correct theme and styles can be - * applied. - * - * @param ac - * A reference to {@link ApplicationConnection} - * @return The overlay container - */ - public static com.google.gwt.user.client.Element getOverlayContainer( - ApplicationConnection ac) { - String id = ac.getConfiguration().getRootPanelId(); - id = id += "-window-overlays"; - Element container = DOM.getElementById(id); - if (container == null) { - container = DOM.createDiv(); - container.setId(id); - String styles = ac.getUIConnector().getWidget().getParent() - .getStyleName(); - container.addClassName(styles); - container.addClassName(CLASSNAME_CONTAINER); - RootPanel.get().getElement().appendChild(container); - } - - return DOM.asOld(container); - } -} -- 2.39.5