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}
Assert.assertEquals(b2, window.getAssistiveDescription()[1]);
}
+
+ @Test
+ public void testSetPosition() {
+ window.setPosition(100, 200);
+ Assert.assertEquals(100, window.getPositionX());
+ Assert.assertEquals(200, window.getPositionY());
+ }
}