changeset 721:484062ad6dda

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/2.2/scrum/graphics/jfx/rt
author Martin Sladecek <martin.sladecek@oracle.com>
date Tue, 27 Mar 2012 14:59:18 +0200
parents 761e72716571 0cca9d649695
children c4b198f66b4c
files javafx-ui-common/src/javafx/scene/Node.java javafx-ui-common/src/javafx/stage/Stage.java
diffstat 10 files changed, 2 insertions(+), 100 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Node.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Tue Mar 27 14:59:18 2012 +0200
@@ -6253,10 +6253,6 @@
 
     /**
      * Event dispatcher for invoking preprocessing of mouse events
-     *
-     * TODO: The dispatcher is inserted into the event dispatch chain, this
-     * needs to be solved differently, this way it's impossible for user
-     * to override this behavior.
      */
     private EventDispatcher preprocessMouseEventDispatcher;
 
--- a/javafx-ui-common/src/javafx/scene/Parent.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Parent.java	Tue Mar 27 14:59:18 2012 +0200
@@ -676,9 +676,6 @@
      */
     @Deprecated
     @Override protected Node impl_pickNodeLocal(PickRay pickRay) {
-//      TODO: FIX RT-5258: Optimize 3D picking
-       // if (intersects(pickRay)) {
-
             for (int i = children.size()-1; i >= 0; i--) {
                 Node picked = children.get(i).impl_pickNode(pickRay);
 
@@ -686,9 +683,6 @@
                     return picked;
                 }
             }
-
-      //}
-
         return null;
     }
 
@@ -1361,8 +1355,6 @@
         return extended;
     }
 
-
-    // TODO!!!
     // This is called when either the child is actually removed, OR IF IT IS
     // TOGGLED TO BE INVISIBLE. This is because in both cases it needs to be
     // cleared from the state which manages bounds.
@@ -1414,9 +1406,6 @@
             if (dirtyChildren != null) dirtyChildren.clear();
             cachedBoundsInvalid = false;
             cachedBounds.makeEmpty();
-            //TODO: isn't the above already done by childRemoved? If not in some
-            //      cases, shouldn't we do the following?
-            // top = left = bottom = right = near = far = null;
             return;
         }
 
@@ -1429,12 +1418,8 @@
 
             if (node.isVisible()) {
                 cachedBounds = node.getTransformedBounds(cachedBounds, BaseTransform.IDENTITY_TRANSFORM);
-                //TODO: shouldn't we do this?
-                //top = left = bottom = right = near = far = node;
             } else {
                 cachedBounds.makeEmpty();
-                //TODO: shouldn't we do this?
-                //top = left = bottom = right = near = far = null;
             }
             node.boundsChanged = false;
             return;
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Tue Mar 27 14:59:18 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;
             }
