changeset 720:0cca9d649695

RT-19167: TODOs evaluation & cleanup.
author Martin Sladecek <martin.sladecek@oracle.com>
date Tue, 27 Mar 2012 14:57:07 +0200
parents dd7676637b7f
children 484062ad6dda
files javafx-ui-common/src/javafx/scene/Scene.java
diffstat 1 files changed, 1 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Tue Mar 27 14:23:17 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Tue Mar 27 14:57:07 2012 +0200
@@ -633,8 +633,6 @@
             // content may have been added after scene was constructed, so
             // try again to set size based on content if the scene or window
             // weren't explicitly sized;
-            // (TODO): ideally we'd do this just once, at the latest point
-            // we could, before the window was assigned a size and made visible
             preferredSize();
         }
         impl_peer.setFillPaint(getFill() == null ? null : tk.getPaint(getFill()));
@@ -1141,10 +1139,6 @@
         protected void onChanged(Change<String> c) {
             StyleManager.getInstance().updateStylesheets(Scene.this);
             getRoot().impl_reapplyCSS();
-            // we'll immediately reapply the style for this scene. It might be
-            // better to defer eventually
-            // TODO needs to be wired up
-            // StyleManager.getInstance().getStyleHelper(this);
         }
     };
 
@@ -1194,14 +1188,9 @@
         if (PerformanceTracker.isLoggingEnabled()) {
             PerformanceTracker.logEvent("Scene.init for [" + this + "]");
         }
-        // TODO JASPER sure there is more init needed here
-
         mouseHandler = new MouseHandler();
         clickGenerator = new ClickGenerator();
 
-        // TODO need to reimplement
-        //StyleManager.getInstance().getStyleHelper(this);
-
         initialized = true;
 
         if (PerformanceTracker.isLoggingEnabled()) {
@@ -1491,7 +1480,6 @@
      * Set to true if something has happened to the focused node that makes
      * it no longer eligible to have the focus.
      *
-     * TODO: need to schedule a pulse if this turns true?
      */
     private boolean focusDirty = true;
 
@@ -1665,7 +1653,6 @@
     /**
      * Gets the scene's current focus owner node.
      *
-     * TODO: probably should be removed in favor of impl_focusOwner below.
      *
      * @treatAsPrivate implementation detail
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
@@ -1679,10 +1666,6 @@
      * variable might be false if this scene has no window, or if the
      * window is inactive (window.focused == false).
      *
-     * TODO this was added because of RT-3930. This needs to be reconciled
-     * with impl_getFocusOwner(). We don't need both. Exposing a variable
-     * is more powerful because it allows code to bind to it.
-     *
      * @treatAsPrivate implementation detail
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
      */
@@ -1751,15 +1734,6 @@
      * Returns true if this scene is quiescent, i.e. it has no activity
      * pending on it such as CSS processing or layout requests.
      *
-     * TODO this is for testing purposes only. It's not clear that
-     * the set of things this checks is exactly right. It doesn't check
-     * for events pending in the event queue for instance. However, it
-     * seems to work reasonably well at present for UI testing.
-     *
-     * TODO this should be replaced with a better interface, say a
-     * package-private interface that can be called from test support
-     * code that has been loaded into javafx.scene.
-     *
      * @return boolean indicating whether the scene is quiescent
      * @treatAsPrivate implementation detail
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
@@ -1775,9 +1749,6 @@
      * A listener for pulses, used for testing. If non-null, this is called at
      * the very end of ScenePulseListener.pulse().
      *
-     * TODO this is public so it can be written to from test code. Ugly,
-     * but effective. This should be replaced with a cleaner interface.
-     *
      * @treatAsPrivate implementation detail
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
      */
@@ -2230,7 +2201,6 @@
             }
             int order = touchMap.getOrder(id);
 
-            //TODO: this is workaround for RT-20139, remove when fixed
             if (!nextTouchEvent.impl_isDirect()) {
                 order = touchPointIndex - 1;
             }
@@ -3106,8 +3076,6 @@
                 if (getCamera() instanceof PerspectiveCamera) {
                     final PickRay pickRay = new PickRay();
                     Scene.this.impl_peer.computePickRay((float)e.getX(), (float)e.getY(), pickRay);
-    //                System.out.println("** 3D: origin = " + pickRay.getOriginNoClone()
-    //                        + ", direction = " + pickRay.getDirectionNoClone());
                     pickedTarget = pickNode(pickRay);
                 }
                 else {
@@ -3121,14 +3089,6 @@
 
             EventTarget target;
             if (pdrInProgress) {
-                // TODO I believe this is bogus. We should still deliver mouse
-                // enter / exit / move events to nodes that are not part of the
-                // press-drag-release event, but only pdr nodes get the mouse
-                // dragged events, and other nodes DO NOT (?) get pressed events...
-                // The use case here is that I press a button and a popup is visible
-                // and while the button is still depressed I "drag" over the item
-                // in the popup I want and release. So in this case I need to get
-                // some events on the items in the popup, just not the drag events.
                 target = pdrEventTarget;
             } else {
                 target = pickedTarget;
@@ -3355,7 +3315,7 @@
      *                                                                             *
      ******************************************************************************/
 
-    class KeyHandler implements InvalidationListener {
+    class KeyHandler {
         private Node focusOwner = null;
         private Node getFocusOwner() { return focusOwner; }
 
@@ -3452,12 +3412,6 @@
                 });
             }
         }
-
-        // TODO: What is the point of extending a listener, if handle() is not overridden?
-        @Override
-        public void invalidated(Observable valueModel) {
-            //nothing to do, implemented because of extending ChangeListener
-        }
     }
     /***************************************************************************
      *                                                                         *