{"action":"created","comment":{"url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/comments/200205478","pull_request_review_id":134475313,"id":200205478,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDIwNTQ3OA==","diff_hunk":"@@ -0,0 +1,373 @@\n+/*\n+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.\n+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n+ *\n+ * This code is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU General Public License version 2 only, as\n+ * published by the Free Software Foundation.  Oracle designates this\n+ * particular file as subject to the \"Classpath\" exception as provided\n+ * by Oracle in the LICENSE file that accompanied this code.\n+ *\n+ * This code is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\n+ * version 2 for more details (a copy is included in the LICENSE file that\n+ * accompanied this code).\n+ *\n+ * You should have received a copy of the GNU General Public License version\n+ * 2 along with this work; if not, write to the Free Software Foundation,\n+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n+ *\n+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n+ * or visit www.oracle.com if you need additional information or have any\n+ * questions.\n+ */\n+\n+package javafx.scene.robot;\n+\n+import static com.sun.javafx.FXPermissions.CREATE_ROBOT_PERMISSION;\n+\n+import java.util.Objects;\n+\n+import javafx.geometry.Point2D;\n+import javafx.geometry.Rectangle2D;\n+import javafx.scene.image.Image;\n+import javafx.scene.image.WritableImage;\n+import javafx.scene.input.KeyCode;\n+import javafx.scene.input.MouseButton;\n+import javafx.scene.paint.Color;\n+\n+import com.sun.glass.ui.Application;\n+import com.sun.glass.ui.GlassRobot;\n+import com.sun.javafx.tk.Toolkit;\n+\n+/**\n+ * A {@code Robot} is used for simulating user interaction such as\n+ * typing keys on the keyboard and using the mouse as well as capturing\n+ * graphical information without requiring a {@link javafx.scene.Scene}\n+ * instance. Robot objects must be constructed and used on the JavaFX\n+ * Application Thread.\n+ *\n+ * @since 11\n+ */\n+public final class Robot {\n+\n+    private final GlassRobot peer;\n+\n+    /**\n+     * Constructs a new {@code Robot} that can be used for simulating user\n+     * interactions. If a security manager is present, the application must\n+     * have the {@link javafx.util.FXPermission} {@code \"createRobot\"} permission\n+     * in order to construct a {@code Robot} object.\n+     *\n+     * @throws IllegalStateException if this object is constructed on a thread\n+     * other than the JavaFX Application Thread.\n+     * @throws SecurityException if a security manager exists and the application\n+     * does not have the {@link javafx.util.FXPermission} {@code \"createRobot\"}\n+     * permission.\n+     */\n+    public Robot() {\n+        Application.checkEventThread();\n+\n+        // Ensure we have proper permission for creating a robot.\n+        final SecurityManager sm = System.getSecurityManager();\n+        if (sm != null) {\n+            sm.checkPermission(CREATE_ROBOT_PERMISSION);\n+        }\n+\n+        peer = Toolkit.getToolkit().createRobot();\n+        Objects.requireNonNull(peer);\n+        peer.create();\n+    }\n+\n+    /**\n+     * Presses the specified {@link KeyCode} key.\n+     *\n+     * @param keyCode the key to press\n+     * @throws IllegalStateException if this method is called on a thread\n+     * other than the JavaFX Application Thread.\n+     */\n+    public void keyPress(KeyCode keyCode) {","path":"modules/javafx.graphics/src/main/java/javafx/scene/robot/Robot.java","position":90,"original_position":90,"commit_id":"5d6015326b8b731aff90e046c6ec45f6657dc965","original_commit_id":"24da10b7113260b295c73bddc833e4310bcb6f60","user":{"login":"brcolow","id":6589866,"node_id":"MDQ6VXNlcjY1ODk4NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6589866?v=4","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"body":"Shall I go ahead and make this change, Kevin?","created_at":"2018-07-04T22:05:31Z","updated_at":"2018-07-04T22:05:31Z","html_url":"https://github.com/javafxports/openjdk-jfx/pull/36#discussion_r200205478","pull_request_url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/comments/200205478"},"html":{"href":"https://github.com/javafxports/openjdk-jfx/pull/36#discussion_r200205478"},"pull_request":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36"}},"in_reply_to_id":200134116},"pull_request":{"url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36","id":176934982,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc2OTM0OTgy","html_url":"https://github.com/javafxports/openjdk-jfx/pull/36","diff_url":"https://github.com/javafxports/openjdk-jfx/pull/36.diff","patch_url":"https://github.com/javafxports/openjdk-jfx/pull/36.patch","issue_url":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/36","number":36,"state":"open","locked":false,"title":"JDK-8203409: FX Robot API","user":{"login":"brcolow","id":6589866,"node_id":"MDQ6VXNlcjY1ODk4NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6589866?v=4","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"body":"https://bugs.openjdk.java.net/browse/JDK-8203409","created_at":"2018-03-22T23:16:06Z","updated_at":"2018-07-04T22:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3bb2a0c406b1825ea4390b89cc9668e50254e101","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":837099838,"node_id":"MDU6TGFiZWw4MzcwOTk4Mzg=","url":"https://api.github.com/repos/javafxports/openjdk-jfx/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36/commits","review_comments_url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36/comments","review_comment_url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/36/comments","statuses_url":"https://api.github.com/repos/javafxports/openjdk-jfx/statuses/5d6015326b8b731aff90e046c6ec45f6657dc965","head":{"label":"brcolow:robot","ref":"robot","sha":"5d6015326b8b731aff90e046c6ec45f6657dc965","user":{"login":"brcolow","id":6589866,"node_id":"MDQ6VXNlcjY1ODk4NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6589866?v=4","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"repo":{"id":121555850,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1NTU4NTA=","name":"openjdk-jfx","full_name":"brcolow/openjdk-jfx","owner":{"login":"brcolow","id":6589866,"node_id":"MDQ6VXNlcjY1ODk4NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6589866?v=4","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brcolow/openjdk-jfx","description":null,"fork":true,"url":"https://api.github.com/repos/brcolow/openjdk-jfx","forks_url":"https://api.github.com/repos/brcolow/openjdk-jfx/forks","keys_url":"https://api.github.com/repos/brcolow/openjdk-jfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brcolow/openjdk-jfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brcolow/openjdk-jfx/teams","hooks_url":"https://api.github.com/repos/brcolow/openjdk-jfx/hooks","issue_events_url":"https://api.github.com/repos/brcolow/openjdk-jfx/issues/events{/number}","events_url":"https://api.github.com/repos/brcolow/openjdk-jfx/events","assignees_url":"https://api.github.com/repos/brcolow/openjdk-jfx/assignees{/user}","branches_url":"https://api.github.com/repos/brcolow/openjdk-jfx/branches{/branch}","tags_url":"https://api.github.com/repos/brcolow/openjdk-jfx/tags","blobs_url":"https://api.github.com/repos/brcolow/openjdk-jfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brcolow/openjdk-jfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brcolow/openjdk-jfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/brcolow/openjdk-jfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brcolow/openjdk-jfx/statuses/{sha}","languages_url":"https://api.github.com/repos/brcolow/openjdk-jfx/languages","stargazers_url":"https://api.github.com/repos/brcolow/openjdk-jfx/stargazers","contributors_url":"https://api.github.com/repos/brcolow/openjdk-jfx/contributors","subscribers_url":"https://api.github.com/repos/brcolow/openjdk-jfx/subscribers","subscription_url":"https://api.github.com/repos/brcolow/openjdk-jfx/subscription","commits_url":"https://api.github.com/repos/brcolow/openjdk-jfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/brcolow/openjdk-jfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/brcolow/openjdk-jfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/brcolow/openjdk-jfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/brcolow/openjdk-jfx/contents/{+path}","compare_url":"https://api.github.com/repos/brcolow/openjdk-jfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brcolow/openjdk-jfx/merges","archive_url":"https://api.github.com/repos/brcolow/openjdk-jfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brcolow/openjdk-jfx/downloads","issues_url":"https://api.github.com/repos/brcolow/openjdk-jfx/issues{/number}","pulls_url":"https://api.github.com/repos/brcolow/openjdk-jfx/pulls{/number}","milestones_url":"https://api.github.com/repos/brcolow/openjdk-jfx/milestones{/number}","notifications_url":"https://api.github.com/repos/brcolow/openjdk-jfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brcolow/openjdk-jfx/labels{/name}","releases_url":"https://api.github.com/repos/brcolow/openjdk-jfx/releases{/id}","deployments_url":"https://api.github.com/repos/brcolow/openjdk-jfx/deployments","created_at":"2018-02-14T20:07:34Z","updated_at":"2018-04-15T05:10:58Z","pushed_at":"2018-07-04T22:04:36Z","git_url":"git://github.com/brcolow/openjdk-jfx.git","ssh_url":"git@github.com:brcolow/openjdk-jfx.git","clone_url":"https://github.com/brcolow/openjdk-jfx.git","svn_url":"https://github.com/brcolow/openjdk-jfx","homepage":null,"size":479779,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"javafxports:develop","ref":"develop","sha":"6c29c7c7c714147b5bc797fc2874de85620831e5","user":{"login":"javafxports","id":34437418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NDM3NDE4","avatar_url":"https://avatars3.githubusercontent.com/u/34437418?v=4","gravatar_id":"","url":"https://api.github.com/users/javafxports","html_url":"https://github.com/javafxports","followers_url":"https://api.github.com/users/javafxports/followers","following_url":"https://api.github.com/users/javafxports/following{/other_user}","gists_url":"https://api.github.com/users/javafxports/gists{/gist_id}","starred_url":"https://api.github.com/users/javafxports/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javafxports/subscriptions","organizations_url":"https://api.github.com/users/javafxports/orgs","repos_url":"https://api.github.com/users/javafxports/repos","events_url":"https://api.github.com/users/javafxports/events{/privacy}","received_events_url":"https://api.github.com/users/javafxports/received_events","type":"Organization","site_admin":false},"repo":{"id":121499201,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE0OTkyMDE=","name":"openjdk-jfx","full_name":"javafxports/openjdk-jfx","owner":{"login":"javafxports","id":34437418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NDM3NDE4","avatar_url":"https://avatars3.githubusercontent.com/u/34437418?v=4","gravatar_id":"","url":"https://api.github.com/users/javafxports","html_url":"https://github.com/javafxports","followers_url":"https://api.github.com/users/javafxports/followers","following_url":"https://api.github.com/users/javafxports/following{/other_user}","gists_url":"https://api.github.com/users/javafxports/gists{/gist_id}","starred_url":"https://api.github.com/users/javafxports/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javafxports/subscriptions","organizations_url":"https://api.github.com/users/javafxports/orgs","repos_url":"https://api.github.com/users/javafxports/repos","events_url":"https://api.github.com/users/javafxports/events{/privacy}","received_events_url":"https://api.github.com/users/javafxports/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/javafxports/openjdk-jfx","description":"Mirror of the OpenJFX repository","fork":false,"url":"https://api.github.com/repos/javafxports/openjdk-jfx","forks_url":"https://api.github.com/repos/javafxports/openjdk-jfx/forks","keys_url":"https://api.github.com/repos/javafxports/openjdk-jfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javafxports/openjdk-jfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javafxports/openjdk-jfx/teams","hooks_url":"https://api.github.com/repos/javafxports/openjdk-jfx/hooks","issue_events_url":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/events{/number}","events_url":"https://api.github.com/repos/javafxports/openjdk-jfx/events","assignees_url":"https://api.github.com/repos/javafxports/openjdk-jfx/assignees{/user}","branches_url":"https://api.github.com/repos/javafxports/openjdk-jfx/branches{/branch}","tags_url":"https://api.github.com/repos/javafxports/openjdk-jfx/tags","blobs_url":"https://api.github.com/repos/javafxports/openjdk-jfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javafxports/openjdk-jfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javafxports/openjdk-jfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/javafxports/openjdk-jfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javafxports/openjdk-jfx/statuses/{sha}","languages_url":"https://api.github.com/repos/javafxports/openjdk-jfx/languages","stargazers_url":"https://api.github.com/repos/javafxports/openjdk-jfx/stargazers","contributors_url":"https://api.github.com/repos/javafxports/openjdk-jfx/contributors","subscribers_url":"https://api.github.com/repos/javafxports/openjdk-jfx/subscribers","subscription_url":"https://api.github.com/repos/javafxports/openjdk-jfx/subscription","commits_url":"https://api.github.com/repos/javafxports/openjdk-jfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/javafxports/openjdk-jfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/javafxports/openjdk-jfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/javafxports/openjdk-jfx/contents/{+path}","compare_url":"https://api.github.com/repos/javafxports/openjdk-jfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javafxports/openjdk-jfx/merges","archive_url":"https://api.github.com/repos/javafxports/openjdk-jfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javafxports/openjdk-jfx/downloads","issues_url":"https://api.github.com/repos/javafxports/openjdk-jfx/issues{/number}","pulls_url":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls{/number}","milestones_url":"https://api.github.com/repos/javafxports/openjdk-jfx/milestones{/number}","notifications_url":"https://api.github.com/repos/javafxports/openjdk-jfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javafxports/openjdk-jfx/labels{/name}","releases_url":"https://api.github.com/repos/javafxports/openjdk-jfx/releases{/id}","deployments_url":"https://api.github.com/repos/javafxports/openjdk-jfx/deployments","created_at":"2018-02-14T10:41:28Z","updated_at":"2018-07-03T15:11:29Z","pushed_at":"2018-07-04T22:04:38Z","git_url":"git://github.com/javafxports/openjdk-jfx.git","ssh_url":"git@github.com:javafxports/openjdk-jfx.git","clone_url":"https://github.com/javafxports/openjdk-jfx.git","svn_url":"https://github.com/javafxports/openjdk-jfx","homepage":"https://wiki.openjdk.java.net/display/OpenJFX/Main","size":495258,"stargazers_count":184,"watchers_count":184,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":36,"open_issues":47,"watchers":184,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36"},"html":{"href":"https://github.com/javafxports/openjdk-jfx/pull/36"},"issue":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/36"},"comments":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/javafxports/openjdk-jfx/statuses/5d6015326b8b731aff90e046c6ec45f6657dc965"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"brcolow"}}