< prev index next >

modules/media/src/main/java/javafx/scene/media/MediaView.java

Print this page

        

@@ -101,10 +101,31 @@
 
             @Override
             public void doUpdatePeer(Node node) {
                 ((MediaView) node).doUpdatePeer();
             }
+
+            @Override
+            public void doTransformsChanged(Node node) {
+                ((MediaView) node).doTransformsChanged();
+            }
+
+            @Override
+            public BaseBounds doComputeGeomBounds(Node node,
+            BaseBounds bounds, BaseTransform tx) {
+                return ((MediaView) node).doComputeGeomBounds(bounds, tx);
+            }
+
+            @Override
+            public boolean doComputeContains(Node node, double localX, double localY) {
+                return ((MediaView) node).doComputeContains(localX, localY);
+            }
+
+            @Override
+            public Object doProcessMXNode(Node node, MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
+                return ((MediaView) node).doProcessMXNode(alg, ctx);
+            }
         });
     }
 
     /**
      * The name of the property in the {@link ObservableMap} returned by

@@ -131,11 +152,11 @@
     private InvalidationListener errorListener = new MediaErrorInvalidationListener();
 
     /** Listener which causes the geometry to be updated when the media dimension changes. */
     private InvalidationListener mediaDimensionListener = value -> {
         NodeHelper.markDirty(this, DirtyBits.NODE_VIEWPORT);
-        impl_geomChanged();
+        NodeHelper.geomChanged(this);
     };
 
     /** Listener for decoded frame rate. */
     private com.sun.media.jfxmedia.events.VideoFrameRateListener decodedFrameRateListener;
     private boolean registerVideoFrameRateListener = false;

@@ -236,11 +257,11 @@
     }
 
     private static Affine3D calculateNodeToSceneTransform(Node node) {
         final Affine3D transform = new Affine3D();
         do {
-            transform.preConcatenate(node.impl_getLeafTransform());
+            transform.preConcatenate(NodeHelper.getLeafTransform(node));
             node = node.getParent();
         } while (node != null);
 
         return transform;
     }

@@ -268,18 +289,15 @@
         getIOSPlayer().setOverlayOpacity(getOpacity());
         getIOSPlayer().setOverlayVisible(determineVisibility());
         updateOverlayTransformDirectly();
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     *
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    public void impl_transformsChanged() {
-        super.impl_transformsChanged();
+    private void doTransformsChanged() {
         if (HostUtils.isIOS()) {
             updateOverlayTransform();
         }
     }
 

@@ -307,11 +325,11 @@
         decodedFrameRateListener = createVideoFrameRateListener();
         setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
         if (HostUtils.isIOS()) {
             createListeners();
             parentProperty().addListener(parentListener);
-            impl_treeVisibleProperty().addListener(treeVisibleListener);
+            NodeHelper.treeVisibleProperty(this).addListener(treeVisibleListener);
             opacityProperty().addListener(opacityListener);
         }
     }
 
     /**

@@ -396,11 +414,11 @@
                             media.widthProperty().addListener(mediaDimensionListener);
                             media.heightProperty().addListener(mediaDimensionListener);
                         }
                     }
                     NodeHelper.markDirty(MediaView.this, DirtyBits.MEDIAVIEW_MEDIA);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(MediaView.this);
                     oldValue = newValue;
                 }
                 @Override
                 public Object getBean() {
                     return MediaView.this;

@@ -493,11 +511,11 @@
                     if (HostUtils.isIOS()) {
                         updateOverlayPreserveRatio();
                     }
                     else {
                         NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_VIEWPORT);
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(MediaView.this);
                     }
                 }
 
                 @Override
                 public Object getBean() {

@@ -594,11 +612,11 @@
                     if (HostUtils.isIOS()) {
                         updateOverlayX();
                     }
                     else {
                         NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_GEOMETRY);
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(MediaView.this);
                     }
                 }
 
                 @Override
                 public Object getBean() {

@@ -644,11 +662,11 @@
                     if (HostUtils.isIOS()) {
                         updateOverlayY();
                     }
                     else {
                         NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_GEOMETRY);
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(MediaView.this);
                     }
                 }
 
                 @Override
                 public Object getBean() {

@@ -701,11 +719,11 @@
                     if (HostUtils.isIOS()) {
                         updateOverlayWidth();
                     }
                     else {
                         NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_VIEWPORT);
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(MediaView.this);
                     }
                 }
 
                 @Override
                 public Object getBean() {

@@ -758,11 +776,11 @@
                     if (HostUtils.isIOS()) {
                         updateOverlayHeight();
                     }
                     else {
                         NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_VIEWPORT);
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(MediaView.this);
                     }
                 }
 
                 @Override
                 public Object getBean() {

@@ -810,11 +828,11 @@
             viewport = new ObjectPropertyBase<Rectangle2D>() {
 
                 @Override
                 protected void invalidated() {
                     NodeHelper.markDirty(MediaView.this, DirtyBits.NODE_VIEWPORT);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(MediaView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return MediaView.this;

@@ -835,16 +853,16 @@
             final NGMediaView peer = NodeHelper.getPeer(this);
             peer.setMediaProvider(player);
         }
 
         NodeHelper.markDirty(this, DirtyBits.MEDIAVIEW_MEDIA);
-        impl_geomChanged();
+        NodeHelper.geomChanged(this);
     }
 
     void notifyMediaSizeChange() {
         NodeHelper.markDirty(this, DirtyBits.NODE_VIEWPORT);
-        impl_geomChanged();
+        NodeHelper.geomChanged(this);
     }
 
     void notifyMediaFrameUpdated() {
         decodedFrameCount++;
         NodeHelper.markDirty(this, DirtyBits.NODE_CONTENTS);

@@ -858,17 +876,14 @@
         // this has to be done on the main toolkit thread...
         peer.setFrameTracker(new MediaViewFrameTracker());
         return peer;
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
+    private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {
 
         // need to figure out the width/height to use for computing bounds
         Media media = (getMediaPlayer() == null) ? null : getMediaPlayer().getMedia();
         double w = media != null ? media.getWidth()  : 0; // if media is null, width will be 0
         double h = media != null ? media.getHeight() : 0; // if media is null, height will be 0

@@ -923,17 +938,14 @@
                 (float)(getX()+w), (float)(getY()+h), 0.0f);
         bounds = tx.transform(bounds, bounds);
         return bounds;
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    protected boolean impl_computeContains(double localX, double localY) {
+    private boolean doComputeContains(double localX, double localY) {
         // Currently this is simply a local bounds test which is already tested
         // by the caller (Node.contains()).
         return true;
     }
 

@@ -1030,16 +1042,14 @@
         public void incrementRenderedFrameCount(int count) {
             renderedFrameCount += count;
         }
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    public Object impl_processMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
+    private Object doProcessMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
         return alg.processLeafNode(this, ctx);
     }
 
     /**
      * Called by MediaPlayer when it becomes ready
< prev index next >