Skip to content
Permalink
Browse files
8270839: Remove deprecated implementation methods from Scene
Reviewed-by: arapte, aghaisas
  • Loading branch information
kevinrushforth committed Jul 22, 2021
1 parent c490ddf commit 97d70afb74c5a2599326796ccc9ce799d76e0b96
Showing 3 changed files with 9 additions and 23 deletions.
@@ -25,6 +25,8 @@

package test.com.sun.javafx.scene.control.infrastructure;

import com.sun.javafx.scene.SceneHelper;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -63,7 +65,7 @@ public KeyEventFirer(EventTarget target) {
* Any one of those can be null, but not both. A null/not null scene decides
* about the delivering path of events. If null, events are delivered
* via <code>EventUtils.fire(target, keyEvent)</code>, otherwise via
* <code>scene.processKeyEvent(keyEvent)</code>.
* <code>SceneHelper.processKeyEvent(scene, keyEvent)</code>.
* <p>
* Note that in the latter case, the target doesn't matter - the scene
* delivers keyEvents to its focusOwner. Calling code is responsible to
@@ -111,14 +113,14 @@ public void doKeyTyped(KeyCode keyCode, KeyModifier... modifiers) {
* Dispatches the given events. The process depends on the state of
* this firer. If the scene is null, the events are delivered via
* Event.fireEvent(target,..), otherwise they are delivered via
* scene.processKeyEvent.
* SceneHelper.processKeyEvent.
*
* @param events the events to dispatch.
*/
private void fireEvents(KeyEvent... events) {
for (KeyEvent evt : events) {
if (scene != null) {
scene.processKeyEvent(evt);
SceneHelper.processKeyEvent(scene, evt);
} else {
Event.fireEvent(target, evt);
}
@@ -842,12 +842,7 @@ void initPeer() {
PerformanceTracker.logEvent("Scene.initPeer finished");
}

// FIXME: make this method package-scope in the next release
/**
* @deprecated This method was exposed erroneously and will be removed in a future version.
*/
@Deprecated(forRemoval = true, since = "17")
public void disposePeer() {
void disposePeer() {
if (peer == null) {
// This is fine, the window is either not shown yet and there is no
// need in disposing scene peer, or is hidden and disposePeer()
@@ -2140,13 +2135,7 @@ private void focusIneligible(Node node) {
traverse(node, Direction.NEXT);
}

// FIXME: make this method package-scope in the next release
/**
* @deprecated This method was exposed erroneously and will be removed in a future version.
* @param e undocumented method parameter
*/
@Deprecated(forRemoval = true, since = "17")
public void processKeyEvent(KeyEvent e) {
void processKeyEvent(KeyEvent e) {
if (dndGesture != null) {
if (!dndGesture.processKey(e)) {
dndGesture = null;
@@ -2232,13 +2221,7 @@ private void processInputMethodEvent(InputMethodEvent e) {
}
}

// FIXME: make this method package-scope in the next release
/**
* @deprecated This method was exposed erroneously and will be removed in a future version.
* @param enable undocumented method parameter
*/
@Deprecated(forRemoval = true, since = "17")
public void enableInputMethodEvents(boolean enable) {
void enableInputMethodEvents(boolean enable) {
if (peer != null) {
peer.enableInputMethodEvents(enable);
}
@@ -19,6 +19,7 @@
--add-exports javafx.graphics/com.sun.javafx.image.impl=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.image=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.prism.impl=ALL-UNNAMED
#

1 comment on commit 97d70af

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 97d70af Jul 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.