@@ -2496,8 +2466,6 @@
          * the Node.onDragSourceRecognized function.
          */
         private boolean processRecognized(Node n, DragEvent de) {
-            //TODO: Should get Mouse Event, for now we have to make up one
-            //      this code is not used right now anyway
             MouseEvent me = MouseEvent.impl_mouseEvent(de.getX(), de.getY(),
                     de.getSceneX(), de.getScreenY(), MouseButton.PRIMARY, 1,
                     false, false, false, false, false, true, false, false, false,
@@ -3108,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 {
@@ -3123,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;
@@ -3357,7 +3315,7 @@
      *                                                                             *
      ******************************************************************************/
 
-    class KeyHandler implements InvalidationListener {
+    class KeyHandler {
         private Node focusOwner = null;
         private Node getFocusOwner() { return focusOwner; }
 
@@ -3454,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
-        }
     }
     /***************************************************************************
      *                                                                         *
--- a/javafx-ui-common/src/javafx/scene/input/DragEvent.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/input/DragEvent.java	Tue Mar 27 14:59:18 2012 +0200
@@ -730,10 +730,6 @@
             double _screenX, double _screenY, TransferMode _transferMode,
             Dragboard _dragboard, TKDropEvent _tkDropEvent) {
         
-        //TODO: this is not nice. Toolkit always creates DragEvent of type ANY
-        //      and scenegraph then copies it and fixes the type.
-        //      Serious scenegraph/toolkit contract rework is needed
-        //      to get rid of this.
         DragEvent de = new DragEvent(DragEvent.ANY);
 
         de.x = _x;
--- a/javafx-ui-common/src/javafx/scene/input/Dragboard.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/input/Dragboard.java	Tue Mar 27 14:59:18 2012 +0200
@@ -63,18 +63,5 @@
     public static Dragboard impl_create(TKClipboard peer) {
         return new Dragboard(peer);
     }
-
-    // TODO: DragView support
-//    /**
-//     * Visual representation of data being transfered in a drag and drop gesture.
-//     * This will be shown to the side of the mouse cursor as it is moved around
-//     * the screen.
-//     */
-//    public Node dragView;
-//
-//    /**
-//     * Specifies the opacity of the dragView node as the drag occurs. If this
-//     * is not specified, a default opacity of 0.65 will be applied.
-//     */
-//    public float dragViewOpacity = 0.65f;
+    
 }
--- a/javafx-ui-common/src/javafx/scene/shape/Path.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/shape/Path.java	Tue Mar 27 14:59:18 2012 +0200
@@ -189,10 +189,6 @@
     private final ObservableList<PathElement> elements = new TrackableObservableList<PathElement>() {
         @Override
         protected void onChanged(Change<PathElement> c) {
-            //
-            // TODO: Need to keep a list of Path objects in PathElement if we want
-            // to support sharability. See how transforms is handled in Node.
-            //
             List<PathElement> list = c.getList();
             boolean firstElementChanged = false;
             while (c.next()) {
--- a/javafx-ui-common/src/javafx/scene/shape/Rectangle.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/shape/Rectangle.java	Tue Mar 27 14:59:18 2012 +0200
@@ -504,7 +504,6 @@
         }
         if ((getArcWidth() > 0) && (getArcHeight() > 0)
                 && ((tx.getType() & NON_RECTILINEAR_TYPE_MASK) != 0)) {
-            // TODO: Optimize rotated bounds...
             return computeShapeBounds(bounds, tx, impl_configShape());
         }
         double upad;
--- a/javafx-ui-common/src/javafx/scene/shape/Shape.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/shape/Shape.java	Tue Mar 27 14:59:18 2012 +0200
@@ -945,10 +945,8 @@
                 x1 += dx;
                 y1 += dy;
             }
-            // TODO - only pad by upad or dpad, depending on transform
             _dpad += upad;
         } else {
-            // TODO - only pad by upad or dpad, depending on transform
             x0 -= upad;
             y0 -= upad;
             x1 += upad*2;
--- a/javafx-ui-common/src/javafx/stage/PopupWindow.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/stage/PopupWindow.java	Tue Mar 27 14:59:18 2012 +0200
@@ -217,9 +217,6 @@
     /**
      * Specifies whether Popups should auto hide. If a popup loses focus and
      * autoHide is true, then the popup will be hidden automatically.
-     * TODO How does this function if you want to animate the popup becoming invisible??
-     * For example, if you wanted to scroll up the popup (such as if the popup
-     * is used for a drop down list).
      * @defaultValue false
      */
     private BooleanProperty autoHide =
--- a/javafx-ui-common/src/javafx/stage/Stage.java	Wed Mar 21 19:05:57 2012 -0700
+++ b/javafx-ui-common/src/javafx/stage/Stage.java	Tue Mar 27 14:59:18 2012 +0200
@@ -227,8 +227,6 @@
         super.show();
     }
     
-    // TODO do I also want to expose the model as being a writable model?
-    
     private boolean primary = false;
 
     /**
@@ -242,7 +240,6 @@
         this.primary = primary;
     }
 
-    // TODO: consider making this public
     /**
      * Returns whether this stage is the primary stage.
      * When run as an applet, the primary stage will appear in the broswer
@@ -911,7 +908,6 @@
         }
     }
 
-    // TODO: remove
     /**
      * Closes this {@code Stage}.
      * This call is equivalent to {@code hide()}.