From 7adec3cd86956fde2fe3670ed4b0eef97bbb0904 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 19 Jan 2015 16:16:35 +0200 Subject: Convenience Window.setPosition(x,y) (#16335) Change-Id: If574863fc24cecb9f8d17773833817d67f3a0e12 --- server/src/com/vaadin/ui/Window.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'server/src') diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index 61664fc95d..4d63f40043 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -267,6 +267,21 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, return getState(false).positionX; } + /** + * Sets the position of the window on the screen using + * {@link #setPositionX(int)} and {@link #setPositionY(int)} + * + * @since + * @param x + * The new x coordinate for the window + * @param y + * The new y coordinate for the window + */ + public void setPosition(int x, int y) { + setPositionX(x); + setPositionY(y); + } + /** * Sets the distance of Window left border in pixels from left border of the * containing (main window). Has effect only if in {@link WindowMode#NORMAL} -- cgit v1.2.3