Rectangle rectangle;
if (windowName == null) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
rectangle = new Rectangle(0, 0, screenSize.width, screenSize.height);
} else if (component == null) {
IPredicate windowTest = new SameTitle(windowName, windowMonitor.getNamingStrategy());
Window window = windowMonitor.getWindow(windowTest);
Dimension windowSize = window.getSize();
rectangle = new Rectangle(window.getX(), window.getY(), windowSize.width, windowSize.height);
} else {
Point componentPosition = component.getPosition();