changeset 6405:a46da8e2262b

RT-35197: Use Lambda in FX runtime and samples [experiments: 3DViewer, Modena] Summary: This component was lambdified (unlambdified file names recorded in the JIRA) Reviewed-by: lisa.selle
author snorthov
date Mon, 03 Mar 2014 13:26:38 -0500
parents bc510bc82416
children 4742b5a6eb9b
files apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Loader.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MConnection.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/ContentModel.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/FourWayNavControl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Jfx3dViewerApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SessionManager.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SettingsController.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SimpleViewerApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/PolygonMeshView.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SkinningMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SubdivisionMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/utils3d/DragSupport.java apps/experiments/Modena/src/main/java/modena/Modena.java apps/experiments/Modena/src/main/java/modena/SameHeightTestController.java apps/experiments/Modena/src/main/java/modena/SamplePageHelpers.java apps/experiments/Modena/src/main/java/modena/SamplePageNavigation.java apps/experiments/Modena/src/main/java/modena/SamplePageTableHelper.java apps/experiments/Modena/src/main/java/modena/SamplePageTreeTableHelper.java apps/experiments/Modena/src/main/java/modena/SimpleWindowPage.java
diffstat 20 files changed, 429 insertions(+), 749 deletions(-) [+]
line wrap: on
line diff
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalApp.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalApp.java	Mon Mar 03 13:26:38 2014 -0500
@@ -34,7 +34,9 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
+
 import javax.imageio.ImageIO;
+
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
 import javafx.animation.Timeline;
@@ -42,8 +44,6 @@
 import javafx.beans.binding.ObjectBinding;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.embed.swing.SwingFXUtils;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Group;
 import javafx.scene.PerspectiveCamera;
 import javafx.scene.Scene;
@@ -67,6 +67,7 @@
 import javafx.stage.FileChooser;
 import javafx.stage.Stage;
 import javafx.util.Duration;
