JavaFX Sun在JDK10中的InputEventUtils

时间:2018-06-03 13:16:34

标签: java javafx sun java-module

我正在尝试在JDK 10下构建一个库。该库是用JDK 8创建的。

public DockEvent(Object source, EventTarget target, EventType<? extends DockEvent> eventType,
      double x, double y, double screenX, double screenY, PickResult pickResult, Node contents) {
    super(source, target, eventType);
    this.x = x;
    this.y = y;
    this.screenX = screenX;
    this.screenY = screenY;
    this.sceneX = x;
    this.sceneY = y;
    this.pickResult = pickResult != null ? pickResult : new PickResult(target, x, y);
    final Point3D p = InputEventUtils.recomputeCoordinates(this.pickResult, null);
    this.x = p.getX();
    this.y = p.getY();
    this.z = p.getZ();
    this.contents = contents;
  }

但是我在这一行遇到了编译错误:

final Point3D p = InputEventUtils.recomputeCoordinates(this.pickResult, null);

Java 9新模块系统隐藏了包com.sun.javafx.scene.input,我无法从InputEventUtils访问recomputeCoordinates(PickResult,Object)静态方法。这对于创建活动至关重要。

如何在不访问sun软件包的情况下获得相同的结果?

0 个答案:

没有答案