|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RobotFactory | Line # 25 | 1 | 0% | 1 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | /* | |
| 2 | * Created on Jun 3, 2009 | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | |
| 5 | * the License. You may obtain a copy of the License at | |
| 6 | * | |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | * | |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | |
| 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | |
| 11 | * specific language governing permissions and limitations under the License. | |
| 12 | * | |
| 13 | * Copyright @2009-2010 the original author or authors. | |
| 14 | */ | |
| 15 | package org.fest.swing.util; | |
| 16 | ||
| 17 | import java.awt.AWTException; | |
| 18 | import java.awt.Robot; | |
| 19 | ||
| 20 | /** | |
| 21 | * Understands creation of AWT <code>{@link Robot}</code>s. | |
| 22 | * | |
| 23 | * @author Alex Ruiz | |
| 24 | */ | |
| 25 | public class RobotFactory { | |
| 26 | ||
| 27 | /** | |
| 28 | * Constructs a <code>{@link Robot}</code> object in the coordinate system of the primary screen. | |
| 29 | * @return the created <code>Robot</code>. | |
| 30 | * @throws AWTException if the platform configuration does not allow low-level input control. This exception is always | |
| 31 | * thrown when <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code>. | |
| 32 | * @throws SecurityException if <code>createRobot</code> permission is not granted. | |
| 33 | */ | |
| 34 | 2239 |
public Robot newRobotInPrimaryScreen() throws AWTException { |
| 35 | 2239 | return new Robot(); |
| 36 | } | |
| 37 | } | |
|
||||||||||||