+
 import com.javafx.experiments.jfx3dviewer.AutoScalingGroup;
 
 /**
@@ -90,17 +91,9 @@
         // create toolbar
         ToolBar toolBar = new ToolBar();
         Button openButton = new Button("Open...");
-        openButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent event) {
-                open();
-            }
-        });
+        openButton.setOnAction(event -> open());
         Button saveButton = new Button("Save...");
-        saveButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent event) {
-                save();
-            }
-        });
+        saveButton.setOnAction(event -> save());
         final CheckBox invertCheckBox = new CheckBox("invert");
         final Slider scaleSlider = new Slider(1,50,2);
         toolBar.getItems().addAll(openButton,saveButton,
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Loader.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Loader.java	Mon Mar 03 13:26:38 2014 -0500
@@ -32,6 +32,7 @@
 package com.javafx.experiments.importers.maya;
 
 import com.javafx.experiments.importers.SmoothingGroups;
+
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -44,6 +45,7 @@
 import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import javafx.animation.Interpolator;
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
@@ -60,6 +62,7 @@
 import javafx.scene.shape.TriangleMesh;
 import javafx.scene.transform.Affine;
 import javafx.util.Duration;
+
 import com.javafx.experiments.importers.maya.parser.MParser;
 import com.javafx.experiments.importers.maya.values.MArray;
 import com.javafx.experiments.importers.maya.values.MBool;
@@ -79,14 +82,13 @@
 import com.javafx.experiments.shape3d.PolygonMeshView;
 import com.javafx.experiments.shape3d.SkinningMesh;
 import com.sun.javafx.geom.Vec3f;
+
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Arrays;
+
 import javafx.animation.AnimationTimer;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.scene.Parent;
-import javafx.scene.Scene;
 
 /** Loader */
 class Loader {
@@ -309,14 +311,11 @@
             if (targetMayaMeshNode.getScene() != null) {
                 skinningMeshTimer.start();
             }
-            targetMayaMeshView.sceneProperty().addListener(new ChangeListener<Scene>() {
-                @Override
-                public void changed(ObservableValue<? extends Scene> observable, Scene oldValue, Scene newValue) {
-                    if (newValue == null) {
-                        skinningMeshTimer.stop();
-                    } else {
-                        skinningMeshTimer.start();
-                    }
+            targetMayaMeshView.sceneProperty().addListener((observable, oldValue, newValue) -> {
+                if (newValue == null) {
+                    skinningMeshTimer.stop();
+                } else {
+                    skinningMeshTimer.start();
                 }
             });
         } else {
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MConnection.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MConnection.java	Mon Mar 03 13:26:38 2014 -0500
@@ -64,19 +64,15 @@
         return sourcePath.hashCode() ^ targetPath.hashCode();
     }
 
-    public static final Comparator SOURCE_PATH_COMPARATOR = new Comparator() {
-        public int compare(Object o1, Object o2) {
-            MConnection c1 = (MConnection) o1;
-            MConnection c2 = (MConnection) o2;
-            return c1.getSourcePath().compareTo(c2.getSourcePath());
-        }
+    public static final Comparator SOURCE_PATH_COMPARATOR = (o1, o2) -> {
+        MConnection c1 = (MConnection) o1;
+        MConnection c2 = (MConnection) o2;
+        return c1.getSourcePath().compareTo(c2.getSourcePath());
     };
 
-    public static final Comparator TARGET_PATH_COMPARATOR = new Comparator() {
-        public int compare(Object o1, Object o2) {
-            MConnection c1 = (MConnection) o1;
-            MConnection c2 = (MConnection) o2;
-            return c1.getTargetPath().compareTo(c2.getTargetPath());
-        }
+    public static final Comparator TARGET_PATH_COMPARATOR = (o1, o2) -> {
+        MConnection c1 = (MConnection) o1;
+        MConnection c2 = (MConnection) o2;
+        return c1.getTargetPath().compareTo(c2.getTargetPath());
     };
 }
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/ContentModel.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/ContentModel.java	Mon Mar 03 13:26:38 2014 -0500
@@ -34,8 +34,6 @@
 import javafx.animation.Timeline;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.scene.AmbientLight;
 import javafx.scene.Group;
 import javafx.scene.Node;
@@ -53,8 +51,10 @@
 import javafx.scene.shape.Sphere;
 import javafx.scene.transform.Rotate;
 import javafx.scene.transform.Translate;
+
 import com.javafx.experiments.shape3d.PolygonMeshView;
 import com.javafx.experiments.shape3d.SubdivisionMesh;
+
 import javafx.beans.property.ObjectProperty;
 import javafx.event.EventHandler;
 import javafx.event.EventType;
@@ -571,16 +571,14 @@
     public void setContent(Node content) { this.content.set(content); }
 
     {
-        contentProperty().addListener(new ChangeListener<Node>() {
-            @Override public void changed(ObservableValue<? extends Node> ov, Node oldContent, Node newContent) {
-                autoScalingGroup.getChildren().remove(oldContent);
-                autoScalingGroup.getChildren().add(newContent);
-                setWireFrame(newContent,wireframe);
-                // TODO mesh is updated each time these are called even if no rendering needs to happen
-                setSubdivisionLevel(newContent, subdivisionLevel);
-                setBoundaryMode(newContent, boundaryMode);
-                setMapBorderMode(newContent, mapBorderMode);
-            }
+        contentProperty().addListener((ov, oldContent, newContent) -> {
+            autoScalingGroup.getChildren().remove(oldContent);
+            autoScalingGroup.getChildren().add(newContent);
+            setWireFrame(newContent,wireframe);
+            // TODO mesh is updated each time these are called even if no rendering needs to happen
+            setSubdivisionLevel(newContent, subdivisionLevel);
+            setBoundaryMode(newContent, boundaryMode);
+            setMapBorderMode(newContent, mapBorderMode);
         });
     }
 
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/FourWayNavControl.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/FourWayNavControl.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,7 +33,6 @@
 
 import javafx.animation.KeyFrame;
 import javafx.animation.Timeline;
-import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.geometry.Side;
 import javafx.scene.input.MouseEvent;
@@ -73,57 +72,45 @@
         getChildren().addAll(upIcon,downIcon,leftIcon,rightIcon,centerIcon);
 
         eventFiringTimeline = new Timeline(
-            new KeyFrame(Duration.millis(80), new EventHandler<ActionEvent>() {
-                @Override public void handle(ActionEvent event) {
-                    if (listener != null && currentDirection != null) listener.navigateStep(currentDirection,0.5);
-                    hasFired = true;
-                }
+            new KeyFrame(Duration.millis(80), event -> {
+                if (listener != null && currentDirection != null) listener.navigateStep(currentDirection,0.5);
+                hasFired = true;
             })
         );
         eventFiringTimeline.setDelay(Duration.millis(300));
         eventFiringTimeline.setCycleCount(Timeline.INDEFINITE);
 
         upIcon.setOnMousePressed(
-                new EventHandler<MouseEvent>() {
-                    @Override public void handle(MouseEvent event) {
-                        currentDirection = Side.TOP;
-                        hasFired = false;
-                        eventFiringTimeline.playFromStart();
-                    }
+                event -> {
+                    currentDirection = Side.TOP;
+                    hasFired = false;
+                    eventFiringTimeline.playFromStart();
                 });
         downIcon.setOnMousePressed(
-                new EventHandler<MouseEvent>() {
-                    @Override public void handle(MouseEvent event) {
-                        currentDirection = Side.BOTTOM;
-                        hasFired = false;
-                        eventFiringTimeline.playFromStart();
-                    }
+                event -> {
+                    currentDirection = Side.BOTTOM;
+                    hasFired = false;
+                    eventFiringTimeline.playFromStart();
                 });
         leftIcon.setOnMousePressed(
-                new EventHandler<MouseEvent>() {
-                    @Override public void handle(MouseEvent event) {
-                        currentDirection = Side.LEFT;
-                        hasFired = false;
-                        eventFiringTimeline.playFromStart();
-                    }
+                event -> {
+                    currentDirection = Side.LEFT;
+                    hasFired = false;
+                    eventFiringTimeline.playFromStart();
                 });
         rightIcon.setOnMousePressed(
-                new EventHandler<MouseEvent>() {
-                    @Override public void handle(MouseEvent event) {
-                        currentDirection = Side.RIGHT;
-                        hasFired = false;
-                        eventFiringTimeline.playFromStart();
-                    }
+                event -> {
+                    currentDirection = Side.RIGHT;
+                    hasFired = false;
+                    eventFiringTimeline.playFromStart();
                 });
 
-        EventHandler<MouseEvent> stopHandler = new EventHandler<MouseEvent>() {
-            @Override public void handle(MouseEvent event) {
-                if (listener != null && currentDirection != null && !hasFired) {
-                    listener.navigateStep(currentDirection,10);
-                }
-                currentDirection = null;
-                eventFiringTimeline.stop();
+        EventHandler<MouseEvent> stopHandler = event -> {
+            if (listener != null && currentDirection != null && !hasFired) {
+                listener.navigateStep(currentDirection,10);
             }
+            currentDirection = null;
+            eventFiringTimeline.stop();
         };
         upIcon.setOnMouseReleased(stopHandler);
         downIcon.setOnMouseReleased(stopHandler);
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Jfx3dViewerApp.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Jfx3dViewerApp.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,13 +33,12 @@
 
 import java.io.File;
 import java.util.List;
+
 import javafx.application.Application;
-import javafx.event.EventHandler;
 import javafx.fxml.FXMLLoader;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
 import javafx.stage.Stage;
-import javafx.stage.WindowEvent;
 
 /**
  * JavaFX 3D Viewer Application
@@ -69,12 +68,7 @@
         stage.setScene(scene);
         stage.show();
 
-        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
-            @Override
-            public void handle(WindowEvent event) {
-                sessionManager.saveSession();
-            }
-        });
+        stage.setOnCloseRequest(event -> sessionManager.saveSession());
 
 //        org.scenicview.ScenicView.show(contentModel.getSubScene().getRoot());
     }
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SessionManager.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SessionManager.java	Mon Mar 03 13:26:38 2014 -0500
@@ -39,13 +39,10 @@
 import java.util.Properties;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
+
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.scene.control.Accordion;
 import javafx.scene.control.TitledPane;
 import javafx.scene.control.ToggleGroup;
@@ -111,37 +108,19 @@
     public void bind(final BooleanProperty property, final String propertyName) {
         String value = props.getProperty(propertyName);
         if (value != null) property.set(Boolean.valueOf(value));
-        property.addListener(new InvalidationListener() {
-
-            @Override
-            public void invalidated(Observable o) {
-                props.setProperty(propertyName, property.getValue().toString());
-            }
-        });
+        property.addListener(o -> props.setProperty(propertyName, property.getValue().toString()));
     }
 
     public void bind(final ObjectProperty<Color> property, final String propertyName) {
         String value = props.getProperty(propertyName);
         if (value != null) property.set(Color.valueOf(value));
-        property.addListener(new InvalidationListener() {
-
-            @Override
-            public void invalidated(Observable o) {
-                props.setProperty(propertyName, property.getValue().toString());
-            }
-        });
+        property.addListener(o -> props.setProperty(propertyName, property.getValue().toString()));
     }
 
     public void bind(final DoubleProperty property, final String propertyName) {
         String value = props.getProperty(propertyName);
         if (value != null) property.set(Double.valueOf(value));
-        property.addListener(new InvalidationListener() {
-
-            @Override
-            public void invalidated(Observable o) {
-                props.setProperty(propertyName, property.getValue().toString());
-            }
-        });
+        property.addListener(o -> props.setProperty(propertyName, property.getValue().toString()));
     }
 
     public void bind(final ToggleGroup toggleGroup, final String propertyName) {
@@ -153,15 +132,11 @@
             }
         } catch (Exception ignored) {
         }
-        toggleGroup.selectedToggleProperty().addListener(new InvalidationListener() {
-
-            @Override
-            public void invalidated(Observable o) {
-                if (toggleGroup.getSelectedToggle() == null) {
-                    props.remove(propertyName);
-                } else {
-                    props.setProperty(propertyName, Integer.toString(toggleGroup.getToggles().indexOf(toggleGroup.getSelectedToggle())));
-                }
+        toggleGroup.selectedToggleProperty().addListener(o -> {
+            if (toggleGroup.getSelectedToggle() == null) {
+                props.remove(propertyName);
+            } else {
+                props.setProperty(propertyName, Integer.toString(toggleGroup.getToggles().indexOf(toggleGroup.getSelectedToggle())));
             }
         });
     }
@@ -174,13 +149,9 @@
                 break;
             }
         }
-        accordion.expandedPaneProperty().addListener(new ChangeListener<TitledPane>() {
-
-            @Override
-            public void changed(ObservableValue<? extends TitledPane> ov, TitledPane t, TitledPane expandedPane) {
-                if (expandedPane != null) {
-                    props.setProperty(propertyName, expandedPane.getText());
-                }
+        accordion.expandedPaneProperty().addListener((ov, t, expandedPane) -> {
+            if (expandedPane != null) {
+                props.setProperty(propertyName, expandedPane.getText());
             }
         });
     }
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SettingsController.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SettingsController.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,24 +33,23 @@
 
 import java.net.URL;
 import java.util.ResourceBundle;
+
 import javafx.application.Platform;
 import javafx.beans.binding.DoubleBinding;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.fxml.Initializable;
 import javafx.scene.control.Accordion;
 import javafx.scene.control.CheckBox;
 import javafx.scene.control.ColorPicker;
 import javafx.scene.control.Slider;
 import javafx.scene.control.TitledPane;
-import javafx.scene.control.Toggle;
 import javafx.scene.control.ToggleGroup;
 import javafx.scene.paint.Color;
+
 import com.javafx.experiments.shape3d.SubdivisionMesh;
+
 import javafx.beans.binding.Bindings;
 import javafx.beans.binding.ObjectBinding;
 import javafx.beans.property.DoubleProperty;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.Parent;
 import javafx.scene.control.Label;
@@ -61,10 +60,7 @@
 import javafx.scene.control.cell.CheckBoxTreeTableCell;
 import javafx.scene.control.cell.TextFieldTreeTableCell;
 import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.transform.Transform;
-import javafx.util.Callback;
 import javafx.util.StringConverter;
 
 /**
@@ -118,56 +114,40 @@
     
     @Override public void initialize(URL location, ResourceBundle resources) {
         // keep one pane open always
-        settings.expandedPaneProperty().addListener(new ChangeListener<TitledPane>() {
-            @Override public void changed(ObservableValue<? extends TitledPane> observable, TitledPane oldValue, TitledPane newValue) {
-                Platform.runLater(
-                        new Runnable() {
-                            @Override public void run() {
-                                if (settings.getExpandedPane() == null)
-                                    settings.setExpandedPane(settings.getPanes().get(0));
-                            }
-                        });
-            }
-        });
+        settings.expandedPaneProperty().addListener((observable, oldValue, newValue) -> Platform.runLater(
+                () -> {
+                    if (settings.getExpandedPane() == null)
+                        settings.setExpandedPane(settings.getPanes().get(0));
+                }));
         // wire up settings in OPTIONS
         contentModel.msaaProperty().bind(msaaCheckBox.selectedProperty());
         contentModel.showAxisProperty().bind(showAxisCheckBox.selectedProperty());
         contentModel.yUpProperty().bind(yUpCheckBox.selectedProperty());
         backgroundColorPicker.setValue((Color)contentModel.getSubScene().getFill());
         contentModel.getSubScene().fillProperty().bind(backgroundColorPicker.valueProperty());
-        wireFrameCheckbox.selectedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean isWireframe) {
-                contentModel.setWireFrame(isWireframe);
+        wireFrameCheckbox.selectedProperty().addListener((observable, oldValue, isWireframe) -> contentModel.setWireFrame(isWireframe));
+        subdivisionLevelGroup.selectedToggleProperty().addListener((observable, oldValue, selectedToggle) -> {
+            if (selectedToggle == null && oldValue != null) {
+                subdivisionLevelGroup.selectToggle(oldValue);
+                selectedToggle = oldValue;
+            } else {
+                contentModel.setSubdivisionLevel(Integer.parseInt((String)selectedToggle.getUserData()));
             }
         });
-        subdivisionLevelGroup.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {
-            @Override public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle selectedToggle) {
-                if (selectedToggle == null && oldValue != null) {
-                    subdivisionLevelGroup.selectToggle(oldValue);
-                    selectedToggle = oldValue;
-                } else {
-                    contentModel.setSubdivisionLevel(Integer.parseInt((String)selectedToggle.getUserData()));
-                }
+        subdivisionBoundaryGroup.selectedToggleProperty().addListener((observable, oldValue, selectedToggle) -> {
+            if (selectedToggle == null && oldValue != null) {
+                subdivisionBoundaryGroup.selectToggle(oldValue);
+                selectedToggle = oldValue;
+            } else {
+                contentModel.setBoundaryMode((SubdivisionMesh.BoundaryMode) selectedToggle.getUserData());
             }
         });
-        subdivisionBoundaryGroup.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {
-            @Override public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle selectedToggle) {
-                if (selectedToggle == null && oldValue != null) {
-                    subdivisionBoundaryGroup.selectToggle(oldValue);
-                    selectedToggle = oldValue;
-                } else {
-                    contentModel.setBoundaryMode((SubdivisionMesh.BoundaryMode) selectedToggle.getUserData());
-                }
-            }
-        });
-        subdivisionSmoothGroup.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {
-            @Override public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle selectedToggle) {
-                if (selectedToggle == null && oldValue != null) {
-                    subdivisionSmoothGroup.selectToggle(oldValue);
-                    selectedToggle = oldValue;
-                } else {
-                    contentModel.setMapBorderMode((SubdivisionMesh.MapBorderMode) selectedToggle.getUserData());
-                }
+        subdivisionSmoothGroup.selectedToggleProperty().addListener((observable, oldValue, selectedToggle) -> {
+            if (selectedToggle == null && oldValue != null) {
+                subdivisionSmoothGroup.selectToggle(oldValue);
+                selectedToggle = oldValue;
+            } else {
+                contentModel.setMapBorderMode((SubdivisionMesh.MapBorderMode) selectedToggle.getUserData());
             }
         });
         // wire up settings in LIGHTS
@@ -184,32 +164,30 @@
         light1x.disableProperty().bind(light1followCameraCheckBox.selectedProperty());
         light1y.disableProperty().bind(light1followCameraCheckBox.selectedProperty());
         light1z.disableProperty().bind(light1followCameraCheckBox.selectedProperty());
-        light1followCameraCheckBox.selectedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
-                if (newValue) {
-                    contentModel.getLight1().translateXProperty().bind(new DoubleBinding() {
-                        { bind(contentModel.getCamera().boundsInParentProperty()); }
-                        @Override protected double computeValue() {
-                            return contentModel.getCamera().getBoundsInParent().getMinX();
-                        }
-                    });
-                    contentModel.getLight1().translateYProperty().bind(new DoubleBinding() {
-                        { bind(contentModel.getCamera().boundsInParentProperty()); }
-                        @Override protected double computeValue() {
-                            return contentModel.getCamera().getBoundsInParent().getMinY();
-                        }
-                    });
-                    contentModel.getLight1().translateZProperty().bind(new DoubleBinding() {
-                        { bind(contentModel.getCamera().boundsInParentProperty()); }
-                        @Override protected double computeValue() {
-                            return contentModel.getCamera().getBoundsInParent().getMinZ();
-                        }
-                    });
-                } else {
-                    contentModel.getLight1().translateXProperty().bind(light1x.valueProperty());
-                    contentModel.getLight1().translateYProperty().bind(light1y.valueProperty());
-                    contentModel.getLight1().translateZProperty().bind(light1z.valueProperty());
-                }
+        light1followCameraCheckBox.selectedProperty().addListener((observable, oldValue, newValue) -> {
+            if (newValue) {
+                contentModel.getLight1().translateXProperty().bind(new DoubleBinding() {
+                    { bind(contentModel.getCamera().boundsInParentProperty()); }
+                    @Override protected double computeValue() {
+                        return contentModel.getCamera().getBoundsInParent().getMinX();
+                    }
+                });
+                contentModel.getLight1().translateYProperty().bind(new DoubleBinding() {
+                    { bind(contentModel.getCamera().boundsInParentProperty()); }
+                    @Override protected double computeValue() {
+                        return contentModel.getCamera().getBoundsInParent().getMinY();
+                    }
+                });
+                contentModel.getLight1().translateZProperty().bind(new DoubleBinding() {
+                    { bind(contentModel.getCamera().boundsInParentProperty()); }
+                    @Override protected double computeValue() {
+                        return contentModel.getCamera().getBoundsInParent().getMinZ();
+                    }
+                });
+            } else {
+                contentModel.getLight1().translateXProperty().bind(light1x.valueProperty());
+                contentModel.getLight1().translateYProperty().bind(light1y.valueProperty());
+                contentModel.getLight1().translateZProperty().bind(light1z.valueProperty());
             }
         });
         // LIGHT 2
@@ -254,78 +232,43 @@
                 }
             }
         });
-        hierarachyTreeTable.setOnMouseClicked(new EventHandler<MouseEvent>() {
-
-            @Override
-            public void handle(MouseEvent t) {
-                if (t.getClickCount() == 2) {
-                    settings.setExpandedPane(x6);
-                    t.consume();
+        hierarachyTreeTable.setOnMouseClicked(t -> {
+            if (t.getClickCount() == 2) {
+                settings.setExpandedPane(x6);
+                t.consume();
+            }
+        });
+        hierarachyTreeTable.setOnKeyPressed(t -> {
+            if (t.getCode() == KeyCode.SPACE) {
+                TreeItem<Node> selectedItem = hierarachyTreeTable.getSelectionModel().getSelectedItem();
+                if (selectedItem != null) {
+                    Node node = selectedItem.getValue();
+                    node.setVisible(!node.isVisible());
+                }
+                t.consume();
+            }
+        });
+        x6.expandedProperty().addListener((ov, t, t1) -> {
+            if (t1) {
+                TreeItem<Node> selectedItem = hierarachyTreeTable.getSelectionModel().getSelectedItem();
+                if (selectedItem == null) {
+                    transformsList.setItems(null);
+                    selectedNodeLabel.setText("");
+                } else {
+                    Node node = selectedItem.getValue();
+                    transformsList.setItems(node.getTransforms());
+                    selectedNodeLabel.setText(node.toString());
                 }
             }
         });
-        hierarachyTreeTable.setOnKeyPressed(new EventHandler<KeyEvent>() {
-
-            @Override
-            public void handle(KeyEvent t) {
-                if (t.getCode() == KeyCode.SPACE) {
-                    TreeItem<Node> selectedItem = hierarachyTreeTable.getSelectionModel().getSelectedItem();
-                    if (selectedItem != null) {
-                        Node node = selectedItem.getValue();
-                        node.setVisible(!node.isVisible());
-                    }
-                    t.consume();
-                }
-            }
-        });
-        x6.expandedProperty().addListener(new ChangeListener<Boolean>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
-                if (t1) {
-                    TreeItem<Node> selectedItem = hierarachyTreeTable.getSelectionModel().getSelectedItem();
-                    if (selectedItem == null) {
-                        transformsList.setItems(null);
-                        selectedNodeLabel.setText("");
-                    } else {
-                        Node node = selectedItem.getValue();
-                        transformsList.setItems(node.getTransforms());
-                        selectedNodeLabel.setText(node.toString());
-                    }
-                }
-            }
-        });
-        nodeColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, String>, ObservableValue<String>>() {
-
-            @Override
-            public ObservableValue<String> call(TreeTableColumn.CellDataFeatures<Node, String> p) {
-                return p.getValue().valueProperty().asString();
-            }
-        });
-        idColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, String>, ObservableValue<String>>() {
-
-            @Override
-            public ObservableValue<String> call(TreeTableColumn.CellDataFeatures<Node, String> p) {
-                return p.getValue().getValue().idProperty();
-            }
-        });
-        visibilityColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, Boolean>, ObservableValue<Boolean>>() {
-
-            @Override
-            public ObservableValue<Boolean> call(TreeTableColumn.CellDataFeatures<Node, Boolean> p) {
-                return p.getValue().getValue().visibleProperty();
-            }
-        });
+        nodeColumn.setCellValueFactory(p -> p.getValue().valueProperty().asString());
+        idColumn.setCellValueFactory(p -> p.getValue().getValue().idProperty());
+        visibilityColumn.setCellValueFactory(p -> p.getValue().getValue().visibleProperty());
         visibilityColumn.setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(visibilityColumn));
-        widthColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, Double>, ObservableValue<Double>>() {
-            @Override
-            public ObservableValue<Double> call(final TreeTableColumn.CellDataFeatures<Node, Double> p) {
-                return new ObjectBinding<Double>() {
-                    {  bind(p.getValue().getValue().boundsInLocalProperty()); }
-                    @Override protected Double computeValue() {
-                        return p.getValue().getValue().getBoundsInLocal().getWidth();
-                    }
-                };
+        widthColumn.setCellValueFactory(p -> new ObjectBinding<Double>() {
+            {  bind(p.getValue().getValue().boundsInLocalProperty()); }
+            @Override protected Double computeValue() {
+                return p.getValue().getValue().getBoundsInLocal().getWidth();
             }
         });
         StringConverter<Double> niceDoubleStringConverter = new StringConverter<Double>() {
@@ -342,26 +285,16 @@
         widthColumn.setCellFactory(TextFieldTreeTableCell.<Node, Double>forTreeTableColumn(niceDoubleStringConverter));
         heightColumn.setCellFactory(TextFieldTreeTableCell.<Node, Double>forTreeTableColumn(niceDoubleStringConverter));
         depthColumn.setCellFactory(TextFieldTreeTableCell.<Node, Double>forTreeTableColumn(niceDoubleStringConverter));
-        heightColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, Double>, ObservableValue<Double>>() {
-            @Override
-            public ObservableValue<Double> call(final TreeTableColumn.CellDataFeatures<Node, Double> p) {
-                return new ObjectBinding<Double>() {
-                    {  bind(p.getValue().getValue().boundsInLocalProperty()); }
-                    @Override protected Double computeValue() {
-                        return p.getValue().getValue().getBoundsInLocal().getHeight();
-                    }
-                };
+        heightColumn.setCellValueFactory(p -> new ObjectBinding<Double>() {
+            {  bind(p.getValue().getValue().boundsInLocalProperty()); }
+            @Override protected Double computeValue() {
+                return p.getValue().getValue().getBoundsInLocal().getHeight();
             }
         });
-        depthColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<Node, Double>, ObservableValue<Double>>() {
-            @Override
-            public ObservableValue<Double> call(final TreeTableColumn.CellDataFeatures<Node, Double> p) {
-                return new ObjectBinding<Double>() {
-                    {  bind(p.getValue().getValue().boundsInLocalProperty()); }
-                    @Override protected Double computeValue() {
-                        return p.getValue().getValue().getBoundsInLocal().getDepth();
-                    }
-                };
+        depthColumn.setCellValueFactory(p -> new ObjectBinding<Double>() {
+            {  bind(p.getValue().getValue().boundsInLocalProperty()); }
+            @Override protected Double computeValue() {
+                return p.getValue().getValue().getBoundsInLocal().getDepth();
             }
         });
 
@@ -406,19 +339,15 @@
                     getChildren().add(new TreeItemImpl(n));
                 }
             }
-            node.setOnMouseClicked(new EventHandler<MouseEvent>() {
-
-                @Override
-                public void handle(MouseEvent t) {
-                    TreeItem<Node> parent = getParent();
-                    while (parent != null) {
-                        parent.setExpanded(true);
-                        parent = parent.getParent();
-                    }
-                    hierarachyTreeTable.getSelectionModel().select(TreeItemImpl.this);
-                    hierarachyTreeTable.scrollTo(hierarachyTreeTable.getSelectionModel().getSelectedIndex());
-                    t.consume();
+            node.setOnMouseClicked(t -> {
+                TreeItem<Node> parent = getParent();
+                while (parent != null) {
+                    parent.setExpanded(true);
+                    parent = parent.getParent();
                 }
+                hierarachyTreeTable.getSelectionModel().select(TreeItemImpl.this);
+                hierarachyTreeTable.scrollTo(hierarachyTreeTable.getSelectionModel().getSelectedIndex());
+                t.consume();
             });
         }
     }
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SimpleViewerApp.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SimpleViewerApp.java	Mon Mar 03 13:26:38 2014 -0500
@@ -34,12 +34,11 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
+
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
 import javafx.animation.Timeline;
 import javafx.application.Application;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.PerspectiveCamera;
@@ -50,6 +49,7 @@
 import javafx.stage.Stage;
 import javafx.stage.StageStyle;
 import javafx.util.Duration;
+
 import com.javafx.experiments.importers.Importer3D;
 import com.sun.javafx.perf.PerformanceTracker;
 
@@ -108,11 +108,7 @@
         stage.show();
 
         // MEASURE FPS
-        Timeline fpsTimeline = new Timeline(new KeyFrame(Duration.seconds(2), new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent t) {
-                System.out.println("fps = " + PerformanceTracker.getSceneTracker(scene).getInstantFPS());
-            }
-        }));
+        Timeline fpsTimeline = new Timeline(new KeyFrame(Duration.seconds(2), t -> System.out.println("fps = " + PerformanceTracker.getSceneTracker(scene).getInstantFPS())));
         fpsTimeline.setCycleCount(Timeline.INDEFINITE);
         fpsTimeline.play();
     }
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/PolygonMeshView.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/PolygonMeshView.java	Mon Mar 03 13:26:38 2014 -0500
@@ -32,11 +32,10 @@
 package com.javafx.experiments.shape3d;
 
 import java.util.Arrays;
+
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleIntegerProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ArrayChangeListener;
 import javafx.collections.ObservableFloatArray;
 import javafx.scene.Parent;
@@ -45,7 +44,6 @@
 import javafx.scene.shape.DrawMode;
 import javafx.scene.shape.MeshView;
 import javafx.scene.shape.TriangleMesh;
-
 import static javafx.scene.shape.TriangleMesh.*;
 import static com.javafx.experiments.shape3d.SubdivisionMesh.*;
 
@@ -61,19 +59,13 @@
     // this is null if no subdivision is happening (i.e. subdivisionLevel = 0);
     private SubdivisionMesh subdivisionMesh;
     
-    private final ArrayChangeListener<ObservableFloatArray> meshPointsListener = new ArrayChangeListener<ObservableFloatArray>() {
-        @Override
-        public void onChanged(ObservableFloatArray t, boolean bln, int i, int i1) {
-            pointsDirty = true;
-            updateMesh();
-        }
+    private final ArrayChangeListener<ObservableFloatArray> meshPointsListener = (t, bln, i, i1) -> {
+        pointsDirty = true;
+        updateMesh();
     };
-    private final ArrayChangeListener<ObservableFloatArray> meshTexCoordListener = new ArrayChangeListener<ObservableFloatArray>() {
-        @Override
-        public void onChanged(ObservableFloatArray t, boolean bln, int i, int i1) {
-            texCoordsDirty = true;
-            updateMesh();
-        }
+    private final ArrayChangeListener<ObservableFloatArray> meshTexCoordListener = (t, bln, i, i1) -> {
+        texCoordsDirty = true;
+        updateMesh();
     };
     
     private boolean pointsDirty = true;
@@ -95,23 +87,20 @@
     public ObjectProperty<PolygonMesh> meshProperty() { 
         if (meshProperty == null) {
             meshProperty = new SimpleObjectProperty<PolygonMesh>();
-            meshProperty.addListener(new ChangeListener<PolygonMesh>() {
-                @Override
-                public void changed(ObservableValue<? extends PolygonMesh> observable, PolygonMesh oldValue, PolygonMesh newValue) {
-                    if (oldValue != null) {
-                        oldValue.getPoints().removeListener(meshPointsListener);
-                        oldValue.getPoints().removeListener(meshTexCoordListener);
-                    }
+            meshProperty.addListener((observable, oldValue, newValue) -> {
+                if (oldValue != null) {
+                    oldValue.getPoints().removeListener(meshPointsListener);
+                    oldValue.getPoints().removeListener(meshTexCoordListener);
+                }
 
-                    meshProperty.set(newValue);
+                meshProperty.set(newValue);
 
-                    pointsDirty = pointsSizeDirty = texCoordsDirty = facesDirty = true;
-                    updateMesh();
-                    
-                    if (newValue != null) {
-                        newValue.getPoints().addListener(meshPointsListener);
-                        newValue.getTexCoords().addListener(meshTexCoordListener);
-                    }
+                pointsDirty = pointsSizeDirty = texCoordsDirty = facesDirty = true;
+                updateMesh();
+                
+                if (newValue != null) {
+                    newValue.getPoints().addListener(meshPointsListener);
+                    newValue.getTexCoords().addListener(meshTexCoordListener);
                 }
             });
         }
@@ -185,12 +174,7 @@
                     // create SubdivisionMesh if subdivisionLevel is greater than 0
                     if ((getSubdivisionLevel() > 0) && (subdivisionMesh == null)) {
                         subdivisionMesh = new SubdivisionMesh(getMesh(), getSubdivisionLevel(), getBoundaryMode(), getMapBorderMode());
-                        subdivisionMesh.getOriginalMesh().getPoints().addListener(new ArrayChangeListener<ObservableFloatArray>() {
-                            @Override
-                            public void onChanged(ObservableFloatArray t, boolean bln, int i, int i1) {
-                                subdivisionMesh.update();
-                            }
-                        });
+                        subdivisionMesh.getOriginalMesh().getPoints().addListener((t, bln, i, i1) -> subdivisionMesh.update());
                         setMesh(subdivisionMesh);
                     }
                     if (subdivisionMesh != null) {
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SkinningMesh.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SkinningMesh.java	Mon Mar 03 13:26:38 2014 -0500
@@ -32,12 +32,13 @@
 package com.javafx.experiments.shape3d;
 
 import com.javafx.experiments.importers.maya.Joint;
+
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.collections.ObservableFloatArray;
 import javafx.geometry.Point3D;
 import javafx.scene.Node;
@@ -127,12 +128,7 @@
         // Add a listener to all the joints (and their parents nodes) so that we can track when any of their transforms have changed
         // Set of joints that already have a listener (so we don't attach a listener to the same node more than once)
         Set<Node> processedNodes = new HashSet<Node>(joints.size());
-        InvalidationListener invalidationListener = new InvalidationListener() {
-            @Override
-            public void invalidated(Observable observable) {
-                jointsTransformDirty = true;
-            }
-        };
+        InvalidationListener invalidationListener = observable -> jointsTransformDirty = true;
         for (int j = 0; j < joints.size(); j++) {
             Node node = joints.get(j);
             while (!processedNodes.contains(node)) {
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SubdivisionMesh.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SubdivisionMesh.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,10 +33,9 @@
 
 import com.javafx.experiments.shape3d.symbolic.SymbolicPolygonMesh;
 import com.javafx.experiments.shape3d.symbolic.SymbolicSubdivisionBuilder;
+
 import java.util.ArrayList;
 import java.util.List;
-import javafx.collections.ArrayChangeListener;
-import javafx.collections.ObservableFloatArray;
 
 /**
  * Catmull Clark subdivision surface polygon mesh
@@ -92,22 +91,14 @@
         
         symbolicMeshes = new ArrayList<>(4); // the polymesh is usually subdivided up to 3 times
 
-        originalMesh.getPoints().addListener(new ArrayChangeListener<ObservableFloatArray>() {
-            @Override
-            public void onChanged(ObservableFloatArray observableArray, boolean sizeChanged, int from, int to) {
-                if (sizeChanged) {
-                    meshDirty = true;
-                } else {
-                    pointValuesDirty = true;
-                }
+        originalMesh.getPoints().addListener((observableArray, sizeChanged, from, to) -> {
+            if (sizeChanged) {
+                meshDirty = true;
+            } else {
+                pointValuesDirty = true;
             }
         });
-        originalMesh.getTexCoords().addListener(new ArrayChangeListener<ObservableFloatArray>() {
-            @Override
-            public void onChanged(ObservableFloatArray observableArray, boolean sizeChanged, int from, int to) {
-                meshDirty = true;
-            }
-        });
+        originalMesh.getTexCoords().addListener((observableArray, sizeChanged, from, to) -> meshDirty = true);
     }
     
     /**
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/utils3d/DragSupport.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/utils3d/DragSupport.java	Mon Mar 03 13:26:38 2014 -0500
@@ -97,51 +97,43 @@
 
     public DragSupport(Scene target, final KeyCode modifier, final MouseButton mouseButton, final Orientation orientation, final Property<Number> property, final double factor) {
         this.target = target;
-        mouseEventHandler = new EventHandler<MouseEvent>() {
-            
-            @Override
-            public void handle(MouseEvent t) {
-                if (t.getEventType() != MouseEvent.MOUSE_ENTERED_TARGET
-                        && t.getEventType() != MouseEvent.MOUSE_EXITED_TARGET) {
-                    lastMouseEvent = t;
+        mouseEventHandler = t -> {
+            if (t.getEventType() != MouseEvent.MOUSE_ENTERED_TARGET
+                    && t.getEventType() != MouseEvent.MOUSE_EXITED_TARGET) {
+                lastMouseEvent = t;
+            }
+            if (t.getEventType() == MouseEvent.MOUSE_PRESSED) {
+                if (t.getButton() == mouseButton
+                        && isModifierCorrect(t, modifier)) {
+                    anchor = property.getValue();
+                    dragAnchor = getCoord(t, orientation);
+                    t.consume();
                 }
-                if (t.getEventType() == MouseEvent.MOUSE_PRESSED) {
-                    if (t.getButton() == mouseButton
-                            && isModifierCorrect(t, modifier)) {
-                        anchor = property.getValue();
-                        dragAnchor = getCoord(t, orientation);
-                        t.consume();
-                    }
-                } else if (t.getEventType() == MouseEvent.MOUSE_DRAGGED) {
-                    if (t.getButton() == mouseButton
-                            && isModifierCorrect(t, modifier)) {
-                        property.setValue(anchor.doubleValue()
-                                + (getCoord(t, orientation) - dragAnchor) * factor);
-                        t.consume();
-                    }
+            } else if (t.getEventType() == MouseEvent.MOUSE_DRAGGED) {
+                if (t.getButton() == mouseButton
+                        && isModifierCorrect(t, modifier)) {
+                    property.setValue(anchor.doubleValue()
+                            + (getCoord(t, orientation) - dragAnchor) * factor);
+                    t.consume();
                 }
             }
         };
-        keyboardEventHandler = new EventHandler<KeyEvent>() {
-            
-            @Override
-            public void handle(KeyEvent t) {
-                if (t.getEventType() == KeyEvent.KEY_PRESSED) {
-                    if (t.getCode() == modifier) {
-                        anchor = property.getValue();
-                        if (lastMouseEvent != null) {
-                            dragAnchor = getCoord(lastMouseEvent, orientation);
-                        }
-                        t.consume();
+        keyboardEventHandler = t -> {
+            if (t.getEventType() == KeyEvent.KEY_PRESSED) {
+                if (t.getCode() == modifier) {
+                    anchor = property.getValue();
+                    if (lastMouseEvent != null) {
+                        dragAnchor = getCoord(lastMouseEvent, orientation);
                     }
-                } else if (t.getEventType() == KeyEvent.KEY_RELEASED) {
-                    if (t.getCode() != modifier && isModifierCorrect(t, modifier)) {
-                        anchor = property.getValue();
-                        if (lastMouseEvent != null) {
-                            dragAnchor = getCoord(lastMouseEvent, orientation);
-                        }
-                        t.consume();
+                    t.consume();
+                }
+            } else if (t.getEventType() == KeyEvent.KEY_RELEASED) {
+                if (t.getCode() != modifier && isModifierCorrect(t, modifier)) {
+                    anchor = property.getValue();
+                    if (lastMouseEvent != null) {
+                        dragAnchor = getCoord(lastMouseEvent, orientation);
                     }
+                    t.consume();
                 }
             }
         };
--- a/apps/experiments/Modena/src/main/java/modena/Modena.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/Modena.java	Mon Mar 03 13:26:38 2014 -0500
@@ -49,10 +49,9 @@
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import javafx.application.Application;
 import javafx.application.Platform;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.embed.swing.SwingFXUtils;
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
@@ -90,6 +89,7 @@
 import javafx.scene.transform.Scale;
 import javafx.stage.FileChooser;
 import javafx.stage.Stage;
+
 import javax.imageio.ImageIO;
 
 public class Modena extends Application {
@@ -153,18 +153,12 @@
     private TabPane contentTabs;
     private boolean test = false;
     private boolean embeddedPerformanceMode = false;
-    private final EventHandler<ActionEvent> rebuild = new EventHandler<ActionEvent>(){
-        @Override public void handle(ActionEvent event) {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    updateUserAgentStyleSheet();
-                    rebuildUI(modenaButton.isSelected(), retinaButton.isSelected(),
-                              contentTabs.getSelectionModel().getSelectedIndex(),
-                              samplePageNavigation.getCurrentSection());
-                }
-            });
-        }
-    };
+    private final EventHandler<ActionEvent> rebuild = event -> Platform.runLater(() -> {
+        updateUserAgentStyleSheet();
+        rebuildUI(modenaButton.isSelected(), retinaButton.isSelected(),
+                  contentTabs.getSelectionModel().getSelectedIndex(),
+                  samplePageNavigation.getCurrentSection());
+    });
     
     private static Modena instance;
 
@@ -292,11 +286,7 @@
         if (root != null) root.requestLayout();
 
         // restore scrolled section
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                samplePageNavigation.setCurrentSection(scrolledSection);
-            }
-        });
+        Platform.runLater(() -> samplePageNavigation.setCurrentSection(scrolledSection));
     }
     
     private void rebuildUI(boolean modena, boolean retina, int selectedTab, final SamplePage.Section scrolledSection) {
@@ -346,25 +336,21 @@
             contentTabs.getSelectionModel().select(selectedTab);
             samplePage.setMouseTransparent(test);
             // height test set selection for 
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    for (Node n: heightTest.lookupAll(".choice-box")) {
-                        ((ChoiceBox)n).getSelectionModel().selectFirst();
-                    }
-                    for (Node n: heightTest.lookupAll(".combo-box")) {
-                        ((ComboBox)n).getSelectionModel().selectFirst();
-                    }
+            Platform.runLater(() -> {
+                for (Node n: heightTest.lookupAll(".choice-box")) {
+                    ((ChoiceBox)n).getSelectionModel().selectFirst();
+                }
+                for (Node n: heightTest.lookupAll(".combo-box")) {
+                    ((ComboBox)n).getSelectionModel().selectFirst();
                 }
             });
             // Create Toolbar
             retinaButton = ToggleButtonBuilder.create()
                 .text("@2x")
                 .selected(retina)
-                .onAction(new EventHandler<ActionEvent>(){
-                    @Override public void handle(ActionEvent event) {
-                        ToggleButton btn = (ToggleButton)event.getSource();
-                        setRetinaMode(btn.isSelected());
-                    }
+                .onAction(event -> {
+                    ToggleButton btn = (ToggleButton)event.getSource();
+                    setRetinaMode(btn.isSelected());
                 })
                 .build();
             ToggleGroup themesToggleGroup = new ToggleGroup();
@@ -393,22 +379,16 @@
                     .build(),
                 rtlButton = ToggleButtonBuilder.create()
                     .text("RTL")
-                    .onAction(new EventHandler<ActionEvent>() {
-                            @Override public void handle(ActionEvent event) {
-                                root.setNodeOrientation(rtlButton.isSelected() ? 
-                                        NodeOrientation.RIGHT_TO_LEFT : NodeOrientation.LEFT_TO_RIGHT);
-                            }
-                        })
+                    .onAction(event -> root.setNodeOrientation(rtlButton.isSelected() ? 
+                            NodeOrientation.RIGHT_TO_LEFT : NodeOrientation.LEFT_TO_RIGHT))
                     .build(),
                 embeddedPerformanceButton = ToggleButtonBuilder.create()
                     .text("EP")
                     .selected(embeddedPerformanceMode)
                     .tooltip(new Tooltip("Apply Embedded Performance extra stylesheet"))
-                    .onAction(new EventHandler<ActionEvent>() {
-                        @Override public void handle(ActionEvent event) {
-                            embeddedPerformanceMode = embeddedPerformanceButton.isSelected();
-                            rebuild.handle(event);
-                        }
+                    .onAction(event -> {
+                        embeddedPerformanceMode = embeddedPerformanceButton.isSelected();
+                        rebuild.handle(event);
                     })
                     .build(),
                 new Separator(),
@@ -421,11 +401,7 @@
                 createAccentColorPicker(),
                 new Separator(),
                 ButtonBuilder.create().text("Save...").onAction(saveBtnHandler).build(),
-                ButtonBuilder.create().text("Restart").onAction(new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent event) {
-                        restart();
-                    }
-                }).build()
+                ButtonBuilder.create().text("Restart").onAction(event -> restart()).build()
             );
             toolBar.setId("TestAppToolbar");
             // Create content group used for scaleing @2x
@@ -452,12 +428,10 @@
             }
             root.applyCss();
             // update state
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // move focus out of the way
-                    modenaButton.requestFocus();
-                    samplePageNavigation.setCurrentSection(scrolledSection);
-                }
+            Platform.runLater(() -> {
+                // move focus out of the way
+                modenaButton.requestFocus();
+                samplePageNavigation.setCurrentSection(scrolledSection);
             });
         } catch (IOException ex) {
             Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
@@ -465,11 +439,7 @@
     }
 
     public RadioMenuItem buildFontRadioMenuItem(String name, final String in_fontName, final int in_fontSize, ToggleGroup tg) {
-        return RadioMenuItemBuilder.create().text(name).onAction(new EventHandler<ActionEvent>(){
-                   @Override public void handle(ActionEvent event) {
-                       setFont(in_fontName, in_fontSize);
-                   }
-               }).style("-fx-font: " + in_fontSize + "px \"" + in_fontName + "\";").toggleGroup(tg).build();
+        return RadioMenuItemBuilder.create().text(name).onAction(event -> setFont(in_fontName, in_fontSize)).style("-fx-font: " + in_fontSize + "px \"" + in_fontName + "\";").toggleGroup(tg).build();
     }
     
     public void setFont(String in_fontName, int in_fontSize) {
@@ -500,11 +470,7 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                setBaseColor(c);
-            }
-        });
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> setBaseColor(c));
         return colorPicker;
     }
     
@@ -536,15 +502,13 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                if (c == null) {
-                    backgroundColor = null;
-                } else {
-                    backgroundColor = c;
-                }
-                updateUserAgentStyleSheet();
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> {
+            if (c == null) {
+                backgroundColor = null;
+            } else {
+                backgroundColor = c;
             }
+            updateUserAgentStyleSheet();
         });
         return colorPicker;
     }
@@ -570,11 +534,7 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                setAccentColor(c);
-            }
-        });
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> setAccentColor(c));
         return colorPicker;
     }
 
@@ -587,31 +547,29 @@
         updateUserAgentStyleSheet();
     }
     
-    private EventHandler<ActionEvent> saveBtnHandler = new EventHandler<ActionEvent>() {
-        @Override public void handle(ActionEvent event) {
-            FileChooser fc = new FileChooser();
-            fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PNG", "*.png"));
-            File file = fc.showSaveDialog(mainStage);
-            if (file != null) {
-                try {
-                    samplePage.getStyleClass().add("root");
-                    int width = (int)(samplePage.getLayoutBounds().getWidth()+0.5d);
-                    int height = (int)(samplePage.getLayoutBounds().getHeight()+0.5d);
-                    BufferedImage imgBuffer = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
-                    Graphics2D g2 = imgBuffer.createGraphics();
-                    for (int y=0; y<height; y+=2048) {
-                        SnapshotParameters snapshotParameters = new SnapshotParameters();
-                        int remainingHeight = Math.min(2048, height - y);
-                        snapshotParameters.setViewport(new Rectangle2D(0,y,width,remainingHeight));
-                        WritableImage img = samplePage.snapshot(snapshotParameters, null);
-                        g2.drawImage(SwingFXUtils.fromFXImage(img,null),0,y,null);
-                    }
-                    g2.dispose();
-                    ImageIO.write(imgBuffer, "PNG", file);
-                    System.out.println("Written image: "+file.getAbsolutePath());
-                } catch (IOException ex) {
-                    Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
+    private EventHandler<ActionEvent> saveBtnHandler = event -> {
+        FileChooser fc = new FileChooser();
+        fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PNG", "*.png"));
+        File file = fc.showSaveDialog(mainStage);
+        if (file != null) {
+            try {
+                samplePage.getStyleClass().add("root");
+                int width = (int)(samplePage.getLayoutBounds().getWidth()+0.5d);
+                int height = (int)(samplePage.getLayoutBounds().getHeight()+0.5d);
+                BufferedImage imgBuffer = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
+                Graphics2D g2 = imgBuffer.createGraphics();
+                for (int y=0; y<height; y+=2048) {
+                    SnapshotParameters snapshotParameters = new SnapshotParameters();
+                    int remainingHeight = Math.min(2048, height - y);
+                    snapshotParameters.setViewport(new Rectangle2D(0,y,width,remainingHeight));
+                    WritableImage img = samplePage.snapshot(snapshotParameters, null);
+                    g2.drawImage(SwingFXUtils.fromFXImage(img,null),0,y,null);
                 }
+                g2.dispose();
+                ImageIO.write(imgBuffer, "PNG", file);
+                System.out.println("Written image: "+file.getAbsolutePath());
+            } catch (IOException ex) {
+                Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
             }
         }
     };
--- a/apps/experiments/Modena/src/main/java/modena/SameHeightTestController.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SameHeightTestController.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,9 +33,9 @@
 
 import java.net.URL;
 import java.util.ResourceBundle;
+
 import javafx.application.Platform;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.fxml.FXML;
 import javafx.fxml.Initializable;
 import javafx.geometry.Insets;
@@ -67,33 +67,19 @@
     private Node arrow;
 
     @Override public void initialize(URL url, ResourceBundle rb) {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Text buttonTextNode = (Text)horizFirstButton.lookup(".text");
-                buttonTextNode.layoutYProperty().addListener(new ChangeListener<Number>() {
-                    @Override public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                        StackPane.setMargin(horizBaseLine, new Insets(t1.doubleValue(),0,0,0));
-                    }
-                });
-                Text textFieldTextNode = (Text)vertFirstTextField.lookup(".text");
-                textFieldTextNode.layoutXProperty().addListener(new ChangeListener<Number>() {
-                    @Override public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                        StackPane.setMargin(vertBaseLine, new Insets(0,0,0,t1.doubleValue()));
-                    }
-                });
-                arrowButton = editableCombo.lookup(".arrow-button");
-                arrow = editableCombo.lookup(".arrow");
-                ChangeListener updater = new ChangeListener() {
-                    @Override public void changed(ObservableValue ov, Object t, Object t1) {
-                        updateArrowLinePositions();
-                    }
-                };
-                arrow.layoutBoundsProperty().addListener(updater);
-                arrowButton.layoutBoundsProperty().addListener(updater);
-                editableCombo.layoutBoundsProperty().addListener(updater);
-                arrowButtonContainer.layoutBoundsProperty().addListener(updater);
-                updateArrowLinePositions();
-            }
+        Platform.runLater(() -> {
+            Text buttonTextNode = (Text)horizFirstButton.lookup(".text");
+            buttonTextNode.layoutYProperty().addListener((ov, t, t1) -> StackPane.setMargin(horizBaseLine, new Insets(t1.doubleValue(),0,0,0)));
+            Text textFieldTextNode = (Text)vertFirstTextField.lookup(".text");
+            textFieldTextNode.layoutXProperty().addListener((ov, t, t1) -> StackPane.setMargin(vertBaseLine, new Insets(0,0,0,t1.doubleValue())));
+            arrowButton = editableCombo.lookup(".arrow-button");
+            arrow = editableCombo.lookup(".arrow");
+            ChangeListener updater = (ov, t, t1) -> updateArrowLinePositions();
+            arrow.layoutBoundsProperty().addListener(updater);
+            arrowButton.layoutBoundsProperty().addListener(updater);
+            editableCombo.layoutBoundsProperty().addListener(updater);
+            arrowButtonContainer.layoutBoundsProperty().addListener(updater);
+            updateArrowLinePositions();
         });
     }
     
--- a/apps/experiments/Modena/src/main/java/modena/SamplePageHelpers.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SamplePageHelpers.java	Mon Mar 03 13:26:38 2014 -0500
@@ -33,9 +33,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.css.PseudoClass;
@@ -75,7 +74,6 @@
 import javafx.scene.paint.Color;
 import javafx.scene.shape.LineBuilder;
 import javafx.scene.shape.RectangleBuilder;
-import javafx.util.Callback;
 
 /**
  * Helper static methods for Sample Page
@@ -98,11 +96,7 @@
     
     static <T extends Node> T withState(final T node, final String state, final String subNodeStyleClass, final String subNodeState) {
         withState(node, state);
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                withState(node.lookup(subNodeStyleClass), subNodeState);
-            }
-        });
+        Platform.runLater(() -> withState(node.lookup(subNodeStyleClass), subNodeState));
         return node;
     }
     
@@ -216,11 +210,7 @@
         Pagination pagination = new Pagination(numOfPages);
         if (bullet) pagination.getStyleClass().add("bullet");
         if (!arrows) pagination.setStyle("-fx-arrows-visible:false;");
-        pagination.setPageFactory(new Callback<Integer, Node>() {
-            @Override public Node call(Integer param) {
-                return new Label("Page Label "+param);
-            }
-        });
+        pagination.setPageFactory(param -> new Label("Page Label "+param));
         return pagination;
     }
     
@@ -262,11 +252,7 @@
             createMenu("View"),
             createMenu("Help")
         );
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                new ArrayList<Node>(mb.lookupAll(".menu")).get(1).pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true);
-            }
-        });
+        Platform.runLater(() -> new ArrayList<Node>(mb.lookupAll(".menu")).get(1).pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true));
         return  mb;
     }
     
@@ -289,15 +275,13 @@
         // create a place holder container
         final StackPane contextMenu = new StackPane();
         // show context menu then steal and place inline
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                menu.show(contextMenu,-1000,-1000);
-                menu.hide();
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        final Node menuContent = menu.getSkin().getNode();
-                        contextMenu.getChildren().add(menuContent);
-                        menuContent.setMouseTransparent(true);
+        Platform.runLater(() -> {
+            menu.show(contextMenu,-1000,-1000);
+            menu.hide();
+            Platform.runLater(() -> {
+                final Node menuContent = menu.getSkin().getNode();
+                contextMenu.getChildren().add(menuContent);
+                menuContent.setMouseTransparent(true);
 //                        System.out.println("menuContent = " + menuContent);
 //                        System.out.println("menuContent.lookupAll(\".menu-item\") = " + menuContent.lookupAll(".menu-item"));
 
@@ -313,9 +297,7 @@
 ////                        }
 //                            }
 //                        });
-                    }
-                });
-            }
+            });
         });
         return contextMenu;
     }
@@ -350,11 +332,9 @@
         final MenuItem menu112 = new MenuItem("foo");
         final CheckMenuItem menu113 = new CheckMenuItem("Show \"foo\" item");
         menu113.setSelected(true);
-        menu113.selectedProperty().addListener(new InvalidationListener() {
-            @Override public void invalidated(Observable valueModel) {
-                menu112.setVisible(menu113.isSelected());
-                System.err.println("MenuItem \"foo\" is now " + (menu112.isVisible() ? "" : "not") + " visible.");
-            }
+        menu113.selectedProperty().addListener(valueModel -> {
+            menu112.setVisible(menu113.isSelected());
+            System.err.println("MenuItem \"foo\" is now " + (menu112.isVisible() ? "" : "not") + " visible.");
         });
         menu11.getItems().addAll(menu111, menu112, menu113);
 
--- a/apps/experiments/Modena/src/main/java/modena/SamplePageNavigation.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SamplePageNavigation.java	Mon Mar 03 13:26:38 2014 -0500
@@ -31,8 +31,6 @@
  */
 package modena;
 
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.scene.control.ChoiceBox;
 import javafx.scene.control.Label;
 import javafx.scene.control.ScrollPane;
@@ -56,37 +54,31 @@
         toolBar.getStyleClass().add("bottom");
         toolBar.getItems().add(new Label("Go to section:"));
         final ChoiceBox<SamplePage.Section> sectionChoiceBox = new ChoiceBox<>();
-        sectionChoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<SamplePage.Section>() {
-            @Override public void changed(ObservableValue<? extends SamplePage.Section> observable, SamplePage.Section oldValue, SamplePage.Section newValue) {
-                setCurrentSection(newValue);
-            }
-        });
+        sectionChoiceBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> setCurrentSection(newValue));
         sectionChoiceBox.getItems().addAll(samplePage.getSections());
         toolBar.getItems().add(sectionChoiceBox);
         setBottom(toolBar);
-        scrollPane.vvalueProperty().addListener(new ChangeListener<Number>() {
-            @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
-                if (!isLocalChange) {
-                    isLocalChange = true;
-                    // calc scroll position relative to scroll pane content
-                    double posPixels = samplePage.getLayoutBounds().getHeight() * newValue.doubleValue();
-                    // move to top of view port
-                    posPixels -=  scrollPane.getLayoutBounds().getHeight() * newValue.doubleValue();
-                    // move to center of view port
-                    posPixels +=  scrollPane.getLayoutBounds().getHeight() * 0.5;
-                    // find section that contains view port center
-                    currentSection = null;
-                    for (SamplePage.Section section: samplePage.getSections()) {
-                        if (section.box.getBoundsInParent().getMaxY() > posPixels ) {
-                            currentSection = section;
-                            break;
-                        }
+        scrollPane.vvalueProperty().addListener((observable, oldValue, newValue) -> {
+            if (!isLocalChange) {
+                isLocalChange = true;
+                // calc scroll position relative to scroll pane content
+                double posPixels = samplePage.getLayoutBounds().getHeight() * newValue.doubleValue();
+                // move to top of view port
+                posPixels -=  scrollPane.getLayoutBounds().getHeight() * newValue.doubleValue();
+                // move to center of view port
+                posPixels +=  scrollPane.getLayoutBounds().getHeight() * 0.5;
+                // find section that contains view port center
+                currentSection = null;
+                for (SamplePage.Section section: samplePage.getSections()) {
+                    if (section.box.getBoundsInParent().getMaxY() > posPixels ) {
+                        currentSection = section;
+                        break;
                     }
-                    sectionChoiceBox.getSelectionModel().select(currentSection);
-                    isLocalChange = false;
                 }
+                sectionChoiceBox.getSelectionModel().select(currentSection);
+                isLocalChange = false;
+            }
 
-            }
         });
     }
 
--- a/apps/experiments/Modena/src/main/java/modena/SamplePageTableHelper.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SamplePageTableHelper.java	Mon Mar 03 13:26:38 2014 -0500
@@ -38,12 +38,9 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.collections.SetChangeListener;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.control.Label;
 import javafx.scene.control.SelectionMode;
@@ -58,7 +55,6 @@
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Paint;
 import javafx.scene.shape.Rectangle;
-import javafx.util.Callback;
 
 /**
  * Helper class for creating table views for testing
@@ -95,11 +91,7 @@
                     return firstName.get() + " " + lastName.get();
                 }
             });
-            this.invited.addListener(new ChangeListener<Boolean>() {
-                public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
-                    System.out.println(getFirstName() + " invited: " + t1);
-                }
-            });
+            this.invited.addListener((ov, t, t1) -> System.out.println(getFirstName() + " invited: " + t1));
         }
         
         public Boolean isInvited() { return invited.get(); }
@@ -216,18 +208,10 @@
         emailCol = new TableColumn<Person, String>();
         emailCol.setText("Email");
         emailCol.setMinWidth(200);
-        emailCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().emailProperty();
-            }
-        });
+        emailCol.setCellValueFactory(p -> p.getValue().emailProperty());
         countryCol = new TableColumn<Person, String>();
         countryCol.setText("Country");
-        countryCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return new ReadOnlyObjectWrapper<String>("New Zealand");
-            }
-        });
+        countryCol.setCellValueFactory(p -> new ReadOnlyObjectWrapper<String>("New Zealand"));
         // Create TableView
         TableView<Person> tableView = new TableView<Person>();
         tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
@@ -268,54 +252,36 @@
 //        });
 //        firstNameCol.setSortNode(sortNode);
         firstNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("firstName"));
-        firstNameCol.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Person, String>>() {
-            @Override public void handle(TableColumn.CellEditEvent<Person, String> t) {
-                System.out.println("Edit commit event: " + t.getNewValue());
-            }
-        });
+        firstNameCol.setOnEditCommit(t -> System.out.println("Edit commit event: " + t.getNewValue()));
         lastNameCol = new TableColumn<Person, String>();
         lastNameCol.setText("Last");
         lastNameCol.setSortType(TableColumn.SortType.DESCENDING);
-        lastNameCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().lastNameProperty();
-            }
-        });
+        lastNameCol.setCellValueFactory(p -> p.getValue().lastNameProperty());
         nameCol = new TableColumn<Person, String>();
         nameCol.setText("Name");
         nameCol.getColumns().addAll(firstNameCol, lastNameCol);
         emailCol = new TableColumn<Person, String>();
         emailCol.setText("Email");
         emailCol.setMinWidth(200);
-        emailCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().emailProperty();
-            }
-        });
+        emailCol.setCellValueFactory(p -> p.getValue().emailProperty());
         countryCol = new TableColumn<Person, String>();
         countryCol.setText("Country");
-        countryCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return new ReadOnlyObjectWrapper<String>("New Zealand");
-            }
-        });
+        countryCol.setCellValueFactory(p -> new ReadOnlyObjectWrapper<String>("New Zealand"));
         // Test case for RT-28410 MODENA: can't make tree/table cell factories change color based
         // on background when setGraphic(...) is used
-        countryCol.setCellFactory(new Callback<TableColumn<Person, String>, TableCell<Person, String>>() {
-            @Override public TableCell<Person, String> call(TableColumn<Person, String> param) {
-                final Label label = new Label();
-                label.setStyle(
-                        "-fx-font-family: 'Times New Roman';" +
-                        "-fx-font-size: 0.8em;" +
-                        "-fx-text-fill: ladder(-fx-background, yellow 49%, red 50%);");
-                TableCell cell = new TableCell() {
-                    @Override protected void updateItem(Object item, boolean empty) {
-                        label.setText(empty ? null : item.toString());
-                    }
-                };
-                cell.setGraphic(label);
-                return cell;
-            }
+        countryCol.setCellFactory(param -> {
+            final Label label = new Label();
+            label.setStyle(
+                    "-fx-font-family: 'Times New Roman';" +
+                    "-fx-font-size: 0.8em;" +
+                    "-fx-text-fill: ladder(-fx-background, yellow 49%, red 50%);");
+            TableCell cell = new TableCell() {
+                @Override protected void updateItem(Object item, boolean empty) {
+                    label.setText(empty ? null : item.toString());
+                }
+            };
+            cell.setGraphic(label);
+            return cell;
         });
 
         invitedCol = new TableColumn<Person, Boolean>();
@@ -323,11 +289,7 @@
         invitedCol.setPrefWidth(55);
         invitedCol.setMaxWidth(55);
         invitedCol.setCellValueFactory(new PropertyValueFactory("invited"));
-        invitedCol.setCellFactory(new Callback<TableColumn<Person, Boolean>, TableCell<Person, Boolean>>() {
-            public TableCell<Person, Boolean> call(TableColumn<Person, Boolean> p) {
-                return new CheckBoxTableCell<Person, Boolean>();
-            }
-        });
+        invitedCol.setCellFactory(p -> new CheckBoxTableCell<Person, Boolean>());
         
         
         TableView<Person> tableView = new TableView<Person>();
--- a/apps/experiments/Modena/src/main/java/modena/SamplePageTreeTableHelper.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SamplePageTreeTableHelper.java	Mon Mar 03 13:26:38 2014 -0500
@@ -36,12 +36,11 @@
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
 import java.util.Random;
+
 import javafx.beans.property.ReadOnlyObjectWrapper;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ObservableList;
 import javafx.scene.Node;
 import javafx.scene.control.SelectionMode;
@@ -51,7 +50,6 @@
 import javafx.scene.control.TreeTableColumn;
 import javafx.scene.control.TreeTableView;
 import javafx.scene.shape.SVGPath;
-import javafx.util.Callback;
 
 /**
  * Helper class for creating tree table views for testing
@@ -141,83 +139,63 @@
         // --- name column
         TreeTableColumn<DummyFile, String> nameColumn = new TreeTableColumn<DummyFile, String>("Name");
         nameColumn.setPrefWidth(300);
-        nameColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, String>, ObservableValue<String>>() {
-            @Override public ObservableValue<String> call(TreeTableColumn.CellDataFeatures<DummyFile, String> p) {
-                DummyFile f = p.getValue().getValue();
-                String text = f == ROOT ? "/" : f.getName();
-                return new ReadOnlyObjectWrapper<String>(text);
-            }
+        nameColumn.setCellValueFactory(p -> {
+            DummyFile f = p.getValue().getValue();
+            String text = f == ROOT ? "/" : f.getName();
+            return new ReadOnlyObjectWrapper<String>(text);
         });
 
         // --- size column
         TreeTableColumn<DummyFile, DummyFile> sizeColumn = new TreeTableColumn<DummyFile, DummyFile>("Size");
         sizeColumn.setPrefWidth(100);
-        sizeColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, DummyFile>, ObservableValue<DummyFile>>() {
-            @Override public ObservableValue<DummyFile> call(TreeTableColumn.CellDataFeatures<DummyFile, DummyFile> p) {
-                return new ReadOnlyObjectWrapper<DummyFile>(p.getValue().getValue());
+        sizeColumn.setCellValueFactory(p -> new ReadOnlyObjectWrapper<DummyFile>(p.getValue().getValue()));
+        sizeColumn.setCellFactory(p -> new TreeTableCell<DummyFile, DummyFile>() {
+            @Override protected void updateItem(DummyFile item, boolean empty) {
+                super.updateItem(item, empty);
+                
+                TreeTableView treeTable = p.getTreeTableView();
+
+                // if the File is a directory, it has no size...
+//                        ObservableList<TreeItem<DummyFile>> items = p.getTreeTableView().getItems();
+                if (getIndex() >= treeTable.getExpandedItemCount()) {
+                    setText(null);
+                } else {
+                    TreeItem<DummyFile> treeItem = treeTable.getTreeItem(getIndex());
+                    if (item == null || empty || treeItem == null || 
+                            treeItem.getValue() == null || treeItem.getValue().isDirectory()) {
+                        setText(null);
+                    } else {
+                        setText(nf.format(item.getSize()) + " KB");
+                    }
+                }
             }
         });
-        sizeColumn.setCellFactory(new Callback<TreeTableColumn<DummyFile, DummyFile>, TreeTableCell<DummyFile, DummyFile>>() {
-            @Override public TreeTableCell<DummyFile, DummyFile> call(final TreeTableColumn<DummyFile, DummyFile> p) {
-                return new TreeTableCell<DummyFile, DummyFile>() {
-                    @Override protected void updateItem(DummyFile item, boolean empty) {
-                        super.updateItem(item, empty);
-                        
-                        TreeTableView treeTable = p.getTreeTableView();
-
-                        // if the File is a directory, it has no size...
-//                        ObservableList<TreeItem<DummyFile>> items = p.getTreeTableView().getItems();
-                        if (getIndex() >= treeTable.getExpandedItemCount()) {
-                            setText(null);
-                        } else {
-                            TreeItem<DummyFile> treeItem = treeTable.getTreeItem(getIndex());
-                            if (item == null || empty || treeItem == null || 
-                                    treeItem.getValue() == null || treeItem.getValue().isDirectory()) {
-                                setText(null);
-                            } else {
-                                setText(nf.format(item.getSize()) + " KB");
-                            }
-                        }
-                    }
-                };
-            }
-        });
-        sizeColumn.setComparator(new Comparator<DummyFile>() {
-            @Override public int compare(DummyFile f1, DummyFile f2) {
-                long s1 = f1.isDirectory() ? 0 : f1.getSize();
-                long s2 = f2.isDirectory() ? 0 : f2.getSize();
-                long result = s1 - s2;
-                if (result < 0) {
-                    return -1;
-                } else if (result == 0) {
-                    return 0;
-                } else {
-                    return 1;
-                }
+        sizeColumn.setComparator((f1, f2) -> {
+            long s1 = f1.isDirectory() ? 0 : f1.getSize();
+            long s2 = f2.isDirectory() ? 0 : f2.getSize();
+            long result = s1 - s2;
+            if (result < 0) {
+                return -1;
+            } else if (result == 0) {
+                return 0;
+            } else {
+                return 1;
             }
         });
         
         // --- modified column
         TreeTableColumn<DummyFile, Date> lastModifiedColumn = new TreeTableColumn<DummyFile, Date>("Last Modified");
         lastModifiedColumn.setPrefWidth(130);
-        lastModifiedColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, Date>, ObservableValue<Date>>() {
-            @Override public ObservableValue<Date> call(TreeTableColumn.CellDataFeatures<DummyFile, Date> p) {
-                return new ReadOnlyObjectWrapper<Date>(p.getValue().getValue().getModified());
-            }
-        });
-        lastModifiedColumn.setCellFactory(new Callback<TreeTableColumn<DummyFile, Date>, TreeTableCell<DummyFile, Date>>() {
-            @Override public TreeTableCell<DummyFile, Date> call(TreeTableColumn<DummyFile, Date> p) {
-                return new TreeTableCell<DummyFile, Date>() {
-                    @Override protected void updateItem(Date item, boolean empty) {
-                        super.updateItem(item, empty);
-                        
-                        if (item == null || empty) {
-                            setText(null);
-                        } else {
-                            setText(df.format(item));
-                        }
-                    }
-                };
+        lastModifiedColumn.setCellValueFactory(p -> new ReadOnlyObjectWrapper<Date>(p.getValue().getValue().getModified()));
+        lastModifiedColumn.setCellFactory(p -> new TreeTableCell<DummyFile, Date>() {
+            @Override protected void updateItem(Date item, boolean empty) {
+                super.updateItem(item, empty);
+                
+                if (item == null || empty) {
+                    setText(null);
+                } else {
+                    setText(df.format(item));
+                }
             }
         });
         
--- a/apps/experiments/Modena/src/main/java/modena/SimpleWindowPage.java	Mon Mar 03 21:57:56 2014 +0400
+++ b/apps/experiments/Modena/src/main/java/modena/SimpleWindowPage.java	Mon Mar 03 13:26:38 2014 -0500
@@ -86,32 +86,30 @@
             ubuntuWindowContent = (Node)FXMLLoader.load(SimpleWindowPage.class.getResource("simple-window.fxml"));
             ubuntuWindow.getChildren().add(ubuntuWindowContent);
             
-            Platform.runLater(new Runnable() {                
-                @Override public void run() {
-                    final Node macRB1 = macWindowContent.lookup("#RadioButton1");
-                    macRB1.setMouseTransparent(true);
-                    final Node macRB2 = macWindowContent.lookup("#RadioButton2");
-                    macRB2.setMouseTransparent(true);
-                    macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+            Platform.runLater(() -> {
+                final Node macRB1 = macWindowContent.lookup("#RadioButton1");
+                macRB1.setMouseTransparent(true);
+                final Node macRB2 = macWindowContent.lookup("#RadioButton2");
+                macRB2.setMouseTransparent(true);
+                macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
 
-                    final Node windows7RB1 = windows7WindowContent.lookup("#RadioButton1");
-                    windows7RB1.setMouseTransparent(true);
-                    final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
-                    windows7RB2.setMouseTransparent(true);
-                    windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+                final Node windows7RB1 = windows7WindowContent.lookup("#RadioButton1");
+                windows7RB1.setMouseTransparent(true);
+                final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
+                windows7RB2.setMouseTransparent(true);
+                windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
 
-                    final Node windows8RB1 = windows8WindowContent.lookup("#RadioButton1");
-                    windows8RB1.setMouseTransparent(true);
-                    final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
-                    windows8RB2.setMouseTransparent(true);
-                    windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+                final Node windows8RB1 = windows8WindowContent.lookup("#RadioButton1");
+                windows8RB1.setMouseTransparent(true);
+                final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
+                windows8RB2.setMouseTransparent(true);
+                windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
 
-                    final Node ubuntuRB1 = ubuntuWindowContent.lookup("#RadioButton1");
-                    ubuntuRB1.setMouseTransparent(true);
-                    final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
-                    ubuntuRB2.setMouseTransparent(true);
-                    ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
-                }
+                final Node ubuntuRB1 = ubuntuWindowContent.lookup("#RadioButton1");
+                ubuntuRB1.setMouseTransparent(true);
+                final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
+                ubuntuRB2.setMouseTransparent(true);
+                ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
             });
                       
             box.getChildren().addAll(macWindow, ubuntuWindow, windows7Window, windows8Window);