changeset 144:b7a5e7714c6e

Revert latest changes.
author Aleksandr Sakharuk <aleksandr.sakharuk@oracle.com>
date Tue, 12 Feb 2013 17:56:14 +0400
parents e0332c204b54
children 846b0a99dc08
files detect_javafx.xml functional/SceneGraphTests/src/ButtonsValidator.java functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java functional/SceneGraphTests/src/test/multitouch/app/MouseEventApp.java functional/SceneGraphTests/src/test/multitouch/app/MultiTouchApp.java functional/SceneGraphTests/src/test/multitouch/app/TouchPointGrabApp.java functional/SceneGraphTests/src/test/multitouch/app/TouchPointsMarksScene.java functional/SceneGraphTests/src/test/multitouch/app/TouchableShapeFactory.java functional/SceneGraphTests/src/test/scenegraph/app/AffineApp.java functional/SceneGraphTests/src/test/scenegraph/app/AffineManual.java functional/SceneGraphTests/src/test/scenegraph/app/AnimationApp.java functional/SceneGraphTests/src/test/scenegraph/app/AnimationBooleanInterpolator.java functional/SceneGraphTests/src/test/scenegraph/app/AnimationTransitionApp.java functional/SceneGraphTests/src/test/scenegraph/app/CanvasEffects2App.java functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapePathElements2App.java functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapes2App.java functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java functional/SceneGraphTests/src/test/scenegraph/app/DepthTestApp.java functional/SceneGraphTests/src/test/scenegraph/app/DepthTestScene.java functional/SceneGraphTests/src/test/scenegraph/app/Effects.java functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java functional/SceneGraphTests/src/test/scenegraph/app/Effects3DApp.java functional/SceneGraphTests/src/test/scenegraph/app/EffectsApp.java functional/SceneGraphTests/src/test/scenegraph/app/EventsApp.java functional/SceneGraphTests/src/test/scenegraph/app/FontsApp.java functional/SceneGraphTests/src/test/scenegraph/app/GeometryApp.java functional/SceneGraphTests/src/test/scenegraph/app/HardwareApp.java functional/SceneGraphTests/src/test/scenegraph/app/HasTransformsApp.java functional/SceneGraphTests/src/test/scenegraph/app/ImageLoadingApp.java functional/SceneGraphTests/src/test/scenegraph/app/ImageLoadingManual.java functional/SceneGraphTests/src/test/scenegraph/app/ImagePatternApp.java functional/SceneGraphTests/src/test/scenegraph/app/ImagePatternTransformApp.java functional/SceneGraphTests/src/test/scenegraph/app/ImagesApp.java functional/SceneGraphTests/src/test/scenegraph/app/InterpolatorApp.java functional/SceneGraphTests/src/test/scenegraph/app/Layout2App.java functional/SceneGraphTests/src/test/scenegraph/app/Layout3DApp.java functional/SceneGraphTests/src/test/scenegraph/app/LocalTo_TransformsApp.java functional/SceneGraphTests/src/test/scenegraph/app/NodeParentApp.java functional/SceneGraphTests/src/test/scenegraph/app/NodeSnapshot2App.java functional/SceneGraphTests/src/test/scenegraph/app/SceneEventHandlersApp.java functional/SceneGraphTests/src/test/scenegraph/app/SceneInputApp.java functional/SceneGraphTests/src/test/scenegraph/app/ShapePathElements2App.java functional/SceneGraphTests/src/test/scenegraph/app/ShapePathElementsApp.java functional/SceneGraphTests/src/test/scenegraph/app/Shapes2App.java functional/SceneGraphTests/src/test/scenegraph/app/ShapesApp.java functional/SceneGraphTests/src/test/scenegraph/app/StageSceneApp.java functional/SceneGraphTests/src/test/scenegraph/app/TestLCDTextApp.java functional/SceneGraphTests/src/test/scenegraph/app/TestTextApp.java functional/SceneGraphTests/src/test/scenegraph/app/TimelineApp.java functional/SceneGraphTests/src/test/scenegraph/app/Transforms3DApp.java functional/SceneGraphTests/src/test/scenegraph/app/TransformsApp.java functional/SceneGraphTests/src/test/scenegraph/binding/BindingApp.java functional/SceneGraphTests/src/test/scenegraph/binding/BindingControl.java functional/SceneGraphTests/src/test/scenegraph/binding/Constraint.java functional/SceneGraphTests/src/test/scenegraph/binding/Consts.java functional/SceneGraphTests/src/test/scenegraph/binding/Factories.java functional/SceneGraphTests/src/test/scenegraph/binding/NumberConstraints.java functional/SceneGraphTests/src/test/scenegraph/binding/ObjectConstraints.java functional/SceneGraphTests/src/test/scenegraph/binding/Person.java functional/SceneGraphTests/src/test/scenegraph/fullscreen/FSTestApp.java functional/SceneGraphTests/src/test/scenegraph/lcd/LCDTextTestApp.java functional/SceneGraphTests/src/test/scenegraph/lcd/LcdAPITestApp.java functional/SceneGraphTests/src/test/scenegraph/lcd/TestAction.java functional/SceneGraphTests/src/test/scenegraph/lcd/TestActions.java functional/SceneGraphTests/src/test/scenegraph/lcd/TestCollections.java functional/SceneGraphTests/src/test/scenegraph/lcd/actions/EffectTestAction.java functional/SceneGraphTests/src/test/scenegraph/lcd/actions/RotateTestAction.java functional/SceneGraphTests/src/test/scenegraph/lcd/actions/SizeScaleTestAction.java functional/SceneGraphTests/src/test/scenegraph/lcd/animation/AnimationLCDTextTestApp.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Action.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Actions.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/DefaultFactory.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/EffectAction.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Factories.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Factory.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/LCDControlsTestApp.java functional/SceneGraphTests/src/test/scenegraph/lcd/controls/TestTableItem.java functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/EmptyActionFactory.java functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/Factories.java functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/Factory.java functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/TransparencyLCDTextTestApp.java functional/SceneGraphTests/src/test/scenegraph/modality/ModalityApp.java functional/SceneGraphTests/src/test/scenegraph/modality/ModalityWindow.java functional/SceneGraphTests/src/test/scenegraph/richtext/RichTextPropertiesApp.java functional/SceneGraphTests/src/test/scenegraph/stage/PopupApp.java functional/SceneGraphTests/src/test/scenegraph/transparency/TransparencyWindowApp.java functional/SceneGraphTests/test/security/D3DPipelineNativePointerTest.java functional/SceneGraphTests/test/security/D3DRendererNativePointerTest.java functional/SceneGraphTests/test/test/doc/PropsAndXReferenceTestManual.java functional/SceneGraphTests/test/test/doc/VisibilityTestManual.java functional/SceneGraphTests/test/test/fxapp/LifecycleStopTest.java functional/SceneGraphTests/test/test/fxapp/LifecycleTest.java functional/SceneGraphTests/test/test/scenegraph/binding/BindingTestBase.java functional/SceneGraphTests/test/test/scenegraph/binding/Utils.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ChoiceBoxTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/HtmlEditorTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/HyperlinkTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ListViewTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuBarTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuButtonTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/PasswordBoxTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressBarTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressIndicatorTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/RadioButtonTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ScrollBarTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/SeparatorTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/SliderTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/TableViewTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextAreaTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextFieldTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonSelectedTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToolBarTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/TreeViewTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonGraphicTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/checkBoxTest.java functional/SceneGraphTests/test/test/scenegraph/binding/controls/labelTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/BlendTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/BloomTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/BoxBlurTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/ColorAdjustTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/DisplacementMapTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/DropShadowTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/FloodTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/GaussianBlurTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/GlowTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/IdentityTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/InnerShadowTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/ReflectionTest.java functional/SceneGraphTests/test/test/scenegraph/binding/effects/ShadowTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CircleTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/EllipseTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/HLineToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/MoveToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PathTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolygonTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolylineTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/RectangleTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/SVGPathTest.java functional/SceneGraphTests/test/test/scenegraph/binding/shapes/VLineToTest.java functional/SceneGraphTests/test/test/scenegraph/binding/text/fontTest.java functional/SceneGraphTests/test/test/scenegraph/debug/PluginValidatorApp.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestAnimationFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestAnimationFullScreenNonResizable.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestEneterModalityToFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestMenuFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestModalityInFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestOpacityFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestReadFullScreenProperty.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestWindowOperationsFullScreen.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestWriteFullScreenPropertyFalse.java functional/SceneGraphTests/test/test/scenegraph/fullscreen/TestWriteFullScreenPropertyTrue.java functional/SceneGraphTests/test/test/scenegraph/functional/AnimationTest.java functional/SceneGraphTests/test/test/scenegraph/functional/AnimationTransitionTest.java functional/SceneGraphTests/test/test/scenegraph/functional/CanvasEffects2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/CanvasShape2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/CanvasShapePathElements2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/ColorTest.java functional/SceneGraphTests/test/test/scenegraph/functional/DepthTestTest.java functional/SceneGraphTests/test/test/scenegraph/functional/Effects2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/Effects3DTest.java functional/SceneGraphTests/test/test/scenegraph/functional/EventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/FontsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/GeometryTest.java functional/SceneGraphTests/test/test/scenegraph/functional/HardwareTest.java functional/SceneGraphTests/test/test/scenegraph/functional/HasTransformsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/ImagePatternTest.java functional/SceneGraphTests/test/test/scenegraph/functional/ImagePatternTransformTest.java functional/SceneGraphTests/test/test/scenegraph/functional/ImageTest.java functional/SceneGraphTests/test/test/scenegraph/functional/Layout2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/Layout3DTest.java functional/SceneGraphTests/test/test/scenegraph/functional/LocalTo_TransformsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/NodeParentTest.java functional/SceneGraphTests/test/test/scenegraph/functional/NodeSnaphot2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/SceneEventHandlersTest.java functional/SceneGraphTests/test/test/scenegraph/functional/SceneInputTest.java functional/SceneGraphTests/test/test/scenegraph/functional/Shape2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/ShapePathElements2Test.java functional/SceneGraphTests/test/test/scenegraph/functional/TimelineTest.java functional/SceneGraphTests/test/test/scenegraph/functional/Transform3DTest.java functional/SceneGraphTests/test/test/scenegraph/functional/TransformTest.java functional/SceneGraphTests/test/test/scenegraph/functional/affine/AffineTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ButtonEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/CheckBoxEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ChoiceBoxEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ColorPickerEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ComboBoxEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/Command.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/EventTestCommon.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/EventTestHidingPopup.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/EventTestTextInput.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/HyperlinkEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/LabelEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ListViewEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/MenuButtonEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/PaginationEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/PasswordFieldEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/TextAreaEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/TextFieldEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/TitledPaneEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/ToggleButtonEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/controls/events/TreeViewEventsTest.java functional/SceneGraphTests/test/test/scenegraph/functional/imageLoading/ImageLoadingTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/BufferedImageToFXImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/BufferedImageToFXImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/BufferedImageToFXImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/BufferedImageToFXImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ColorComponentProvider.java functional/SceneGraphTests/test/test/scenegraph/imageops/ColorComponents.java functional/SceneGraphTests/test/test/scenegraph/imageops/CreateTestImages.java functional/SceneGraphTests/test/test/scenegraph/imageops/FXImageToBufferedImageTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ReadImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ReadImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ReadImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ReadImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/ReadImageTestBase.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayARGBImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayARGBImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayARGBImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayARGBImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayARGBImageTestBase.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayBGRABytesImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayBGRABytesImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayBGRABytesImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayBGRABytesImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteArrayBGRABytesImageTestBase.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleARGBImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleARGBImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleARGBImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleARGBImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleARGBImageTestBase.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleColorImageBlueTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleColorImageGreenTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleColorImageOpacityTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleColorImageRedTest.java functional/SceneGraphTests/test/test/scenegraph/imageops/WriteSingleColorImageTestBase.java functional/SceneGraphTests/test/test/scenegraph/lcd/LCDTestBase.java functional/SceneGraphTests/test/test/scenegraph/lcd/LcdUtils.java functional/SceneGraphTests/test/test/scenegraph/lcd/PixelsCalc.java functional/SceneGraphTests/test/test/scenegraph/lcd/TestGenerator.java functional/SceneGraphTests/test/test/scenegraph/lcd/api/APITest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/LCDControlsTestBase.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/TestGenerator.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/AccordionTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/ButtonTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/CheckBoxTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/LabelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/ListViewTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/MenuTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/ProgressIndicatorTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/RadioTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/SliderTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/TableViewTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/TextFieldTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/TitledPaneTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/ToggleButtonTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/controls/tests/ToolBarTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/BloomTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/BoxBlurTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ColorAdjustTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/DisplacementMapTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/DropShadowTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/GaussianBlurTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/GlowTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/InnerShadowTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/LightingTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/MotionBlurTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/PerspectiveTransformTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ReflectionTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/RotateTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ScaleAllTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ScaleXTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ScaleYTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/SepiaToneTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/ShadowTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/SizeScaleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/tests/SizeTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TestGenerator.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TransparencyLCDTestBase.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent01PixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent01PixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent01RectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent01RectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent09PixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent09PixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent09RectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucent09RectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucentPixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucentPixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucentRectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTranslucentRectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTransparentRectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/AddTransparentRectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent01PixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent01PixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent01RectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent01RectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent09PixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent09PixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent09RectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/Translucent09RectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentBackgroundTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentPaneTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentPixelBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentPixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentRectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TranslucentRectangleTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TransparentBackgroundTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TransparentPixelTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TransparentRectangleBeforeTextTest.java functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/test/TransparentRectangleTest.java functional/SceneGraphTests/test/test/scenegraph/manual/Interpolator.java functional/SceneGraphTests/test/test/scenegraph/manual/TestAnimationLCDText.java functional/SceneGraphTests/test/test/scenegraph/manual/TestLCDText.java functional/SceneGraphTests/test/test/scenegraph/manual/TestText.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityBase.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityTest.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityWithChoiceBoxTest.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityZOrderAndFocusTest.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityZOrderAndFocusWithFileChooser1Test.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityZOrderAndFocusWithFileChooser2Test.java functional/SceneGraphTests/test/test/scenegraph/modality/ModalityZOrderAndFocusWithFileChooser3Test.java functional/SceneGraphTests/test/test/scenegraph/modality/ShowAndWaitTest.java functional/SceneGraphTests/test/test/scenegraph/modality/Utils.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextLabeledsTest.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextMixedTest.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextPropertiesFunctional.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextRectangleTest.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextTestBase.java functional/SceneGraphTests/test/test/scenegraph/richtext/RichTextTextTest.java functional/SceneGraphTests/test/test/scenegraph/stage/PopupTest.java functional/SceneGraphTests/test/test/scenegraph/transparency/TransparencyWindowTest.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractApp2.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractFailureRegistrator.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestPresenter.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestableApplication.java tools/SharedTestUtils/src/test/javaclient/shared/ActionHolder.java tools/SharedTestUtils/src/test/javaclient/shared/AppLauncher.java tools/SharedTestUtils/src/test/javaclient/shared/BasicButtonChooserApp.java tools/SharedTestUtils/src/test/javaclient/shared/ButtonChooser.java tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter.java tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java tools/SharedTestUtils/src/test/javaclient/shared/DragSupport.java tools/SharedTestUtils/src/test/javaclient/shared/FilteredTestRunner.java tools/SharedTestUtils/src/test/javaclient/shared/InteroperabilityApp.java tools/SharedTestUtils/src/test/javaclient/shared/JemmyUtils.java tools/SharedTestUtils/src/test/javaclient/shared/PageWithSlots.java tools/SharedTestUtils/src/test/javaclient/shared/Scene3D.java tools/SharedTestUtils/src/test/javaclient/shared/ScrollablePageWithSlots.java tools/SharedTestUtils/src/test/javaclient/shared/SelectActionProvider.java tools/SharedTestUtils/src/test/javaclient/shared/SwingAWTUtils.java tools/SharedTestUtils/src/test/javaclient/shared/TestBase.java tools/SharedTestUtils/src/test/javaclient/shared/TestBaseBase.java tools/SharedTestUtils/src/test/javaclient/shared/TestNode.java tools/SharedTestUtils/src/test/javaclient/shared/TestNodeLeaf.java tools/SharedTestUtils/src/test/javaclient/shared/TestSceneChooser.java tools/SharedTestUtils/src/test/javaclient/shared/TestUtil.java tools/SharedTestUtils/src/test/javaclient/shared/Utils.java tools/SharedTestUtils/src/test/javaclient/shared/appendXMLWithFxInfo.java tools/SharedTestUtils/src/test/javaclient/shared/description/FXSceneTreeBuilder.java tools/SharedTestUtils/src/test/javaclient/shared/description/FXSimpleNodeDescription.java tools/SharedTestUtils/src/test/javaclient/shared/description/TreeNode.java tools/SharedTestUtils/src/test/javaclient/shared/imagescomparator/ImageDuplicateExtractor.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ImagesManager.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ScreenshotUtils.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/SerializableBufferedImage.java
diffstat 377 files changed, 20038 insertions(+), 13018 deletions(-) [+]
line wrap: on
line diff
--- a/detect_javafx.xml	Thu Feb 07 16:36:54 2013 +0400
+++ b/detect_javafx.xml	Tue Feb 12 17:56:14 2013 +0400
@@ -9,14 +9,14 @@
         <property file="build.properties"/>
     </target>
     <target name="check-javafx-in-jdk" unless="javafx.rt">
-        <available file="${java.home}/lib/ext/jfxrt.jar" property="jfxrt-jar-exists"/>
-        <fail unless="jfxrt-jar-exists" message="${java.home}/lib/ext/jfxrt.jar does not exist"/>
+        <available file="${java.home}/lib/jfxrt.jar" property="jfxrt-jar-exists"/>
+        <fail unless="jfxrt-jar-exists" message="${java.home}/lib/jfxrt.jar does not exist"/>
         <property name="javafx.rt" value="${java.home}"/>
         <antcall target="write-javafx-rt" inheritall="true"/>
     </target>
     <target name="check-javafx-rt" if="javafx.rt">
-        <available file="${javafx.rt}/lib/ext/jfxrt.jar" property="jfxrt-jar-exists"/>
-        <fail unless="jfxrt-jar-exists" message="${javafx.rt}/lib/ext/jfxrt.jar does not exist"/>
+        <available file="${javafx.rt}/lib/jfxrt.jar" property="jfxrt-jar-exists"/>
+        <fail unless="jfxrt-jar-exists" message="${javafx.rt}/lib/jfxrt.jar does not exist"/>
     </target>
     <target name="find-javafx" depends="write-javafx-rt, read-javafx-rt, check-javafx-in-jdk, check-javafx-rt">
         <property file="build.properties"/>
--- a/functional/SceneGraphTests/src/ButtonsValidator.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/ButtonsValidator.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,4 +1,26 @@
-
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
 import java.util.Random;
 import javafx.scene.Scene;
 import javafx.scene.text.Text;
--- a/functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,106 +1,125 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.fxapp;
-
-import java.util.List;
-import java.util.Map;
-import javafx.application.Application;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.scene.Group;
-import javafx.scene.Scene;
-import javafx.scene.control.ButtonBuilder;
-import javafx.stage.Stage;
-
-/**
- *
- * @author Sergey
- */
-public class LifecycleApp extends Application {
-
-    static final String PARAM1 = "param1";
-    static final String PARAM2 = "    param2";
-    static final String PARAM3 = "    param3    ";
-    static final String PARAMZ = "param4 param5";
-    static final String NAME1 = "named1";
-    static final String VALUE1 = "value1";
-    static final String NAME2 = "named2";
-    static final String FAKENAMED = "fakenamed3=value3";
-
-    static final String[] DEFAULT_PARAMS = new String[] {PARAM1, PARAM2, "--" + NAME1 + "=" + VALUE1, "--" + NAME2 + "=", FAKENAMED, PARAMZ, PARAM3};
-
-    public static void main(String[] args) {
-        reset();
-        launch(DEFAULT_PARAMS);
-    }
-    
-    @Override
-    public void start(final Stage stage) throws Exception {
-
-        System.out.println("START");
-        status.start = now();
-
-        status.named = getParameters().getNamed();
-        System.out.println("Named Parameters:");
-        for (String pkey : status.named.keySet()) {
-            System.out.println(pkey + "=" + status.named.get(pkey));
-        }
-        System.out.println("Unnamed Parameters:");
-        for (String string : status.unnamed = getParameters().getUnnamed()) {
-            System.out.println(string);
-        }
-        System.out.println("Raw Parameters:");
-        for (String string : status.raw = getParameters().getRaw()) {
-            System.out.println(string);
-        }
-        stage.setScene(new Scene(new Group(ButtonBuilder.create().text("close").onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                stage.close();
-            }
-
-        }).build())));
-        stage.show();
-        
-    }
-    
-    @Override
-    public void init() throws Exception {
-        super.init();
-        System.out.println("INIT");
-        status.init = now();
-    }
-    
-    @Override
-    public void stop() throws Exception {
-        super.stop();
-        System.out.println("STOP");
-        status.stop = now();
-    }
-
-
-    // reporting utility, we use an interpid assume that there is one test in the VM at one time
-    static class Status {
-        long zero = System.nanoTime();
-
-        long init = -1;
-        long start = -1;
-        long stop = -1;
-
-        Map<String, String> named = null;
-        List<String> unnamed = null;
-        List<String> raw = null;
-    }
-
-    private static long now() {
-        return System.nanoTime() - status.zero;
-    }
-
-    static Status status = null;
-
-    static void reset() {
-        status = new Status();
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.fxapp;
+
+import java.util.List;
+import java.util.Map;
+import javafx.application.Application;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.scene.control.ButtonBuilder;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author Sergey
+ */
+public class LifecycleApp extends Application {
+
+    static final String PARAM1 = "param1";
+    static final String PARAM2 = "    param2";
+    static final String PARAM3 = "    param3    ";
+    static final String PARAMZ = "param4 param5";
+    static final String NAME1 = "named1";
+    static final String VALUE1 = "value1";
+    static final String NAME2 = "named2";
+    static final String FAKENAMED = "fakenamed3=value3";
+
+    static final String[] DEFAULT_PARAMS = new String[] {PARAM1, PARAM2, "--" + NAME1 + "=" + VALUE1, "--" + NAME2 + "=", FAKENAMED, PARAMZ, PARAM3};
+
+    public static void main(String[] args) {
+        reset();
+        launch(DEFAULT_PARAMS);
+    }
+    
+    @Override
+    public void start(final Stage stage) throws Exception {
+
+        System.out.println("START");
+        status.start = now();
+
+        status.named = getParameters().getNamed();
+        System.out.println("Named Parameters:");
+        for (String pkey : status.named.keySet()) {
+            System.out.println(pkey + "=" + status.named.get(pkey));
+        }
+        System.out.println("Unnamed Parameters:");
+        for (String string : status.unnamed = getParameters().getUnnamed()) {
+            System.out.println(string);
+        }
+        System.out.println("Raw Parameters:");
+        for (String string : status.raw = getParameters().getRaw()) {
+            System.out.println(string);
+        }
+        stage.setScene(new Scene(new Group(ButtonBuilder.create().text("close").onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                stage.close();
+            }
+
+        }).build())));
+        stage.show();
+        
+    }
+    
+    @Override
+    public void init() throws Exception {
+        super.init();
+        System.out.println("INIT");
+        status.init = now();
+    }
+    
+    @Override
+    public void stop() throws Exception {
+        super.stop();
+        System.out.println("STOP");
+        status.stop = now();
+    }
+
+
+    // reporting utility, we use an interpid assume that there is one test in the VM at one time
+    static class Status {
+        long zero = System.nanoTime();
+
+        long init = -1;
+        long start = -1;
+        long stop = -1;
+
+        Map<String, String> named = null;
+        List<String> unnamed = null;
+        List<String> raw = null;
+    }
+
+    private static long now() {
+        return System.nanoTime() - status.zero;
+    }
+
+    static Status status = null;
+
+    static void reset() {
+        status = new Status();
+    }
+}
--- a/functional/SceneGraphTests/src/test/multitouch/app/MouseEventApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/multitouch/app/MouseEventApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,215 +1,234 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.multitouch.app;
-
-import java.util.HashMap;
-import java.util.Map;
-import javafx.application.Application;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.event.EventType;
-import javafx.geometry.Insets;
-import javafx.scene.Group;
-import javafx.scene.Scene;
-import javafx.scene.control.*;
-import javafx.scene.input.*;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.VBox;
-import javafx.scene.layout.HBox;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
-import javafx.stage.Stage;
-import test.javaclient.shared.InteroperabilityApp;
-import test.javaclient.shared.Utils;
-
-/**
- *
- * @author Taras Ledkov < taras.ledkov@oracle.com >
- */
-public class MouseEventApp extends InteroperabilityApp {
-//public class MouseEventApp extends Application {
-
-    Scene scene;
-    Pane root;
-    CheckBox cbNativeReleased = new CheckBox("MOUSE_RELEASED");
-    CheckBox cbNativePressed = new CheckBox("MOUSE_PRESSED");
-    CheckBox cbNativeClicked = new CheckBox("MOUSE_CLICKED");
-    CheckBox cbNativeEnteredTarget = new CheckBox("MOUSE_ENTERED_TARGET");
-    CheckBox cbNativeEntered = new CheckBox("MOUSE_ENTERED");
-    CheckBox cbNativeExitedTarget = new CheckBox("MOUSE_EXITED_TARGET");
-    CheckBox cbNativeExited = new CheckBox("MOUSE_EXITED");
-    CheckBox cbNativeMoved = new CheckBox("MOUSE_MOVED");
-    CheckBox cbNativeDragged = new CheckBox("MOUSE_DRAGGED");
-    CheckBox cbNativeDragDetected = new CheckBox("DRAG_DETECTED");
-    CheckBox cbSynthesizedPressed = new CheckBox("MOUSE_PRESSED");
-    CheckBox cbSynthesizedReleased = new CheckBox("MOUSE_RELEASED");
-    CheckBox cbSynthesizedClicked = new CheckBox("MOUSE_CLICKED");
-    CheckBox cbSynthesizedEnteredTarget = new CheckBox("MOUSE_ENTERED_TARGET");
-    CheckBox cbSynthesizedEntered = new CheckBox("MOUSE_ENTERED");
-    CheckBox cbSynthesizedExitedTarget = new CheckBox("MOUSE_EXITED_TARGET");
-    CheckBox cbSynthesizedExited = new CheckBox("MOUSE_EXITED");
-    CheckBox cbSynthesizedMoved = new CheckBox("MOUSE_MOVED");
-    CheckBox cbSynthesizedDragged = new CheckBox("MOUSE_DRAGGED");
-    CheckBox cbSynthesizedDragDetected = new CheckBox("DRAG_DETECTED");
-    Map<EventType<MouseEvent>, CheckBox> mapNative = new HashMap<EventType<MouseEvent>, CheckBox>();
-    Map<EventType<MouseEvent>, CheckBox> mapSynthesized = new HashMap<EventType<MouseEvent>, CheckBox>();
-
-    public MouseEventApp() {
-        mapNative.put(MouseEvent.MOUSE_RELEASED, cbNativeReleased);
-        mapNative.put(MouseEvent.MOUSE_PRESSED, cbNativePressed);
-        mapNative.put(MouseEvent.MOUSE_CLICKED, cbNativeClicked);
-        mapNative.put(MouseEvent.MOUSE_ENTERED_TARGET, cbNativeEnteredTarget);
-        mapNative.put(MouseEvent.MOUSE_ENTERED, cbNativeEntered);
-        mapNative.put(MouseEvent.MOUSE_EXITED_TARGET, cbNativeExitedTarget);
-        mapNative.put(MouseEvent.MOUSE_EXITED, cbNativeExited);
-        mapNative.put(MouseEvent.MOUSE_MOVED, cbNativeMoved);
-        mapNative.put(MouseEvent.MOUSE_DRAGGED, cbNativeDragged);
-        mapNative.put(MouseEvent.DRAG_DETECTED, cbNativeDragDetected);
-
-        mapSynthesized.put(MouseEvent.MOUSE_RELEASED, cbSynthesizedReleased);
-        mapSynthesized.put(MouseEvent.MOUSE_PRESSED, cbSynthesizedPressed);
-        mapSynthesized.put(MouseEvent.MOUSE_CLICKED, cbSynthesizedClicked);
-        mapSynthesized.put(MouseEvent.MOUSE_ENTERED_TARGET, cbSynthesizedEnteredTarget);
-        mapSynthesized.put(MouseEvent.MOUSE_ENTERED, cbSynthesizedEntered);
-        mapSynthesized.put(MouseEvent.MOUSE_EXITED_TARGET, cbSynthesizedExitedTarget);
-        mapSynthesized.put(MouseEvent.MOUSE_EXITED, cbSynthesizedExited);
-        mapSynthesized.put(MouseEvent.MOUSE_MOVED, cbSynthesizedMoved);
-        mapSynthesized.put(MouseEvent.MOUSE_DRAGGED, cbSynthesizedDragged);
-        mapSynthesized.put(MouseEvent.DRAG_DETECTED, cbSynthesizedDragDetected);
-        
-        for(CheckBox cb : mapNative.values()) {
-            cb.setDisable(true);
-            cb.setOpacity(0.7);
-        }
-
-        for(CheckBox cb : mapSynthesized.values()) {
-            cb.setDisable(true);
-            cb.setOpacity(1);
-        }
-    }
-
-//    @Override
-//    public void start(Stage stage) throws Exception {
-//        stage.setTitle(this.getClass().getSimpleName());
-//        scene = getScene();
-//        stage.setScene(scene);
-//        stage.show();
-//    }
-
-    @Override
-    protected Scene getScene() {
-
-        root = new Pane();
-        scene = new Scene(root, 600, 400, Color.WHITE);
-
-        final HBox hb = new HBox();
-        final VBox vbMouseNative = new VBox();
-        final VBox vbMouseSynthesized = new VBox();
-
-        vbMouseNative.getChildren().addAll(
-                new Label("Native Events"),
-                cbNativeReleased,
-                cbNativePressed,
-                cbNativeClicked,
-                cbNativeEnteredTarget,
-                cbNativeEntered,
-                cbNativeExitedTarget,
-                cbNativeExited,
-                cbNativeMoved,
-                cbNativeDragged,
-                cbNativeDragDetected);
-
-        vbMouseSynthesized.getChildren().addAll(
-                new Label("Synthesized Events"),
-                cbSynthesizedReleased,
-                cbSynthesizedPressed,
-                cbSynthesizedClicked,
-                cbSynthesizedEnteredTarget,
-                cbSynthesizedEntered,
-                cbSynthesizedExitedTarget,
-                cbSynthesizedExited,
-                cbSynthesizedMoved,
-                cbSynthesizedDragged,
-                cbSynthesizedDragDetected);
-
-        Button endTest = new Button("EndTest");
-        final Label testResult = new Label("");
-
-        hb.getChildren().addAll(
-                vbMouseNative,
-                vbMouseSynthesized,
-                endTest,
-                testResult);
-        root.getChildren().add(hb);
-        hb.setPadding(new Insets(5, 5, 5, 5));
-        hb.setSpacing(5);
-
-        final Group touchableShapesGroup = new Group();
-        root.getChildren().add(touchableShapesGroup);
-
-        Rectangle r = new Rectangle(200, 200, 200, 200);
-        r.setFill(Color.LIGHTGREEN);
-
-        touchableShapesGroup.getChildren().add(r);
-
-        r.addEventHandler(MouseEvent.ANY, new EventHandler<MouseEvent>() {
-
-            public void handle(MouseEvent e) {
-                Map<EventType<MouseEvent>, CheckBox> map = null;
-                if (e.isSynthesized()) {
-                    map = mapSynthesized;
-                } else {
-                    map = mapNative;
-                }
-
-                map.get(e.getEventType()).setSelected(true);
-            }
-        });
-
-        endTest.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if (mapSynthesized.get(MouseEvent.MOUSE_CLICKED).isSelected()
-                        && mapSynthesized.get(MouseEvent.MOUSE_PRESSED).isSelected()
-                        && mapSynthesized.get(MouseEvent.MOUSE_RELEASED).isSelected()
-                        && mapSynthesized.get(MouseEvent.MOUSE_ENTERED).isSelected()
-                        && mapSynthesized.get(MouseEvent.MOUSE_EXITED).isSelected()
-                        && mapSynthesized.get(MouseEvent.MOUSE_DRAGGED).isSelected()
-                        && mapSynthesized.get(MouseEvent.DRAG_DETECTED).isSelected()) {
-                    testResult.setText("Test passed");
-                } else {
-                    testResult.setText("Test failed");
-                }
-            }
-        });
-
-        scene.widthProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                hb.setPrefWidth(scene.getWidth());
-            }
-        });
-
-        scene.heightProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                hb.setPrefHeight(scene.getHeight());
-            }
-        });
-
-        Utils.addBrowser(scene);
-        return scene;
-    }
-
-    public static void main(String[] args) {
-        Utils.launch(MouseEventApp.class, args);
-        //Application.launch(MouseEventApp.class, args);
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.multitouch.app;
+
+import java.util.HashMap;
+import java.util.Map;
+import javafx.application.Application;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.event.EventHandler;
+import javafx.event.EventType;
+import javafx.geometry.Insets;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.VBox;
+import javafx.scene.layout.HBox;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.stage.Stage;
+import test.javaclient.shared.InteroperabilityApp;
+import test.javaclient.shared.Utils;
+
+/**
+ *
+ * @author Taras Ledkov < taras.ledkov@oracle.com >
+ */
+public class MouseEventApp extends InteroperabilityApp {
+//public class MouseEventApp extends Application {
+
+    Scene scene;
+    Pane root;
+    CheckBox cbNativeReleased = new CheckBox("MOUSE_RELEASED");
+    CheckBox cbNativePressed = new CheckBox("MOUSE_PRESSED");
+    CheckBox cbNativeClicked = new CheckBox("MOUSE_CLICKED");
+    CheckBox cbNativeEnteredTarget = new CheckBox("MOUSE_ENTERED_TARGET");
+    CheckBox cbNativeEntered = new CheckBox("MOUSE_ENTERED");
+    CheckBox cbNativeExitedTarget = new CheckBox("MOUSE_EXITED_TARGET");
+    CheckBox cbNativeExited = new CheckBox("MOUSE_EXITED");
+    CheckBox cbNativeMoved = new CheckBox("MOUSE_MOVED");
+    CheckBox cbNativeDragged = new CheckBox("MOUSE_DRAGGED");
+    CheckBox cbNativeDragDetected = new CheckBox("DRAG_DETECTED");
+    CheckBox cbSynthesizedPressed = new CheckBox("MOUSE_PRESSED");
+    CheckBox cbSynthesizedReleased = new CheckBox("MOUSE_RELEASED");
+    CheckBox cbSynthesizedClicked = new CheckBox("MOUSE_CLICKED");
+    CheckBox cbSynthesizedEnteredTarget = new CheckBox("MOUSE_ENTERED_TARGET");
+    CheckBox cbSynthesizedEntered = new CheckBox("MOUSE_ENTERED");
+    CheckBox cbSynthesizedExitedTarget = new CheckBox("MOUSE_EXITED_TARGET");
+    CheckBox cbSynthesizedExited = new CheckBox("MOUSE_EXITED");
+    CheckBox cbSynthesizedMoved = new CheckBox("MOUSE_MOVED");
+    CheckBox cbSynthesizedDragged = new CheckBox("MOUSE_DRAGGED");
+    CheckBox cbSynthesizedDragDetected = new CheckBox("DRAG_DETECTED");
+    Map<EventType<MouseEvent>, CheckBox> mapNative = new HashMap<EventType<MouseEvent>, CheckBox>();
+    Map<EventType<MouseEvent>, CheckBox> mapSynthesized = new HashMap<EventType<MouseEvent>, CheckBox>();
+
+    public MouseEventApp() {
+        mapNative.put(MouseEvent.MOUSE_RELEASED, cbNativeReleased);
+        mapNative.put(MouseEvent.MOUSE_PRESSED, cbNativePressed);
+        mapNative.put(MouseEvent.MOUSE_CLICKED, cbNativeClicked);
+        mapNative.put(MouseEvent.MOUSE_ENTERED_TARGET, cbNativeEnteredTarget);
+        mapNative.put(MouseEvent.MOUSE_ENTERED, cbNativeEntered);
+        mapNative.put(MouseEvent.MOUSE_EXITED_TARGET, cbNativeExitedTarget);
+        mapNative.put(MouseEvent.MOUSE_EXITED, cbNativeExited);
+        mapNative.put(MouseEvent.MOUSE_MOVED, cbNativeMoved);
+        mapNative.put(MouseEvent.MOUSE_DRAGGED, cbNativeDragged);
+        mapNative.put(MouseEvent.DRAG_DETECTED, cbNativeDragDetected);
+
+        mapSynthesized.put(MouseEvent.MOUSE_RELEASED, cbSynthesizedReleased);
+        mapSynthesized.put(MouseEvent.MOUSE_PRESSED, cbSynthesizedPressed);
+        mapSynthesized.put(MouseEvent.MOUSE_CLICKED, cbSynthesizedClicked);
+        mapSynthesized.put(MouseEvent.MOUSE_ENTERED_TARGET, cbSynthesizedEnteredTarget);
+        mapSynthesized.put(MouseEvent.MOUSE_ENTERED, cbSynthesizedEntered);
+        mapSynthesized.put(MouseEvent.MOUSE_EXITED_TARGET, cbSynthesizedExitedTarget);
+        mapSynthesized.put(MouseEvent.MOUSE_EXITED, cbSynthesizedExited);
+        mapSynthesized.put(MouseEvent.MOUSE_MOVED, cbSynthesizedMoved);
+        mapSynthesized.put(MouseEvent.MOUSE_DRAGGED, cbSynthesizedDragged);
+        mapSynthesized.put(MouseEvent.DRAG_DETECTED, cbSynthesizedDragDetected);
+        
+        for(CheckBox cb : mapNative.values()) {
+            cb.setDisable(true);
+            cb.setOpacity(0.7);
+        }
+
+        for(CheckBox cb : mapSynthesized.values()) {
+            cb.setDisable(true);
+            cb.setOpacity(1);
+        }
+    }
+
+//    @Override
+//    public void start(Stage stage) throws Exception {
+//        stage.setTitle(this.getClass().getSimpleName());
+//        scene = getScene();
+//        stage.setScene(scene);
+//        stage.show();
+//    }
+
+    @Override
+    protected Scene getScene() {
+
+        root = new Pane();
+        scene = new Scene(root, 600, 400, Color.WHITE);
+
+        final HBox hb = new HBox();
+        final VBox vbMouseNative = new VBox();
+        final VBox vbMouseSynthesized = new VBox();
+
+        vbMouseNative.getChildren().addAll(
+                new Label("Native Events"),
+                cbNativeReleased,
+                cbNativePressed,
+                cbNativeClicked,
+                cbNativeEnteredTarget,
+                cbNativeEntered,
+                cbNativeExitedTarget,
+                cbNativeExited,
+                cbNativeMoved,
+                cbNativeDragged,
+                cbNativeDragDetected);
+
+        vbMouseSynthesized.getChildren().addAll(
+                new Label("Synthesized Events"),
+                cbSynthesizedReleased,
+                cbSynthesizedPressed,
+                cbSynthesizedClicked,
+                cbSynthesizedEnteredTarget,
+                cbSynthesizedEntered,
+                cbSynthesizedExitedTarget,
+                cbSynthesizedExited,
+                cbSynthesizedMoved,
+                cbSynthesizedDragged,
+                cbSynthesizedDragDetected);
+
+        Button endTest = new Button("EndTest");
+        final Label testResult = new Label("");
+
+        hb.getChildren().addAll(
+                vbMouseNative,
+                vbMouseSynthesized,
+                endTest,
+                testResult);
+        root.getChildren().add(hb);
+        hb.setPadding(new Insets(5, 5, 5, 5));
+        hb.setSpacing(5);
+
+        final Group touchableShapesGroup = new Group();
+        root.getChildren().add(touchableShapesGroup);
+
+        Rectangle r = new Rectangle(200, 200, 200, 200);
+        r.setFill(Color.LIGHTGREEN);
+
+        touchableShapesGroup.getChildren().add(r);
+
+        r.addEventHandler(MouseEvent.ANY, new EventHandler<MouseEvent>() {
+
+            public void handle(MouseEvent e) {
+                Map<EventType<MouseEvent>, CheckBox> map = null;
+                if (e.isSynthesized()) {
+                    map = mapSynthesized;
+                } else {
+                    map = mapNative;
+                }
+
+                map.get(e.getEventType()).setSelected(true);
+            }
+        });
+
+        endTest.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if (mapSynthesized.get(MouseEvent.MOUSE_CLICKED).isSelected()
+                        && mapSynthesized.get(MouseEvent.MOUSE_PRESSED).isSelected()
+                        && mapSynthesized.get(MouseEvent.MOUSE_RELEASED).isSelected()
+                        && mapSynthesized.get(MouseEvent.MOUSE_ENTERED).isSelected()
+                        && mapSynthesized.get(MouseEvent.MOUSE_EXITED).isSelected()
+                        && mapSynthesized.get(MouseEvent.MOUSE_DRAGGED).isSelected()
+                        && mapSynthesized.get(MouseEvent.DRAG_DETECTED).isSelected()) {
+                    testResult.setText("Test passed");
+                } else {
+                    testResult.setText("Test failed");
+                }
+            }
+        });
+
+        scene.widthProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+                hb.setPrefWidth(scene.getWidth());
+            }
+        });
+
+        scene.heightProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+                hb.setPrefHeight(scene.getHeight());
+            }
+        });
+
+        Utils.addBrowser(scene);
+        return scene;
+    }
+
+    public static void main(String[] args) {
+        Utils.launch(MouseEventApp.class, args);
+        //Application.launch(MouseEventApp.class, args);
+    }
+}
--- a/functional/SceneGraphTests/src/test/multitouch/app/MultiTouchApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/multitouch/app/MultiTouchApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,600 +1,618 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-
-package test.multitouch.app;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.scene.Group;
-import javafx.scene.Scene;
-import javafx.scene.control.*;
-import javafx.scene.input.*;
-import javafx.scene.layout.FlowPane;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.VBox;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.*;
-import javafx.scene.text.Font;
-import javafx.scene.text.Text;
-import test.javaclient.shared.InteroperabilityApp;
-import test.javaclient.shared.Utils;
-
-/**
- *
- * @author Taras Ledkov < taras.ledkov@oracle.com >
- */
-//public class MultiTouchApp extends Application {
-public class MultiTouchApp extends InteroperabilityApp {
-
-    private static Random rnd = new Random();
-    TouchPointsMarksScene scene;
-    Pane root;
-    List<Shape> touchableShapes = new ArrayList<Shape>();
-    TextArea log;
-    ChoiceBox cbEventTransport = new ChoiceBox();
-    ToggleButton tbtnDirect = new ToggleButton("Direct");
-    ToggleButton tbtnInertia = new ToggleButton("Inertia");
-    
-    class EventLogger<T extends Event> implements EventHandler<T> {
-
-        ToggleButton btn;
-        TextArea log;
-
-        public EventLogger(TextArea log, ToggleButton btn) {
-            this.log = log;
-            this.btn = btn;
-        }
-
-        @Override
-        public void handle(T e) {
-            if (btn.isSelected()) {
-                double pos = log.getScrollTop();
-                log.insertText(log.getLength(), "\n" + e.toString());
-                log.setScrollTop(pos);
-            }
-        }
-    }
-    
-    class MouseEventLogger<T extends MouseEvent> implements EventHandler<T> {
-
-        ToggleButton btn;
-        TextArea log;
-
-        public MouseEventLogger(TextArea log, ToggleButton btn) {
-            this.log = log;
-            this.btn = btn;
-        }
-
-        @Override
-        public void handle(T e) {
-            if (btn.isSelected()) {
-                String mouseSynthesizedMsg = null;
-                if(e.isSynthesized()) {
-                    mouseSynthesizedMsg = "Synthesized: ";
-                } else {
-                    mouseSynthesizedMsg = "Native: ";
-                }
-                double pos = log.getScrollTop();
-                log.insertText(log.getLength(), "\n" + mouseSynthesizedMsg + e.toString());
-                log.setScrollTop(pos);
-            }
-        }
-    }
-    
-
-//    @Override
-//    public void start(Stage stage) throws Exception {
-//        stage.setTitle(this.getClass().getSimpleName());
-//        scene = (TouchPointsMarksScene) getScene();
-//        stage.setScene(scene);
-//        stage.show();
-//    }
-    @Override
-    protected Scene getScene() {
-        //System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
-
-        root = new Pane();
-        scene = new TouchPointsMarksScene(root, 600, 400, Color.WHITE);
-
-        final VBox vb = new VBox();
-        FlowPane fpEventsLogBtns = new FlowPane();
-
-        Button btnClearScene = new Button("ClearScene");
-        Button btnClearLog = new Button("ClearLog");
-        ToggleButton tbtnScrollStartFinish = new ToggleButton("Log ScrollStart/Finish");
-        ToggleButton tbtnRotateStartFinish = new ToggleButton("Log RotateStart/Finish");
-        ToggleButton tbtnZoomStartFinsh = new ToggleButton("Log ZoomStart/Finish");
-        ToggleButton tbtnTouchPressRelease = new ToggleButton("Log TouchPress/Release");
-        ToggleButton tbtnScroll = new ToggleButton("Log Scroll (!too slow)");
-        ToggleButton tbtnRotate = new ToggleButton("Log Rotate");
-        ToggleButton tbtnZoom = new ToggleButton("Log Zoom");
-        ToggleButton tbtnSwipe = new ToggleButton("Log Swipe");
-        ToggleButton tbtnTouch = new ToggleButton("Log Touch");
-        ToggleButton tbtnMouse = new ToggleButton("Log Mouse");
-
-        fpEventsLogBtns.getChildren().addAll(btnClearScene, btnClearLog,
-                tbtnScrollStartFinish, tbtnRotateStartFinish, tbtnZoomStartFinsh,
-                tbtnTouchPressRelease,
-                tbtnSwipe,
-                tbtnScroll, tbtnRotate, tbtnZoom, tbtnTouch, tbtnMouse);
-        vb.getChildren().add(fpEventsLogBtns);
-
-        FlowPane fpShapes = new FlowPane();
-        Button btnAddArc = new Button("AddArc");
-        Button btnAddCircle = new Button("AddCircle");
-        Button btnAddCubicCurve = new Button("AddCubicCurve ");
-        Button btnAddEllipse = new Button("AddEllipse");
-        Button btnAddLine = new Button("AddLine");
-        Button btnAddPolyline = new Button("AddPolyline");
-        Button btnAddPath = new Button("AddPath");
-        Button btnAddPolygon = new Button("AddPolygon");
-        Button btnAddQuadCurve = new Button("AddQuadCurve");
-        Button btnAddRectangle = new Button("AddRectangle");
-        Button btnAddText = new Button("AddText");
-
-        for (TouchableShapeFactory.EventTransport t : TouchableShapeFactory.EventTransport.values()) {
-            cbEventTransport.getItems().add(t.toString());
-        }
-        cbEventTransport.getSelectionModel().selectFirst();
-
-        fpShapes.getChildren().addAll(cbEventTransport, tbtnDirect, tbtnInertia,
-                btnAddArc, btnAddCubicCurve, btnAddCircle,
-                btnAddEllipse, btnAddLine, btnAddPolyline,
-                btnAddPath, btnAddPolygon, btnAddQuadCurve,
-                btnAddRectangle, btnAddText);
-        
-        vb.getChildren().add(fpShapes);
-
-        log = new TextArea();
-        log.setEditable(false);
-        vb.getChildren().add(log);
-        root.getChildren().add(vb);
-
-        final Group touchableShapesGroup = new Group();
-        root.getChildren().add(touchableShapesGroup);
-
-        btnClearScene.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                touchableShapesGroup.getChildren().clear();
-                scene.clearMarks();
-            }
-        });
-        btnClearLog.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                log.setText("");
-            }
-        });
-
-        btnAddArc.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Arc a = createRandomArc();
-
-                TouchableShapeFactory.makeTouchable(a, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(a);
-                touchableShapesGroup.getChildren().add(a);
-            }
-        });
-
-        btnAddCircle.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Circle c = createRandomCircle();
-
-                TouchableShapeFactory.makeTouchable(c, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(c);
-                touchableShapesGroup.getChildren().add(c);
-            }
-        });
-
-        btnAddCubicCurve.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                CubicCurve c = createRandomCubicCurve();
-
-                TouchableShapeFactory.makeTouchable(c, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(c);
-                touchableShapesGroup.getChildren().add(c);
-            }
-        });
-
-        btnAddEllipse.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Ellipse e = createRandomEllipse();
-
-                TouchableShapeFactory.makeTouchable(e, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(e);
-                touchableShapesGroup.getChildren().add(e);
-            }
-        });
-
-        btnAddLine.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Line l = createRandomLine();
-
-                TouchableShapeFactory.makeTouchable(l, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(l);
-                touchableShapesGroup.getChildren().add(l);
-            }
-        });
-
-        btnAddPath.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Path p = createRandomPath();
-
-                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(p);
-                touchableShapesGroup.getChildren().add(p);
-            }
-        });
-
-        btnAddPolygon.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Polygon p = createRandomPolygon();
-
-                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(p);
-                touchableShapesGroup.getChildren().add(p);
-            }
-        });
-
-        btnAddPolyline.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Polyline p = createRandomPolyline();
-
-                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(p);
-                touchableShapesGroup.getChildren().add(p);
-            }
-        });
-
-        btnAddQuadCurve.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                QuadCurve q = createRandomQuadCurve();
-
-                TouchableShapeFactory.makeTouchable(q, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(q);
-                touchableShapesGroup.getChildren().add(q);
-            }
-        });
-
-        btnAddRectangle.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Rectangle r = createRandomRectangle();
-
-                TouchableShapeFactory.makeTouchable(r, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                touchableShapes.add(r);
-                touchableShapesGroup.getChildren().add(r);
-            }
-        });
-
-        btnAddText.setOnAction(new EventHandler<ActionEvent>() {
-
-            @Override
-            public void handle(ActionEvent t) {
-                Text txt = createText();
-
-                TouchableShapeFactory.makeTouchable(txt, getEventTransportByButttons(), 
-                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
-                txt.setStrokeWidth(1);
-                touchableShapes.add(txt);
-                touchableShapesGroup.getChildren().add(txt);
-            }
-        });
-
-        scene.setOnZoom(new EventLogger<ZoomEvent>(log, tbtnZoom));
-        scene.setOnZoomStarted(new EventLogger<ZoomEvent>(log, tbtnZoomStartFinsh));
-        scene.setOnZoomFinished(new EventLogger<ZoomEvent>(log, tbtnZoomStartFinsh));
-        scene.setOnRotate(new EventLogger<RotateEvent>(log, tbtnRotate));
-        scene.setOnRotationStarted(new EventLogger<RotateEvent>(log, tbtnRotateStartFinish));
-        scene.setOnRotationFinished(new EventLogger<RotateEvent>(log, tbtnRotateStartFinish));
-        scene.setOnScroll(new EventLogger<ScrollEvent>(log, tbtnScroll));
-        scene.setOnScrollStarted(new EventLogger<ScrollEvent>(log, tbtnScrollStartFinish));
-        scene.setOnScrollFinished(new EventLogger<ScrollEvent>(log, tbtnScrollStartFinish));
-        scene.setOnSwipeLeft(new EventLogger<SwipeEvent>(log, tbtnSwipe));
-        scene.setOnSwipeRight(new EventLogger<SwipeEvent>(log, tbtnSwipe));
-        scene.setOnSwipeUp(new EventLogger<SwipeEvent>(log, tbtnSwipe));
-        scene.setOnSwipeDown(new EventLogger<SwipeEvent>(log, tbtnSwipe));
-
-        scene.setOnTouchPressed(new EventLogger<TouchEvent>(log, tbtnTouchPressRelease));
-        scene.setOnTouchReleased(new EventLogger<TouchEvent>(log, tbtnTouchPressRelease));
-        scene.setOnTouchMoved(new EventLogger<TouchEvent>(log, tbtnTouch));
-        scene.setOnTouchStationary(new EventLogger<TouchEvent>(log, tbtnTouch));
-
-        scene.addEventHandler(MouseEvent.ANY, new MouseEventLogger<MouseEvent>(log, tbtnMouse));
-
-        scene.widthProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                vb.setPrefWidth(scene.getWidth());
-            }
-        });
-
-        scene.heightProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                vb.setPrefHeight(scene.getHeight());
-            }
-        });
-
-        Utils.addBrowser(scene);
-        return scene;
-    }
-
-    private TouchableShapeFactory.EventTransport getEventTransportByButttons() {
-        for (TouchableShapeFactory.EventTransport t : TouchableShapeFactory.EventTransport.values()) {
-            if (cbEventTransport.getSelectionModel().isSelected(t.ordinal())) {
-                return t;
-            }
-        }
-        return TouchableShapeFactory.EventTransport.ADD_HANDLER;
-    }
-
-    private Arc createRandomArc() {
-        double centerX = scene.getWidth() * rnd.nextDouble() * 0.9;
-        double centerY = scene.getHeight() * rnd.nextDouble() * 0.9;
-        double radiusX = 20 + rnd.nextDouble() * scene.getWidth() / 5;
-        double radiusY = 20 + rnd.nextDouble() * scene.getHeight() / 5;
-        double startAngle = 20 + rnd.nextDouble() * 360;
-        double len = rnd.nextDouble() * 360;
-        Arc a = new Arc(centerX, centerY, radiusX, radiusY, startAngle, len);
-        a.setType(ArcType.ROUND);
-        System.out.printf("Arc a = new new Arc(%s, %s, %s, %s, %s, %s);\n", centerX, centerY, radiusX, radiusY, startAngle, len);
-        System.out.printf("a.setType(ArcType.ROUND);\n");
-
-        return a;
-    }
-
-    private Circle createRandomCircle() {
-        double centerX = scene.getWidth() * rnd.nextDouble() * 0.9;
-        double centerY = scene.getHeight() * rnd.nextDouble() * 0.9;
-        double radius = 20 + rnd.nextDouble() * scene.getHeight() / 5;
-
-        Circle c = new Circle(centerX, centerY, radius);
-
-        System.out.printf("Circle c = new Circle(%s, %s, %s);\n", centerX, centerY, radius);
-        return c;
-    }
-
-    private CubicCurve createRandomCubicCurve() {
-        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double controlX1 = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double controlY1 = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double controlX2 = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double controlY2 = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-
-        CubicCurve c = new CubicCurve(startX, startY, controlX1, controlY1, controlX2, controlY2, endX, endY);
-        System.out.printf("CubicCurve c = new CubicCurve(%s, %s, %s, %s, %s, %s, %s, %s);\n",
-                startX, startY, controlX1, controlY1, controlX2, controlY2, endX, endY);
-
-        return c;
-    }
-
-    private Ellipse createRandomEllipse() {
-        double centerX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double centerY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double radiusX = (20 + rnd.nextDouble() * scene.getWidth() / 5);
-        double radiusY = (20 + rnd.nextDouble() * scene.getHeight() / 5);
-        Ellipse e = new Ellipse(centerX, centerY, radiusX, radiusY);
-        System.out.printf("Ellipse e = new Ellipse(%s, %s, %s, %s);\n",
-                centerX, centerY, radiusX, radiusY);
-        return e;
-    }
-
-    private Line createRandomLine() {
-        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        Line l = new Line(startX, startY, endX, endY);
-        System.out.printf("Line l = new Line(%s, %s, %s, %s);\n",
-                startX, startY, endX, endY);
-        return l;
-    }
-
-    private Path createRandomPath() {
-        Path p = new Path();
-        System.out.printf("Path p = new Path();\n");
-
-        double moveToX = scene.getWidth() * rnd.nextDouble() * 0.9;
-        double moveToY = scene.getHeight() * rnd.nextDouble() * 0.9;
-
-        p.getElements().add(new MoveTo(moveToX, moveToY));
-        System.out.printf("p.getElements().add(new MoveTo(%s, %s));\n", moveToX, moveToY);
-
-        int nElements = 3 + Math.abs(rnd.nextInt(5));
-        for (int i = 0; i < nElements; ++i) {
-            PathElement pe = null;
-            int pathElementId = Math.abs(rnd.nextInt(5));
-            switch (pathElementId) {
-                case 0: {
-                    double radiusX = 20 + rnd.nextDouble() * scene.getWidth() / 5;
-                    double radiusY = 20 + rnd.nextDouble() * scene.getHeight() / 5;
-                    double xAxRot = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double yAxRot = scene.getHeight() * rnd.nextDouble() * 0.9;
-
-                    pe = new ArcTo(
-                            radiusX,
-                            radiusY,
-                            0,
-                            xAxRot,
-                            yAxRot,
-                            false, false);
-                    System.out.printf("PathElement pe%s = new ArcTo(%s, %s, 0, %s, %s, false, false);\n",
-                            i, radiusX, radiusY, xAxRot, yAxRot);
-                    break;
-                }
-                case 1: {
-                    double x1 = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y1 = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    double x2 = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y2 = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    double x3 = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y3 = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    pe = new CubicCurveTo(x1, y1, x2, y2, x3, y3);
-                    System.out.printf("PathElement pe%s = new CubicCurveTo(%s, %s, %s, %s, %s, %s);\n",
-                            i, x1, y1, x2, y2, x3, y3);
-                    break;
-                }
-                case 2: {
-                    double x = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    pe = new HLineTo(x);
-                    System.out.printf("PathElement pe%s = new HLineTo(%s);\n", i, x);
-                    break;
-                }
-                case 3: {
-                    double x = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    pe = new LineTo(x, y);
-                    System.out.printf("PathElement pe%s = new LineTo(%s, %s);\n", i, x, y);
-                    break;
-                }
-                case 4: {
-                    double x1 = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y1 = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    double x2 = scene.getWidth() * rnd.nextDouble() * 0.9;
-                    double y2 = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    pe = new QuadCurveTo(x1, y1, x2, y2);
-                    System.out.printf("PathElement pe%s = new QuadCurveTo(%s, %s, %s, %s);\n", i, x1, y1, x2, y2);
-                    break;
-                }
-                case 5: {
-                    double y = scene.getHeight() * rnd.nextDouble() * 0.9;
-                    pe = new VLineTo(y);
-                    System.out.printf("PathElement pe%s = new VLineTo(%s);\n", i, y);
-                    break;
-                }
-                default:
-                    continue;
-            }
-            p.getElements().add(pe);
-            System.out.printf("p.getElements().add(pe%s);\n", i);
-        }
-        if (rnd.nextBoolean()) {
-            p.getElements().add(new ClosePath());
-            System.out.printf("p.getElements().add(new ClosePath());\n");
-        }
-        return p;
-    }
-
-    private Polygon createRandomPolygon() {
-        Polygon p = new Polygon();
-        System.out.printf("Polygon p = new Polygon();\n");
-        int nPoints = 3 + Math.abs(rnd.nextInt(5));
-        for (int i = 0; i < nPoints; ++i) {
-            double x = scene.getWidth() * rnd.nextDouble() * 0.9;
-            double y = scene.getHeight() * rnd.nextDouble() * 0.9;
-            p.getPoints().add(x);
-            p.getPoints().add(y);
-            System.out.printf("p.getPoints().add(%s);\n", x);
-            System.out.printf("p.getPoints().add(%s);\n", y);
-        }
-        return p;
-    }
-
-    private Polyline createRandomPolyline() {
-        Polyline p = new Polyline();
-        System.out.printf("Polyline p = new Polyline();\n");
-        int nPoints = 3 + Math.abs(rnd.nextInt(5));
-        for (int i = 0; i < nPoints; ++i) {
-            double x = scene.getWidth() * rnd.nextDouble() * 0.9;
-            double y = scene.getHeight() * rnd.nextDouble() * 0.9;
-            p.getPoints().add(x);
-            p.getPoints().add(y);
-            System.out.printf("p.getPoints().add(%s);\n", x);
-            System.out.printf("p.getPoints().add(%s);\n", y);
-        }
-        return p;
-    }
-
-    private QuadCurve createRandomQuadCurve() {
-        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double controlX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double controlY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
-        QuadCurve q = new QuadCurve(startX, startY, controlX, controlY, endX, endY);
-        System.out.printf("QuadCurve q = new QuadCurve(%s, %s, %s, %s, %s, %s);\n",
-                startX, startY, controlX, controlY, endX, endY);
-        return q;
-    }
-
-    private Rectangle createRandomRectangle() {
-        double width = (20 + rnd.nextDouble() * scene.getWidth() / 5);
-        double height = (20 + rnd.nextDouble() * scene.getHeight() / 5);
-        double x = (scene.getWidth() * rnd.nextDouble() * 0.9);
-        double y = (scene.getHeight() * rnd.nextDouble() * 0.9);
-
-        Rectangle r = new Rectangle(x, y, width, height);
-        System.out.printf("Rectangle r = new Rectangle(%s, %s, %s, %s);\n",
-                x, y, width, height);
-        return r;
-    }
-
-    private Text createText() {
-        Text txt = new Text("JavaFX");
-        txt.setFont(new Font(20));
-        txt.setLayoutX(scene.getWidth() / 2);
-        txt.setLayoutY(scene.getHeight() / 2);
-        txt.setScaleX(5);
-        txt.setScaleY(5);
-        
-        System.out.printf("Text txt = new Text(\"JavaFX\");\n");
-        System.out.printf("txt.setFont(new Font(20));\n");
-        System.out.printf("txt.setLayoutX(%s);\n", scene.getWidth() / 2);
-        System.out.printf("txt.setLayoutY(%s);\n", scene.getHeight() / 2);
-        System.out.printf("txt.setScaleX(5);\n");
-        System.out.printf("txt.setScaleY(5);\n");
-        return txt;
-    }
-
-    public static void main(String[] args) {
-        Utils.launch(MultiTouchApp.class, args);
-        //Application.launch(MultiTouchApp.class, args);
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.multitouch.app;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.event.EventHandler;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.FlowPane;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.VBox;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.*;
+import javafx.scene.text.Font;
+import javafx.scene.text.Text;
+import test.javaclient.shared.InteroperabilityApp;
+import test.javaclient.shared.Utils;
+
+/**
+ *
+ * @author Taras Ledkov < taras.ledkov@oracle.com >
+ */
+//public class MultiTouchApp extends Application {
+public class MultiTouchApp extends InteroperabilityApp {
+
+    private static Random rnd = new Random();
+    TouchPointsMarksScene scene;
+    Pane root;
+    List<Shape> touchableShapes = new ArrayList<Shape>();
+    TextArea log;
+    ChoiceBox cbEventTransport = new ChoiceBox();
+    ToggleButton tbtnDirect = new ToggleButton("Direct");
+    ToggleButton tbtnInertia = new ToggleButton("Inertia");
+    
+    class EventLogger<T extends Event> implements EventHandler<T> {
+
+        ToggleButton btn;
+        TextArea log;
+
+        public EventLogger(TextArea log, ToggleButton btn) {
+            this.log = log;
+            this.btn = btn;
+        }
+
+        @Override
+        public void handle(T e) {
+            if (btn.isSelected()) {
+                double pos = log.getScrollTop();
+                log.insertText(log.getLength(), "\n" + e.toString());
+                log.setScrollTop(pos);
+            }
+        }
+    }
+    
+    class MouseEventLogger<T extends MouseEvent> implements EventHandler<T> {
+
+        ToggleButton btn;
+        TextArea log;
+
+        public MouseEventLogger(TextArea log, ToggleButton btn) {
+            this.log = log;
+            this.btn = btn;
+        }
+
+        @Override
+        public void handle(T e) {
+            if (btn.isSelected()) {
+                String mouseSynthesizedMsg = null;
+                if(e.isSynthesized()) {
+                    mouseSynthesizedMsg = "Synthesized: ";
+                } else {
+                    mouseSynthesizedMsg = "Native: ";
+                }
+                double pos = log.getScrollTop();
+                log.insertText(log.getLength(), "\n" + mouseSynthesizedMsg + e.toString());
+                log.setScrollTop(pos);
+            }
+        }
+    }
+    
+
+//    @Override
+//    public void start(Stage stage) throws Exception {
+//        stage.setTitle(this.getClass().getSimpleName());
+//        scene = (TouchPointsMarksScene) getScene();
+//        stage.setScene(scene);
+//        stage.show();
+//    }
+    @Override
+    protected Scene getScene() {
+        //System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
+
+        root = new Pane();
+        scene = new TouchPointsMarksScene(root, 600, 400, Color.WHITE);
+
+        final VBox vb = new VBox();
+        FlowPane fpEventsLogBtns = new FlowPane();
+
+        Button btnClearScene = new Button("ClearScene");
+        Button btnClearLog = new Button("ClearLog");
+        ToggleButton tbtnScrollStartFinish = new ToggleButton("Log ScrollStart/Finish");
+        ToggleButton tbtnRotateStartFinish = new ToggleButton("Log RotateStart/Finish");
+        ToggleButton tbtnZoomStartFinsh = new ToggleButton("Log ZoomStart/Finish");
+        ToggleButton tbtnTouchPressRelease = new ToggleButton("Log TouchPress/Release");
+        ToggleButton tbtnScroll = new ToggleButton("Log Scroll (!too slow)");
+        ToggleButton tbtnRotate = new ToggleButton("Log Rotate");
+        ToggleButton tbtnZoom = new ToggleButton("Log Zoom");
+        ToggleButton tbtnSwipe = new ToggleButton("Log Swipe");
+        ToggleButton tbtnTouch = new ToggleButton("Log Touch");
+        ToggleButton tbtnMouse = new ToggleButton("Log Mouse");
+
+        fpEventsLogBtns.getChildren().addAll(btnClearScene, btnClearLog,
+                tbtnScrollStartFinish, tbtnRotateStartFinish, tbtnZoomStartFinsh,
+                tbtnTouchPressRelease,
+                tbtnSwipe,
+                tbtnScroll, tbtnRotate, tbtnZoom, tbtnTouch, tbtnMouse);
+        vb.getChildren().add(fpEventsLogBtns);
+
+        FlowPane fpShapes = new FlowPane();
+        Button btnAddArc = new Button("AddArc");
+        Button btnAddCircle = new Button("AddCircle");
+        Button btnAddCubicCurve = new Button("AddCubicCurve ");
+        Button btnAddEllipse = new Button("AddEllipse");
+        Button btnAddLine = new Button("AddLine");
+        Button btnAddPolyline = new Button("AddPolyline");
+        Button btnAddPath = new Button("AddPath");
+        Button btnAddPolygon = new Button("AddPolygon");
+        Button btnAddQuadCurve = new Button("AddQuadCurve");
+        Button btnAddRectangle = new Button("AddRectangle");
+        Button btnAddText = new Button("AddText");
+
+        for (TouchableShapeFactory.EventTransport t : TouchableShapeFactory.EventTransport.values()) {
+            cbEventTransport.getItems().add(t.toString());
+        }
+        cbEventTransport.getSelectionModel().selectFirst();
+
+        fpShapes.getChildren().addAll(cbEventTransport, tbtnDirect, tbtnInertia,
+                btnAddArc, btnAddCubicCurve, btnAddCircle,
+                btnAddEllipse, btnAddLine, btnAddPolyline,
+                btnAddPath, btnAddPolygon, btnAddQuadCurve,
+                btnAddRectangle, btnAddText);
+        
+        vb.getChildren().add(fpShapes);
+
+        log = new TextArea();
+        log.setEditable(false);
+        vb.getChildren().add(log);
+        root.getChildren().add(vb);
+
+        final Group touchableShapesGroup = new Group();
+        root.getChildren().add(touchableShapesGroup);
+
+        btnClearScene.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                touchableShapesGroup.getChildren().clear();
+                scene.clearMarks();
+            }
+        });
+        btnClearLog.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                log.setText("");
+            }
+        });
+
+        btnAddArc.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Arc a = createRandomArc();
+
+                TouchableShapeFactory.makeTouchable(a, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(a);
+                touchableShapesGroup.getChildren().add(a);
+            }
+        });
+
+        btnAddCircle.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Circle c = createRandomCircle();
+
+                TouchableShapeFactory.makeTouchable(c, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(c);
+                touchableShapesGroup.getChildren().add(c);
+            }
+        });
+
+        btnAddCubicCurve.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                CubicCurve c = createRandomCubicCurve();
+
+                TouchableShapeFactory.makeTouchable(c, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(c);
+                touchableShapesGroup.getChildren().add(c);
+            }
+        });
+
+        btnAddEllipse.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Ellipse e = createRandomEllipse();
+
+                TouchableShapeFactory.makeTouchable(e, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(e);
+                touchableShapesGroup.getChildren().add(e);
+            }
+        });
+
+        btnAddLine.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Line l = createRandomLine();
+
+                TouchableShapeFactory.makeTouchable(l, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(l);
+                touchableShapesGroup.getChildren().add(l);
+            }
+        });
+
+        btnAddPath.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Path p = createRandomPath();
+
+                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(p);
+                touchableShapesGroup.getChildren().add(p);
+            }
+        });
+
+        btnAddPolygon.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Polygon p = createRandomPolygon();
+
+                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(p);
+                touchableShapesGroup.getChildren().add(p);
+            }
+        });
+
+        btnAddPolyline.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Polyline p = createRandomPolyline();
+
+                TouchableShapeFactory.makeTouchable(p, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(p);
+                touchableShapesGroup.getChildren().add(p);
+            }
+        });
+
+        btnAddQuadCurve.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                QuadCurve q = createRandomQuadCurve();
+
+                TouchableShapeFactory.makeTouchable(q, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(q);
+                touchableShapesGroup.getChildren().add(q);
+            }
+        });
+
+        btnAddRectangle.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Rectangle r = createRandomRectangle();
+
+                TouchableShapeFactory.makeTouchable(r, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                touchableShapes.add(r);
+                touchableShapesGroup.getChildren().add(r);
+            }
+        });
+
+        btnAddText.setOnAction(new EventHandler<ActionEvent>() {
+
+            @Override
+            public void handle(ActionEvent t) {
+                Text txt = createText();
+
+                TouchableShapeFactory.makeTouchable(txt, getEventTransportByButttons(), 
+                        tbtnDirect.selectedProperty(), tbtnInertia.selectedProperty());
+                txt.setStrokeWidth(1);
+                touchableShapes.add(txt);
+                touchableShapesGroup.getChildren().add(txt);
+            }
+        });
+
+        scene.setOnZoom(new EventLogger<ZoomEvent>(log, tbtnZoom));
+        scene.setOnZoomStarted(new EventLogger<ZoomEvent>(log, tbtnZoomStartFinsh));
+        scene.setOnZoomFinished(new EventLogger<ZoomEvent>(log, tbtnZoomStartFinsh));
+        scene.setOnRotate(new EventLogger<RotateEvent>(log, tbtnRotate));
+        scene.setOnRotationStarted(new EventLogger<RotateEvent>(log, tbtnRotateStartFinish));
+        scene.setOnRotationFinished(new EventLogger<RotateEvent>(log, tbtnRotateStartFinish));
+        scene.setOnScroll(new EventLogger<ScrollEvent>(log, tbtnScroll));
+        scene.setOnScrollStarted(new EventLogger<ScrollEvent>(log, tbtnScrollStartFinish));
+        scene.setOnScrollFinished(new EventLogger<ScrollEvent>(log, tbtnScrollStartFinish));
+        scene.setOnSwipeLeft(new EventLogger<SwipeEvent>(log, tbtnSwipe));
+        scene.setOnSwipeRight(new EventLogger<SwipeEvent>(log, tbtnSwipe));
+        scene.setOnSwipeUp(new EventLogger<SwipeEvent>(log, tbtnSwipe));
+        scene.setOnSwipeDown(new EventLogger<SwipeEvent>(log, tbtnSwipe));
+
+        scene.setOnTouchPressed(new EventLogger<TouchEvent>(log, tbtnTouchPressRelease));
+        scene.setOnTouchReleased(new EventLogger<TouchEvent>(log, tbtnTouchPressRelease));
+        scene.setOnTouchMoved(new EventLogger<TouchEvent>(log, tbtnTouch));
+        scene.setOnTouchStationary(new EventLogger<TouchEvent>(log, tbtnTouch));
+
+        scene.addEventHandler(MouseEvent.ANY, new MouseEventLogger<MouseEvent>(log, tbtnMouse));
+
+        scene.widthProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+                vb.setPrefWidth(scene.getWidth());
+            }
+        });
+
+        scene.heightProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+                vb.setPrefHeight(scene.getHeight());
+            }
+        });
+
+        Utils.addBrowser(scene);
+        return scene;
+    }
+
+    private TouchableShapeFactory.EventTransport getEventTransportByButttons() {
+        for (TouchableShapeFactory.EventTransport t : TouchableShapeFactory.EventTransport.values()) {
+            if (cbEventTransport.getSelectionModel().isSelected(t.ordinal())) {
+                return t;
+            }
+        }
+        return TouchableShapeFactory.EventTransport.ADD_HANDLER;
+    }
+
+    private Arc createRandomArc() {
+        double centerX = scene.getWidth() * rnd.nextDouble() * 0.9;
+        double centerY = scene.getHeight() * rnd.nextDouble() * 0.9;
+        double radiusX = 20 + rnd.nextDouble() * scene.getWidth() / 5;
+        double radiusY = 20 + rnd.nextDouble() * scene.getHeight() / 5;
+        double startAngle = 20 + rnd.nextDouble() * 360;
+        double len = rnd.nextDouble() * 360;
+        Arc a = new Arc(centerX, centerY, radiusX, radiusY, startAngle, len);
+        a.setType(ArcType.ROUND);
+        System.out.printf("Arc a = new new Arc(%s, %s, %s, %s, %s, %s);\n", centerX, centerY, radiusX, radiusY, startAngle, len);
+        System.out.printf("a.setType(ArcType.ROUND);\n");
+
+        return a;
+    }
+
+    private Circle createRandomCircle() {
+        double centerX = scene.getWidth() * rnd.nextDouble() * 0.9;
+        double centerY = scene.getHeight() * rnd.nextDouble() * 0.9;
+        double radius = 20 + rnd.nextDouble() * scene.getHeight() / 5;
+
+        Circle c = new Circle(centerX, centerY, radius);
+
+        System.out.printf("Circle c = new Circle(%s, %s, %s);\n", centerX, centerY, radius);
+        return c;
+    }
+
+    private CubicCurve createRandomCubicCurve() {
+        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double controlX1 = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double controlY1 = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double controlX2 = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double controlY2 = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+
+        CubicCurve c = new CubicCurve(startX, startY, controlX1, controlY1, controlX2, controlY2, endX, endY);
+        System.out.printf("CubicCurve c = new CubicCurve(%s, %s, %s, %s, %s, %s, %s, %s);\n",
+                startX, startY, controlX1, controlY1, controlX2, controlY2, endX, endY);
+
+        return c;
+    }
+
+    private Ellipse createRandomEllipse() {
+        double centerX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double centerY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double radiusX = (20 + rnd.nextDouble() * scene.getWidth() / 5);
+        double radiusY = (20 + rnd.nextDouble() * scene.getHeight() / 5);
+        Ellipse e = new Ellipse(centerX, centerY, radiusX, radiusY);
+        System.out.printf("Ellipse e = new Ellipse(%s, %s, %s, %s);\n",
+                centerX, centerY, radiusX, radiusY);
+        return e;
+    }
+
+    private Line createRandomLine() {
+        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        Line l = new Line(startX, startY, endX, endY);
+        System.out.printf("Line l = new Line(%s, %s, %s, %s);\n",
+                startX, startY, endX, endY);
+        return l;
+    }
+
+    private Path createRandomPath() {
+        Path p = new Path();
+        System.out.printf("Path p = new Path();\n");
+
+        double moveToX = scene.getWidth() * rnd.nextDouble() * 0.9;
+        double moveToY = scene.getHeight() * rnd.nextDouble() * 0.9;
+
+        p.getElements().add(new MoveTo(moveToX, moveToY));
+        System.out.printf("p.getElements().add(new MoveTo(%s, %s));\n", moveToX, moveToY);
+
+        int nElements = 3 + Math.abs(rnd.nextInt(5));
+        for (int i = 0; i < nElements; ++i) {
+            PathElement pe = null;
+            int pathElementId = Math.abs(rnd.nextInt(5));
+            switch (pathElementId) {
+                case 0: {
+                    double radiusX = 20 + rnd.nextDouble() * scene.getWidth() / 5;
+                    double radiusY = 20 + rnd.nextDouble() * scene.getHeight() / 5;
+                    double xAxRot = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double yAxRot = scene.getHeight() * rnd.nextDouble() * 0.9;
+
+                    pe = new ArcTo(
+                            radiusX,
+                            radiusY,
+                            0,
+                            xAxRot,
+                            yAxRot,
+                            false, false);
+                    System.out.printf("PathElement pe%s = new ArcTo(%s, %s, 0, %s, %s, false, false);\n",
+                            i, radiusX, radiusY, xAxRot, yAxRot);
+                    break;
+                }
+                case 1: {
+                    double x1 = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y1 = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    double x2 = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y2 = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    double x3 = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y3 = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    pe = new CubicCurveTo(x1, y1, x2, y2, x3, y3);
+                    System.out.printf("PathElement pe%s = new CubicCurveTo(%s, %s, %s, %s, %s, %s);\n",
+                            i, x1, y1, x2, y2, x3, y3);
+                    break;
+                }
+                case 2: {
+                    double x = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    pe = new HLineTo(x);
+                    System.out.printf("PathElement pe%s = new HLineTo(%s);\n", i, x);
+                    break;
+                }
+                case 3: {
+                    double x = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    pe = new LineTo(x, y);
+                    System.out.printf("PathElement pe%s = new LineTo(%s, %s);\n", i, x, y);
+                    break;
+                }
+                case 4: {
+                    double x1 = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y1 = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    double x2 = scene.getWidth() * rnd.nextDouble() * 0.9;
+                    double y2 = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    pe = new QuadCurveTo(x1, y1, x2, y2);
+                    System.out.printf("PathElement pe%s = new QuadCurveTo(%s, %s, %s, %s);\n", i, x1, y1, x2, y2);
+                    break;
+                }
+                case 5: {
+                    double y = scene.getHeight() * rnd.nextDouble() * 0.9;
+                    pe = new VLineTo(y);
+                    System.out.printf("PathElement pe%s = new VLineTo(%s);\n", i, y);
+                    break;
+                }
+                default:
+                    continue;
+            }
+            p.getElements().add(pe);
+            System.out.printf("p.getElements().add(pe%s);\n", i);
+        }
+        if (rnd.nextBoolean()) {
+            p.getElements().add(new ClosePath());
+            System.out.printf("p.getElements().add(new ClosePath());\n");
+        }
+        return p;
+    }
+
+    private Polygon createRandomPolygon() {
+        Polygon p = new Polygon();
+        System.out.printf("Polygon p = new Polygon();\n");
+        int nPoints = 3 + Math.abs(rnd.nextInt(5));
+        for (int i = 0; i < nPoints; ++i) {
+            double x = scene.getWidth() * rnd.nextDouble() * 0.9;
+            double y = scene.getHeight() * rnd.nextDouble() * 0.9;
+            p.getPoints().add(x);
+            p.getPoints().add(y);
+            System.out.printf("p.getPoints().add(%s);\n", x);
+            System.out.printf("p.getPoints().add(%s);\n", y);
+        }
+        return p;
+    }
+
+    private Polyline createRandomPolyline() {
+        Polyline p = new Polyline();
+        System.out.printf("Polyline p = new Polyline();\n");
+        int nPoints = 3 + Math.abs(rnd.nextInt(5));
+        for (int i = 0; i < nPoints; ++i) {
+            double x = scene.getWidth() * rnd.nextDouble() * 0.9;
+            double y = scene.getHeight() * rnd.nextDouble() * 0.9;
+            p.getPoints().add(x);
+            p.getPoints().add(y);
+            System.out.printf("p.getPoints().add(%s);\n", x);
+            System.out.printf("p.getPoints().add(%s);\n", y);
+        }
+        return p;
+    }
+
+    private QuadCurve createRandomQuadCurve() {
+        double startX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double startY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double controlX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double controlY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        double endX = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double endY = (scene.getHeight() * rnd.nextDouble() * 0.9);
+        QuadCurve q = new QuadCurve(startX, startY, controlX, controlY, endX, endY);
+        System.out.printf("QuadCurve q = new QuadCurve(%s, %s, %s, %s, %s, %s);\n",
+                startX, startY, controlX, controlY, endX, endY);
+        return q;
+    }
+
+    private Rectangle createRandomRectangle() {
+        double width = (20 + rnd.nextDouble() * scene.getWidth() / 5);
+        double height = (20 + rnd.nextDouble() * scene.getHeight() / 5);
+        double x = (scene.getWidth() * rnd.nextDouble() * 0.9);
+        double y = (scene.getHeight() * rnd.nextDouble() * 0.9);
+
+        Rectangle r = new Rectangle(x, y, width, height);
+        System.out.printf("Rectangle r = new Rectangle(%s, %s, %s, %s);\n",
+                x, y, width, height);
+        return r;
+    }
+
+    private Text createText() {
+        Text txt = new Text("JavaFX");
+        txt.setFont(new Font(20));
+        txt.setLayoutX(scene.getWidth() / 2);
+        txt.setLayoutY(scene.getHeight() / 2);
+        txt.setScaleX(5);
+        txt.setScaleY(5);
+        
+        System.out.printf("Text txt = new Text(\"JavaFX\");\n");
+        System.out.printf("txt.setFont(new Font(20));\n");
+        System.out.printf("txt.setLayoutX(%s);\n", scene.getWidth() / 2);
+        System.out.printf("txt.setLayoutY(%s);\n", scene.getHeight() / 2);
+        System.out.printf("txt.setScaleX(5);\n");
+        System.out.printf("txt.setScaleY(5);\n");
+        return txt;
+    }
+
+    public static void main(String[] args) {
+        Utils.launch(MultiTouchApp.class, args);
+        //Application.launch(MultiTouchApp.class, args);
+    }
+}
--- a/functional/SceneGraphTests/src/test/multitouch/app/TouchPointGrabApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/multitouch/app/TouchPointGrabApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,434 +1,453 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.multitouch.app;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javafx.application.Application;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.event.EventTarget;
-import javafx.event.EventType;
-import javafx.geometry.Insets;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-import javafx.scene.control.*;
-import javafx.scene.input.*;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.VBox;
-import javafx.scene.layout.HBox;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
-import javafx.stage.Stage;
-import test.javaclient.shared.InteroperabilityApp;
-import test.javaclient.shared.Utils;
-
-/**
- *
- * @author Taras Ledkov < taras.ledkov@oracle.com >
- */
-public class TouchPointGrabApp extends InteroperabilityApp {
-//public class MouseEventApp extends Application {
-
-    private double rectSize = 150.0;
-    Scene scene;
-    Pane root;
-    Rectangle rectSrc = new Rectangle(rectSize, rectSize);
-    Rectangle rectTarget0 = new Rectangle(rectSize, rectSize);
-    Rectangle rectTarget1 = new Rectangle(rectSize, rectSize);
-    Rectangle rectTarget2 = new Rectangle(rectSize, rectSize);
-    TestTouchEventHandler srcHandler;
-    TestTouchEventHandler target0Handler;
-    TestTouchEventHandler target1Handler;
-    TestTouchEventHandler target2Handler;
-
-    class TouchEventHandlerHistoryItem {
-
-        public Node node;
-        public EventType type;
-        public EventHandler<TouchEvent> handler;
-    }
-    List<TouchEventHandlerHistoryItem> lstEventHandlers = new ArrayList<TouchEventHandlerHistoryItem>();
-
-    class TestTouchEventHandler implements EventHandler<TouchEvent> {
-
-        int firstSetId = -1;
-        int lastSetId = -1;
-        EventType lastEventType = TouchEvent.ANY;
-        EventType firstEventType = TouchEvent.ANY;
-        String tag = "";
-
-        TestTouchEventHandler(String tag) {
-            this.tag = tag;
-        }
-
-        public void handle(TouchEvent e) {
-            if (firstSetId < 0) {
-                firstSetId = e.getEventSetId();
-                firstEventType = e.getEventType();
-            }
-
-            lastSetId = e.getEventSetId();
-            lastEventType = e.getEventType();
-
-            System.out.println(tag + ": " + touchEvent2String(e));
-        }
-
-        EventType getLastEventType() {
-            return lastEventType;
-        }
-
-        EventType getFirstEventType() {
-            return firstEventType;
-        }
-
-        int getFirstSetId() {
-            return firstSetId;
-        }
-
-        int getLastSetId() {
-            return lastSetId;
-        }
-    }
-
-    private static class GrabAllPointsToAfterNEventsHandler implements EventHandler<TouchEvent> {
-
-        int maxEventsCount = 0;
-        int eventsCount = 0;
-        boolean grabbed = false;
-        EventTarget target;
-
-        private GrabAllPointsToAfterNEventsHandler(int maxEventsCount, EventTarget target) {
-            this.maxEventsCount = maxEventsCount;
-            this.target = target;
-        }
-
-        public void handle(TouchEvent e) {
-            if (grabbed) {
-                return;
-            }
-            if (eventsCount >= maxEventsCount) {
-                for (TouchPoint p : e.getTouchPoints()) {
-                    p.grab(target);
-                    grabbed = true;
-                }
-            }
-            ++eventsCount;
-        }
-    }
-
-    private static class UngrabAllPointsAfterNEventsHandler implements EventHandler<TouchEvent> {
-
-        int maxEventsCount = 0;
-        int eventsCount = 0;
-
-        private UngrabAllPointsAfterNEventsHandler(int maxEventsCount) {
-            this.maxEventsCount = maxEventsCount;
-        }
-
-        public void handle(TouchEvent e) {
-            if (eventsCount >= maxEventsCount) {
-                for (TouchPoint p : e.getTouchPoints()) {
-                    p.ungrab();
-                }
-            }
-            ++eventsCount;
-        }
-    }
-
-    private static class UngrabEventsHandler implements EventHandler<TouchEvent> {
-
-        public void handle(TouchEvent e) {
-            for (TouchPoint p : e.getTouchPoints()) {
-                p.ungrab();
-            }
-        }
-    }
-
-//    @Override
-//    public void start(Stage stage) throws Exception {
-//        stage.setTitle(this.getClass().getSimpleName());
-//        scene = getScene();
-//        stage.setScene(scene);
-//        stage.show();
-//    }
-    private static String touchEvent2String(TouchEvent e) {
-        StringBuilder b = new StringBuilder();
-        b.append(e.toString()).append("; TouchPoints = [");
-
-        for (TouchPoint p : e.getTouchPoints()) {
-            b.append("<").append(p.toString()).append(">, ");
-        }
-        b.append("];");
-
-        return b.toString();
-    }
-
-    private void removeAllEventHandler() {
-        for (TouchEventHandlerHistoryItem item : lstEventHandlers) {
-            item.node.removeEventHandler(item.type, item.handler);
-        }
-
-        lstEventHandlers.clear();
-    }
-
-    private void addEventHandler4Node(Node node, EventType type, EventHandler<TouchEvent> handler) {
-        TouchEventHandlerHistoryItem item = new TouchEventHandlerHistoryItem();
-        item.node = node;
-        item.handler = handler;
-        item.type = type;
-
-        node.addEventHandler(type, handler);
-
-        lstEventHandlers.add(item);
-    }
-
-    @Override
-    protected Scene getScene() {
-
-        root = new Pane();
-//        scene = new Scene(root, 600, 400, Color.WHITE);
-        scene = new Scene(root, 600, 400);
-
-        final VBox vbTop = new VBox();
-        HBox hbControls = new HBox();
-        VBox vbTest1 = new VBox();
-        VBox vbTest2 = new VBox();
-        VBox vbTest3 = new VBox();
-        VBox vbTest4 = new VBox();
-
-        Button doTest1 = new Button("Begin");
-        Button endTest1 = new Button("End");
-        final Label resultTest1 = new Label("-");
-        vbTest1.getChildren().addAll(new Label("Test1"), doTest1, endTest1, resultTest1);
-
-        Button doTest2 = new Button("Begin");
-        Button endTest2 = new Button("End");
-        final Label resultTest2 = new Label("-");
-        vbTest2.getChildren().addAll(new Label("Test2"), doTest2, endTest2, resultTest2);
-
-        Button doTest3 = new Button("Begin");
-        Button endTest3 = new Button("End");
-        final Label resultTest3 = new Label("-");
-        vbTest3.getChildren().addAll(new Label("Test3"), doTest3, endTest3, resultTest3);
-
-        Button doTest4 = new Button("Begin");
-        Button endTest4 = new Button("End");
-        final Label resultTest4 = new Label("-");
-        vbTest4.getChildren().addAll(new Label("Test4"), doTest4, endTest4, resultTest4);
-
-        hbControls.getChildren().addAll(vbTest1, vbTest2, vbTest3, vbTest4);
-
-        HBox hbRect12 = new HBox();
-        HBox hbRect34 = new HBox();
-
-        rectSrc.setFill(Color.LIGHTGREEN);
-        rectTarget0.setFill(Color.PINK);
-        rectTarget1.setFill(Color.YELLOW);
-        rectTarget2.setFill(Color.BLACK);
-
-        hbRect12.getChildren().addAll(rectSrc, rectTarget0);
-        hbRect34.getChildren().addAll(rectTarget1, rectTarget2);
-
-        vbTop.getChildren().addAll(hbControls, hbRect12, hbRect34);
-
-        root.getChildren().add(vbTop);
-        vbTop.setPadding(new Insets(5, 5, 5, 5));
-        hbControls.setSpacing(5);
-
-        ////////////////////////////////////////////////////////////////////////
-        // Test 1 (Grab all points after first event)
-        doTest1.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                System.out.println("Test1");
-                removeAllEventHandler();
-                srcHandler = new TestTouchEventHandler("GREEN");
-                target0Handler = new TestTouchEventHandler("PINK");
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY,
-                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
-                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
-            }
-        });
-
-        endTest1.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                removeAllEventHandler();
-
-                if ((srcHandler != null)
-                        && (target0Handler != null)
-                        && (srcHandler.getFirstSetId() == 1)
-                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_PRESSED)
-                        && (target0Handler.getFirstSetId() == 2)
-                        && (target0Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
-                    resultTest1.setText("Test1 passed");
-                } else {
-                    resultTest1.setText("Test1 failed");
-                }
-            }
-        });
-
-        ////////////////////////////////////////////////////////////////////////
-        // Test 2 (Grab sequence)
-        doTest2.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                System.out.println("\nTest2");
-                removeAllEventHandler();
-                srcHandler = new TestTouchEventHandler("GREEN");
-                target0Handler = new TestTouchEventHandler("PINK");
-                target1Handler = new TestTouchEventHandler("YELLOW");
-                target2Handler = new TestTouchEventHandler("BLACK");
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY,
-                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
-                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget1));
-                addEventHandler4Node(rectTarget1, TouchEvent.ANY,
-                        new GrabAllPointsToAfterNEventsHandler(10, rectTarget2));
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
-                addEventHandler4Node(rectTarget1, TouchEvent.ANY, target1Handler);
-                addEventHandler4Node(rectTarget2, TouchEvent.ANY, target2Handler);
-            }
-        });
-
-        endTest2.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                removeAllEventHandler();
-
-                if ((srcHandler != null)
-                        && (target0Handler != null)
-                        && (target1Handler != null)
-                        && (target2Handler != null)
-                        && (srcHandler.getFirstSetId() == 1)
-                        && (target0Handler.getFirstSetId() == 2)
-                        && (target1Handler.getFirstSetId() == 3)
-                        && (target2Handler.getFirstSetId() == 14)
-                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_PRESSED)
-                        && (target0Handler.getLastEventType() != TouchEvent.ANY)
-                        && (target1Handler.getLastEventType() != TouchEvent.ANY)
-                        && (target2Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
-                    resultTest2.setText("Test2 passed");
-                } else {
-                    resultTest2.setText("Test2 failed");
-                }
-            }
-        });
-
-        ////////////////////////////////////////////////////////////////////////
-        // Test 3 (Ungrab after grab)
-        doTest3.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                System.out.println("\nTest3");
-                removeAllEventHandler();
-                srcHandler = new TestTouchEventHandler("GREEN");
-                target0Handler = new TestTouchEventHandler("PINK");
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY,
-                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
-                        new UngrabAllPointsAfterNEventsHandler(2));
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
-            }
-        });
-
-        endTest3.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                removeAllEventHandler();
-
-                if ((srcHandler != null)
-                        && (target0Handler != null)
-                        && (srcHandler.getFirstSetId() == 1)
-                        && (target0Handler.getFirstSetId() == 2)
-                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_RELEASED)
-                        && (target0Handler.getLastEventType() != TouchEvent.ANY)) {
-                    resultTest3.setText("Test3 passed");
-                } else {
-                    resultTest3.setText("Test3 failed");
-                }
-            }
-        });
-
-        ////////////////////////////////////////////////////////////////////////
-        // Test 4 (Ungrab allways)
-        doTest4.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                System.out.println("\nTest4");
-                removeAllEventHandler();
-                srcHandler = new TestTouchEventHandler("GREEN");
-                target0Handler = new TestTouchEventHandler("PINK");
-                target1Handler = new TestTouchEventHandler("YELLOW");
-                target2Handler = new TestTouchEventHandler("BLACK");
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY,
-                        new UngrabEventsHandler());
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
-                        new UngrabEventsHandler());
-                addEventHandler4Node(rectTarget1, TouchEvent.ANY,
-                        new UngrabEventsHandler());
-                addEventHandler4Node(rectTarget2, TouchEvent.ANY,
-                        new UngrabEventsHandler());
-
-                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
-                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
-                addEventHandler4Node(rectTarget1, TouchEvent.ANY, target1Handler);
-                addEventHandler4Node(rectTarget2, TouchEvent.ANY, target2Handler);
-            }
-        });
-
-        endTest4.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                removeAllEventHandler();
-
-                if ((srcHandler != null)
-                        && (target0Handler != null)
-                        && (target1Handler != null)
-                        && (target2Handler != null)
-                        && (srcHandler.getFirstSetId() < srcHandler.getLastSetId())
-                        && (srcHandler.getLastSetId() < target0Handler.getFirstSetId())
-                        && (target0Handler.getFirstSetId() < target0Handler.getLastSetId())
-                        && (target0Handler.getLastSetId() < target2Handler.getFirstSetId())
-                        && (target2Handler.getFirstSetId() < target2Handler.getLastSetId())
-                        && (target2Handler.getLastSetId() < target1Handler.getFirstSetId())
-                        && (target1Handler.getFirstSetId() < target1Handler.getLastSetId())
-                        && (srcHandler.getFirstEventType() == TouchEvent.TOUCH_PRESSED)
-                        && (target0Handler.getFirstEventType() != TouchEvent.ANY)
-                        && (target2Handler.getFirstEventType() != TouchEvent.ANY)
-                        && (target1Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
-                    resultTest4.setText("Test4 passed");
-                } else {
-                    resultTest4.setText("Test4 failed");
-                }
-            }
-        });
-
-        
-        Utils.addBrowser(scene);
-        return scene;
-    }
-
-    public static void main(String[] args) {
-        Utils.launch(TouchPointGrabApp.class, args);
-        //Application.launch(MouseEventApp.class, args);
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.multitouch.app;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javafx.application.Application;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.event.EventHandler;
+import javafx.event.EventTarget;
+import javafx.event.EventType;
+import javafx.geometry.Insets;
+import javafx.scene.Group;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.VBox;
+import javafx.scene.layout.HBox;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.stage.Stage;
+import test.javaclient.shared.InteroperabilityApp;
+import test.javaclient.shared.Utils;
+
+/**
+ *
+ * @author Taras Ledkov < taras.ledkov@oracle.com >
+ */
+public class TouchPointGrabApp extends InteroperabilityApp {
+//public class MouseEventApp extends Application {
+
+    private double rectSize = 150.0;
+    Scene scene;
+    Pane root;
+    Rectangle rectSrc = new Rectangle(rectSize, rectSize);
+    Rectangle rectTarget0 = new Rectangle(rectSize, rectSize);
+    Rectangle rectTarget1 = new Rectangle(rectSize, rectSize);
+    Rectangle rectTarget2 = new Rectangle(rectSize, rectSize);
+    TestTouchEventHandler srcHandler;
+    TestTouchEventHandler target0Handler;
+    TestTouchEventHandler target1Handler;
+    TestTouchEventHandler target2Handler;
+
+    class TouchEventHandlerHistoryItem {
+
+        public Node node;
+        public EventType type;
+        public EventHandler<TouchEvent> handler;
+    }
+    List<TouchEventHandlerHistoryItem> lstEventHandlers = new ArrayList<TouchEventHandlerHistoryItem>();
+
+    class TestTouchEventHandler implements EventHandler<TouchEvent> {
+
+        int firstSetId = -1;
+        int lastSetId = -1;
+        EventType lastEventType = TouchEvent.ANY;
+        EventType firstEventType = TouchEvent.ANY;
+        String tag = "";
+
+        TestTouchEventHandler(String tag) {
+            this.tag = tag;
+        }
+
+        public void handle(TouchEvent e) {
+            if (firstSetId < 0) {
+                firstSetId = e.getEventSetId();
+                firstEventType = e.getEventType();
+            }
+
+            lastSetId = e.getEventSetId();
+            lastEventType = e.getEventType();
+
+            System.out.println(tag + ": " + touchEvent2String(e));
+        }
+
+        EventType getLastEventType() {
+            return lastEventType;
+        }
+
+        EventType getFirstEventType() {
+            return firstEventType;
+        }
+
+        int getFirstSetId() {
+            return firstSetId;
+        }
+
+        int getLastSetId() {
+            return lastSetId;
+        }
+    }
+
+    private static class GrabAllPointsToAfterNEventsHandler implements EventHandler<TouchEvent> {
+
+        int maxEventsCount = 0;
+        int eventsCount = 0;
+        boolean grabbed = false;
+        EventTarget target;
+
+        private GrabAllPointsToAfterNEventsHandler(int maxEventsCount, EventTarget target) {
+            this.maxEventsCount = maxEventsCount;
+            this.target = target;
+        }
+
+        public void handle(TouchEvent e) {
+            if (grabbed) {
+                return;
+            }
+            if (eventsCount >= maxEventsCount) {
+                for (TouchPoint p : e.getTouchPoints()) {
+                    p.grab(target);
+                    grabbed = true;
+                }
+            }
+            ++eventsCount;
+        }
+    }
+
+    private static class UngrabAllPointsAfterNEventsHandler implements EventHandler<TouchEvent> {
+
+        int maxEventsCount = 0;
+        int eventsCount = 0;
+
+        private UngrabAllPointsAfterNEventsHandler(int maxEventsCount) {
+            this.maxEventsCount = maxEventsCount;
+        }
+
+        public void handle(TouchEvent e) {
+            if (eventsCount >= maxEventsCount) {
+                for (TouchPoint p : e.getTouchPoints()) {
+                    p.ungrab();
+                }
+            }
+            ++eventsCount;
+        }
+    }
+
+    private static class UngrabEventsHandler implements EventHandler<TouchEvent> {
+
+        public void handle(TouchEvent e) {
+            for (TouchPoint p : e.getTouchPoints()) {
+                p.ungrab();
+            }
+        }
+    }
+
+//    @Override
+//    public void start(Stage stage) throws Exception {
+//        stage.setTitle(this.getClass().getSimpleName());
+//        scene = getScene();
+//        stage.setScene(scene);
+//        stage.show();
+//    }
+    private static String touchEvent2String(TouchEvent e) {
+        StringBuilder b = new StringBuilder();
+        b.append(e.toString()).append("; TouchPoints = [");
+
+        for (TouchPoint p : e.getTouchPoints()) {
+            b.append("<").append(p.toString()).append(">, ");
+        }
+        b.append("];");
+
+        return b.toString();
+    }
+
+    private void removeAllEventHandler() {
+        for (TouchEventHandlerHistoryItem item : lstEventHandlers) {
+            item.node.removeEventHandler(item.type, item.handler);
+        }
+
+        lstEventHandlers.clear();
+    }
+
+    private void addEventHandler4Node(Node node, EventType type, EventHandler<TouchEvent> handler) {
+        TouchEventHandlerHistoryItem item = new TouchEventHandlerHistoryItem();
+        item.node = node;
+        item.handler = handler;
+        item.type = type;
+
+        node.addEventHandler(type, handler);
+
+        lstEventHandlers.add(item);
+    }
+
+    @Override
+    protected Scene getScene() {
+
+        root = new Pane();
+//        scene = new Scene(root, 600, 400, Color.WHITE);
+        scene = new Scene(root, 600, 400);
+
+        final VBox vbTop = new VBox();
+        HBox hbControls = new HBox();
+        VBox vbTest1 = new VBox();
+        VBox vbTest2 = new VBox();
+        VBox vbTest3 = new VBox();
+        VBox vbTest4 = new VBox();
+
+        Button doTest1 = new Button("Begin");
+        Button endTest1 = new Button("End");
+        final Label resultTest1 = new Label("-");
+        vbTest1.getChildren().addAll(new Label("Test1"), doTest1, endTest1, resultTest1);
+
+        Button doTest2 = new Button("Begin");
+        Button endTest2 = new Button("End");
+        final Label resultTest2 = new Label("-");
+        vbTest2.getChildren().addAll(new Label("Test2"), doTest2, endTest2, resultTest2);
+
+        Button doTest3 = new Button("Begin");
+        Button endTest3 = new Button("End");
+        final Label resultTest3 = new Label("-");
+        vbTest3.getChildren().addAll(new Label("Test3"), doTest3, endTest3, resultTest3);
+
+        Button doTest4 = new Button("Begin");
+        Button endTest4 = new Button("End");
+        final Label resultTest4 = new Label("-");
+        vbTest4.getChildren().addAll(new Label("Test4"), doTest4, endTest4, resultTest4);
+
+        hbControls.getChildren().addAll(vbTest1, vbTest2, vbTest3, vbTest4);
+
+        HBox hbRect12 = new HBox();
+        HBox hbRect34 = new HBox();
+
+        rectSrc.setFill(Color.LIGHTGREEN);
+        rectTarget0.setFill(Color.PINK);
+        rectTarget1.setFill(Color.YELLOW);
+        rectTarget2.setFill(Color.BLACK);
+
+        hbRect12.getChildren().addAll(rectSrc, rectTarget0);
+        hbRect34.getChildren().addAll(rectTarget1, rectTarget2);
+
+        vbTop.getChildren().addAll(hbControls, hbRect12, hbRect34);
+
+        root.getChildren().add(vbTop);
+        vbTop.setPadding(new Insets(5, 5, 5, 5));
+        hbControls.setSpacing(5);
+
+        ////////////////////////////////////////////////////////////////////////
+        // Test 1 (Grab all points after first event)
+        doTest1.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                System.out.println("Test1");
+                removeAllEventHandler();
+                srcHandler = new TestTouchEventHandler("GREEN");
+                target0Handler = new TestTouchEventHandler("PINK");
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY,
+                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
+                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
+            }
+        });
+
+        endTest1.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                removeAllEventHandler();
+
+                if ((srcHandler != null)
+                        && (target0Handler != null)
+                        && (srcHandler.getFirstSetId() == 1)
+                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_PRESSED)
+                        && (target0Handler.getFirstSetId() == 2)
+                        && (target0Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
+                    resultTest1.setText("Test1 passed");
+                } else {
+                    resultTest1.setText("Test1 failed");
+                }
+            }
+        });
+
+        ////////////////////////////////////////////////////////////////////////
+        // Test 2 (Grab sequence)
+        doTest2.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                System.out.println("\nTest2");
+                removeAllEventHandler();
+                srcHandler = new TestTouchEventHandler("GREEN");
+                target0Handler = new TestTouchEventHandler("PINK");
+                target1Handler = new TestTouchEventHandler("YELLOW");
+                target2Handler = new TestTouchEventHandler("BLACK");
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY,
+                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
+                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget1));
+                addEventHandler4Node(rectTarget1, TouchEvent.ANY,
+                        new GrabAllPointsToAfterNEventsHandler(10, rectTarget2));
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
+                addEventHandler4Node(rectTarget1, TouchEvent.ANY, target1Handler);
+                addEventHandler4Node(rectTarget2, TouchEvent.ANY, target2Handler);
+            }
+        });
+
+        endTest2.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                removeAllEventHandler();
+
+                if ((srcHandler != null)
+                        && (target0Handler != null)
+                        && (target1Handler != null)
+                        && (target2Handler != null)
+                        && (srcHandler.getFirstSetId() == 1)
+                        && (target0Handler.getFirstSetId() == 2)
+                        && (target1Handler.getFirstSetId() == 3)
+                        && (target2Handler.getFirstSetId() == 14)
+                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_PRESSED)
+                        && (target0Handler.getLastEventType() != TouchEvent.ANY)
+                        && (target1Handler.getLastEventType() != TouchEvent.ANY)
+                        && (target2Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
+                    resultTest2.setText("Test2 passed");
+                } else {
+                    resultTest2.setText("Test2 failed");
+                }
+            }
+        });
+
+        ////////////////////////////////////////////////////////////////////////
+        // Test 3 (Ungrab after grab)
+        doTest3.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                System.out.println("\nTest3");
+                removeAllEventHandler();
+                srcHandler = new TestTouchEventHandler("GREEN");
+                target0Handler = new TestTouchEventHandler("PINK");
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY,
+                        new GrabAllPointsToAfterNEventsHandler(0, rectTarget0));
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
+                        new UngrabAllPointsAfterNEventsHandler(2));
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
+            }
+        });
+
+        endTest3.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                removeAllEventHandler();
+
+                if ((srcHandler != null)
+                        && (target0Handler != null)
+                        && (srcHandler.getFirstSetId() == 1)
+                        && (target0Handler.getFirstSetId() == 2)
+                        && (srcHandler.getLastEventType() == TouchEvent.TOUCH_RELEASED)
+                        && (target0Handler.getLastEventType() != TouchEvent.ANY)) {
+                    resultTest3.setText("Test3 passed");
+                } else {
+                    resultTest3.setText("Test3 failed");
+                }
+            }
+        });
+
+        ////////////////////////////////////////////////////////////////////////
+        // Test 4 (Ungrab allways)
+        doTest4.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                System.out.println("\nTest4");
+                removeAllEventHandler();
+                srcHandler = new TestTouchEventHandler("GREEN");
+                target0Handler = new TestTouchEventHandler("PINK");
+                target1Handler = new TestTouchEventHandler("YELLOW");
+                target2Handler = new TestTouchEventHandler("BLACK");
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY,
+                        new UngrabEventsHandler());
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY,
+                        new UngrabEventsHandler());
+                addEventHandler4Node(rectTarget1, TouchEvent.ANY,
+                        new UngrabEventsHandler());
+                addEventHandler4Node(rectTarget2, TouchEvent.ANY,
+                        new UngrabEventsHandler());
+
+                addEventHandler4Node(rectSrc, TouchEvent.ANY, srcHandler);
+                addEventHandler4Node(rectTarget0, TouchEvent.ANY, target0Handler);
+                addEventHandler4Node(rectTarget1, TouchEvent.ANY, target1Handler);
+                addEventHandler4Node(rectTarget2, TouchEvent.ANY, target2Handler);
+            }
+        });
+
+        endTest4.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                removeAllEventHandler();
+
+                if ((srcHandler != null)
+                        && (target0Handler != null)
+                        && (target1Handler != null)
+                        && (target2Handler != null)
+                        && (srcHandler.getFirstSetId() < srcHandler.getLastSetId())
+                        && (srcHandler.getLastSetId() < target0Handler.getFirstSetId())
+                        && (target0Handler.getFirstSetId() < target0Handler.getLastSetId())
+                        && (target0Handler.getLastSetId() < target2Handler.getFirstSetId())
+                        && (target2Handler.getFirstSetId() < target2Handler.getLastSetId())
+                        && (target2Handler.getLastSetId() < target1Handler.getFirstSetId())
+                        && (target1Handler.getFirstSetId() < target1Handler.getLastSetId())
+                        && (srcHandler.getFirstEventType() == TouchEvent.TOUCH_PRESSED)
+                        && (target0Handler.getFirstEventType() != TouchEvent.ANY)
+                        && (target2Handler.getFirstEventType() != TouchEvent.ANY)
+                        && (target1Handler.getLastEventType() == TouchEvent.TOUCH_RELEASED)) {
+                    resultTest4.setText("Test4 passed");
+                } else {
+                    resultTest4.setText("Test4 failed");
+                }
+            }
+        });
+
+        
+        Utils.addBrowser(scene);
+        return scene;
+    }
+
+    public static void main(String[] args) {
+        Utils.launch(TouchPointGrabApp.class, args);
+        //Application.launch(MouseEventApp.class, args);
+    }
+}
--- a/functional/SceneGraphTests/src/test/multitouch/app/TouchPointsMarksScene.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/multitouch/app/TouchPointsMarksScene.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,256 +1,275 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.multitouch.app;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javafx.animation.FadeTransition;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.event.EventType;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.Scene;
-import javafx.scene.input.TouchEvent;
-import javafx.scene.input.TouchPoint;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.Paint;
-import javafx.scene.shape.Circle;
-import javafx.scene.shape.Line;
-import javafx.scene.shape.StrokeLineCap;
-import javafx.util.Duration;
-
-/**
- *
- * @author Taras Ledkov < taras.ledkov@oracle.com >
- */
-public class TouchPointsMarksScene extends Scene {
-
-    private final double touchedCircleRadius = 40;
-    private final double touchedCircleStrokeWidth = 7;
-    private final Color pressedColor = Color.RED;
-    private final Color movedColor = Color.GREEN;
-    private final Color stationaryColor = Color.BLUE;
-    private final Color releaseColor = Color.DARKGRAY;
-    private final double fadeDurationMs = 4000;
-    private Group root;
-    private Parent realSceneRoot;
-    Map<Integer, Circle> mapTouch = new HashMap<Integer, Circle>();
-    ArrayList<Line> lines = new ArrayList<Line>();
-    Circle lineCenter = new Circle();
-
-    class NodeEraser implements EventHandler<ActionEvent> {
-
-        private Node n;
-
-        public NodeEraser(Node n) {
-            this.n = n;
-        }
-
-        @Override
-        public void handle(ActionEvent t) {
-            root.getChildren().remove(n);
-        }
-    }
-
-    public TouchPointsMarksScene(Parent parent) {
-        super(new Group(parent));
-        realSceneRoot = parent;
-        init();
-    }
-
-    public TouchPointsMarksScene(Parent parent, double d, double d1) {
-        super(new Group(parent), d, d1);
-        realSceneRoot = parent;
-        init();
-    }
-
-    public TouchPointsMarksScene(Parent parent, Paint paint) {
-        super(new Group(parent), paint);
-        realSceneRoot = parent;
-        init();
-    }
-
-    public TouchPointsMarksScene(Parent parent, double d, double d1, Paint paint) {
-        super(new Group(parent), d, d1, paint);
-        realSceneRoot = parent;
-        init();
-    }
-
-    public TouchPointsMarksScene(Parent parent, double d, double d1, boolean bln) {
-        super(new Group(parent), d, d1, bln);
-        realSceneRoot = parent;
-        init();
-    }
-
-    public void clearMarks() {
-        mapTouch.clear();
-        ArrayList<Node> rm = new ArrayList<Node>();
-        for (Node n : root.getChildren()) {
-            if ((n != realSceneRoot) && (n != lineCenter) && !lines.contains(n)) {
-                rm.add(n);
-            }
-        }
-        root.getChildren().removeAll(rm);
-    }
-    private static int MaxTouchPoints = 100;
-
-    private void init() {
-        root = (Group) getRoot();
-
-        for (int i = 0; i < MaxTouchPoints; ++i) {
-            Line l = new Line();
-            l.setOpacity(0.5);
-            l.setVisible(false);
-            l.setMouseTransparent(true);
-            lines.add(l);
-        }
-
-        lineCenter.setRadius(5);
-        //lineCenter.setOpacity(0.5);
-        lineCenter.setVisible(false);
-        lineCenter.setMouseTransparent(true);
-
-        for(Line l : lines) {
-            root.getChildren().add(l);
-        }
-        root.getChildren().add(lineCenter);
-
-        widthProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-            }
-        });
-
-        heightProperty().addListener(new ChangeListener<Number>() {
-
-            @Override
-            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-            }
-        });
-
-        ////////////////////////////////////////////////////////////
-        /// Raw multitouch
-        addEventHandler(TouchEvent.ANY, new EventHandler<TouchEvent>() {
-
-            @Override
-            public void handle(TouchEvent e) {
-                for (TouchPoint p : e.getTouchPoints()) {
-                    paintTouchedCircle(p);
-                }
-                if (e.getTouchPoints().size() > 1) {
-                    paintLine(e.getTouchPoints());
-                } else {
-                    for (Line l : lines) {
-                        l.setVisible(false);;
-                    }
-                    lineCenter.setVisible(false);
-                }
-            }
-        });
-    }
-
-    private void paintLine(List<TouchPoint> points) {
-        double centerX = 0.0;
-        double centerY = 0.0;
-        for (TouchPoint p : points) {
-            centerX += root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX() / (double) points.size();
-            centerY += root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY() / (double) points.size();
-        }
-        for (int i = 0; i < points.size(); ++i) {
-            lines.get(i).setStartX(centerX);
-            lines.get(i).setStartY(centerY);
-            lines.get(i).setEndX(root.sceneToLocal(points.get(i).getSceneX(), points.get(i).getSceneY()).getX());
-            lines.get(i).setEndY(root.sceneToLocal(points.get(i).getSceneX(), points.get(i).getSceneY()).getY());
-            lines.get(i).setVisible(true);
-        }
-        lineCenter.setCenterX(centerX);
-        lineCenter.setCenterY(centerY);
-        lineCenter.setVisible(true);
-    }
-
-    private void paintTouchedCircle(TouchPoint p) {
-        Circle c = null;
-
-        switch (p.getState()) {
-            case PRESSED:
-                // Create pressed marker witch stay on press point and fade
-                Circle pressedCircle = new Circle(touchedCircleRadius);
-                pressedCircle.setMouseTransparent(true);
-                root.getChildren().add(pressedCircle);
-                pressedCircle.setCenterX(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX());
-                pressedCircle.setCenterY(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY());
-                pressedCircle.setStrokeWidth(touchedCircleStrokeWidth);
-                pressedCircle.setFill(null);
-                pressedCircle.setStrokeLineCap(StrokeLineCap.ROUND);
-                pressedCircle.setStroke(getColorByTouchState(p.getState()));
-
-                FadeTransition ftPressed = new FadeTransition(Duration.millis(fadeDurationMs), pressedCircle);
-                ftPressed.setFromValue(1.0);
-                ftPressed.setToValue(0);
-                ftPressed.setOnFinished(new NodeEraser(pressedCircle));
-                ftPressed.play();
-
-                // Create pressed point 
-                c = mapTouch.get(p.getId());
-                if (c == null) {
-                    c = new Circle(touchedCircleRadius);
-                    c.setMouseTransparent(true);
-                    mapTouch.put(p.getId(), c);
-                    root.getChildren().add(c);
-                }
-                break;
-            case MOVED:
-                c = mapTouch.get(p.getId());
-                break;
-            case STATIONARY:
-                c = mapTouch.get(p.getId());
-                break;
-            case RELEASED:
-                c = mapTouch.get(p.getId());
-                if (c != null) {
-                    mapTouch.remove(p.getId());
-
-                    FadeTransition ftReleased = new FadeTransition(Duration.millis(fadeDurationMs), c);
-                    ftReleased.setFromValue(1.0);
-                    ftReleased.setToValue(0);
-                    ftReleased.setOnFinished(new NodeEraser(c));
-                    ftReleased.play();
-                }
-                break;
-        }
-
-        if (c == null) {
-            return;
-        }
-
-        c.setCenterX(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX());
-        c.setCenterY(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY());
-        c.setStrokeWidth(touchedCircleStrokeWidth);
-        c.setFill(null);
-        c.setStrokeLineCap(StrokeLineCap.ROUND);
-        c.setStroke(getColorByTouchState(p.getState()));
-    }
-
-    private Color getColorByTouchState(TouchPoint.State state) {
-        switch (state) {
-            case PRESSED:
-                return pressedColor;
-            case MOVED:
-                return movedColor;
-            case STATIONARY:
-                return stationaryColor;
-            case RELEASED:
-                return releaseColor;
-        }
-        return null;
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.multitouch.app;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javafx.animation.FadeTransition;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.event.EventType;
+import javafx.scene.Group;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.input.TouchEvent;
+import javafx.scene.input.TouchPoint;
+import javafx.scene.paint.Color;
+import javafx.scene.paint.Paint;
+import javafx.scene.shape.Circle;
+import javafx.scene.shape.Line;
+import javafx.scene.shape.StrokeLineCap;
+import javafx.util.Duration;
+
+/**
+ *
+ * @author Taras Ledkov < taras.ledkov@oracle.com >
+ */
+public class TouchPointsMarksScene extends Scene {
+
+    private final double touchedCircleRadius = 40;
+    private final double touchedCircleStrokeWidth = 7;
+    private final Color pressedColor = Color.RED;
+    private final Color movedColor = Color.GREEN;
+    private final Color stationaryColor = Color.BLUE;
+    private final Color releaseColor = Color.DARKGRAY;
+    private final double fadeDurationMs = 4000;
+    private Group root;
+    private Parent realSceneRoot;
+    Map<Integer, Circle> mapTouch = new HashMap<Integer, Circle>();
+    ArrayList<Line> lines = new ArrayList<Line>();
+    Circle lineCenter = new Circle();
+
+    class NodeEraser implements EventHandler<ActionEvent> {
+
+        private Node n;
+
+        public NodeEraser(Node n) {
+            this.n = n;
+        }
+
+        @Override
+        public void handle(ActionEvent t) {
+            root.getChildren().remove(n);
+        }
+    }
+
+    public TouchPointsMarksScene(Parent parent) {
+        super(new Group(parent));
+        realSceneRoot = parent;
+        init();
+    }
+
+    public TouchPointsMarksScene(Parent parent, double d, double d1) {
+        super(new Group(parent), d, d1);
+        realSceneRoot = parent;
+        init();
+    }
+
+    public TouchPointsMarksScene(Parent parent, Paint paint) {
+        super(new Group(parent), paint);
+        realSceneRoot = parent;
+        init();
+    }
+
+    public TouchPointsMarksScene(Parent parent, double d, double d1, Paint paint) {
+        super(new Group(parent), d, d1, paint);
+        realSceneRoot = parent;
+        init();
+    }
+
+    public TouchPointsMarksScene(Parent parent, double d, double d1, boolean bln) {
+        super(new Group(parent), d, d1, bln);
+        realSceneRoot = parent;
+        init();
+    }
+
+    public void clearMarks() {
+        mapTouch.clear();
+        ArrayList<Node> rm = new ArrayList<Node>();
+        for (Node n : root.getChildren()) {
+            if ((n != realSceneRoot) && (n != lineCenter) && !lines.contains(n)) {
+                rm.add(n);
+            }
+        }
+        root.getChildren().removeAll(rm);
+    }
+    private static int MaxTouchPoints = 100;
+
+    private void init() {
+        root = (Group) getRoot();
+
+        for (int i = 0; i < MaxTouchPoints; ++i) {
+            Line l = new Line();
+            l.setOpacity(0.5);
+            l.setVisible(false);
+            l.setMouseTransparent(true);
+            lines.add(l);
+        }
+
+        lineCenter.setRadius(5);
+        //lineCenter.setOpacity(0.5);
+        lineCenter.setVisible(false);
+        lineCenter.setMouseTransparent(true);
+
+        for(Line l : lines) {
+            root.getChildren().add(l);
+        }
+        root.getChildren().add(lineCenter);
+
+        widthProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+            }
+        });
+
+        heightProperty().addListener(new ChangeListener<Number>() {
+
+            @Override
+            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
+            }
+        });
+
+        ////////////////////////////////////////////////////////////
+        /// Raw multitouch
+        addEventHandler(TouchEvent.ANY, new EventHandler<TouchEvent>() {
+
+            @Override
+            public void handle(TouchEvent e) {
+                for (TouchPoint p : e.getTouchPoints()) {
+                    paintTouchedCircle(p);
+                }
+                if (e.getTouchPoints().size() > 1) {
+                    paintLine(e.getTouchPoints());
+                } else {
+                    for (Line l : lines) {
+                        l.setVisible(false);;
+                    }
+                    lineCenter.setVisible(false);
+                }
+            }
+        });
+    }
+
+    private void paintLine(List<TouchPoint> points) {
+        double centerX = 0.0;
+        double centerY = 0.0;
+        for (TouchPoint p : points) {
+            centerX += root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX() / (double) points.size();
+            centerY += root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY() / (double) points.size();
+        }
+        for (int i = 0; i < points.size(); ++i) {
+            lines.get(i).setStartX(centerX);
+            lines.get(i).setStartY(centerY);
+            lines.get(i).setEndX(root.sceneToLocal(points.get(i).getSceneX(), points.get(i).getSceneY()).getX());
+            lines.get(i).setEndY(root.sceneToLocal(points.get(i).getSceneX(), points.get(i).getSceneY()).getY());
+            lines.get(i).setVisible(true);
+        }
+        lineCenter.setCenterX(centerX);
+        lineCenter.setCenterY(centerY);
+        lineCenter.setVisible(true);
+    }
+
+    private void paintTouchedCircle(TouchPoint p) {
+        Circle c = null;
+
+        switch (p.getState()) {
+            case PRESSED:
+                // Create pressed marker witch stay on press point and fade
+                Circle pressedCircle = new Circle(touchedCircleRadius);
+                pressedCircle.setMouseTransparent(true);
+                root.getChildren().add(pressedCircle);
+                pressedCircle.setCenterX(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX());
+                pressedCircle.setCenterY(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY());
+                pressedCircle.setStrokeWidth(touchedCircleStrokeWidth);
+                pressedCircle.setFill(null);
+                pressedCircle.setStrokeLineCap(StrokeLineCap.ROUND);
+                pressedCircle.setStroke(getColorByTouchState(p.getState()));
+
+                FadeTransition ftPressed = new FadeTransition(Duration.millis(fadeDurationMs), pressedCircle);
+                ftPressed.setFromValue(1.0);
+                ftPressed.setToValue(0);
+                ftPressed.setOnFinished(new NodeEraser(pressedCircle));
+                ftPressed.play();
+
+                // Create pressed point 
+                c = mapTouch.get(p.getId());
+                if (c == null) {
+                    c = new Circle(touchedCircleRadius);
+                    c.setMouseTransparent(true);
+                    mapTouch.put(p.getId(), c);
+                    root.getChildren().add(c);
+                }
+                break;
+            case MOVED:
+                c = mapTouch.get(p.getId());
+                break;
+            case STATIONARY:
+                c = mapTouch.get(p.getId());
+                break;
+            case RELEASED:
+                c = mapTouch.get(p.getId());
+                if (c != null) {
+                    mapTouch.remove(p.getId());
+
+                    FadeTransition ftReleased = new FadeTransition(Duration.millis(fadeDurationMs), c);
+                    ftReleased.setFromValue(1.0);
+                    ftReleased.setToValue(0);
+                    ftReleased.setOnFinished(new NodeEraser(c));
+                    ftReleased.play();
+                }
+                break;
+        }
+
+        if (c == null) {
+            return;
+        }
+
+        c.setCenterX(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getX());
+        c.setCenterY(root.sceneToLocal(p.getSceneX(), p.getSceneY()).getY());
+        c.setStrokeWidth(touchedCircleStrokeWidth);
+        c.setFill(null);
+        c.setStrokeLineCap(StrokeLineCap.ROUND);
+        c.setStroke(getColorByTouchState(p.getState()));
+    }
+
+    private Color getColorByTouchState(TouchPoint.State state) {
+        switch (state) {
+            case PRESSED:
+                return pressedColor;
+            case MOVED:
+                return movedColor;
+            case STATIONARY:
+                return stationaryColor;
+            case RELEASED:
+                return releaseColor;
+        }
+        return null;
+    }
+}
--- a/functional/SceneGraphTests/src/test/multitouch/app/TouchableShapeFactory.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/multitouch/app/TouchableShapeFactory.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,662 +1,680 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-
-package test.multitouch.app;
-
-import javafx.beans.property.ReadOnlyBooleanProperty;
-import javafx.event.EventHandler;
-import javafx.event.EventType;
-import javafx.scene.input.*;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Shape;
-import javafx.scene.shape.StrokeLineCap;
-
-/**
- *
- * @author Taras Ledkov < taras.ledkov@oracle.com >
- */
-public class TouchableShapeFactory {
-
-    public static enum EventTransport {
-
-        ADD_HANDLER, ADD_FILTER, SET_ON_EVENT_HANDLER
-    };
-
-    private static class TouchListener implements EventHandler<KeyEvent> {
-
-        private Shape shape;
-        Color[] colors = new Color[]{Color.GREEN, Color.YELLOW, Color.RED, Color.LIGHTBLUE, Color.BLACK};
-        int curColorFill = 0;
-        int curColorStroke = 0;
-        boolean isZoomed = false;
-        boolean isRotated = false;
-        boolean isScrolled = false;
-        ReadOnlyBooleanProperty isDirect;
-        ReadOnlyBooleanProperty isInertia;
-
-        TouchListener(Shape s, EventTransport et, ReadOnlyBooleanProperty isDirect, ReadOnlyBooleanProperty isInertia) {
-            this.shape = s;
-            this.isDirect = isDirect;
-            this.isInertia = isInertia;
-
-            shape.setStrokeWidth(10);
-            shape.setFill(colors[curColorFill]);
-            shape.setStrokeLineCap(StrokeLineCap.ROUND);
-            shape.setStroke(Color.GREEN);
-            setOpacityByState();
-
-            shape.addEventHandler(KeyEvent.KEY_PRESSED, this);
-
-            switch (et) {
-                case ADD_FILTER:
-                    setListenersUse_addEventFilter();
-                    break;
-                case ADD_HANDLER:
-                    setListenersUse_addEventHandler();
-                    break;
-                case SET_ON_EVENT_HANDLER:
-                    setListenersUse_setEventHandler();
-                    break;
-            }
-        }
-
-        private void setListenersUse_addEventHandler() {
-            shape.addEventHandler(ZoomEvent.ZOOM, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
-                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
-                }
-            });
-
-            shape.addEventHandler(ZoomEvent.ZOOM_STARTED, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventHandler(ZoomEvent.ZOOM_FINISHED, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Rotate gesture
-            shape.addEventHandler(RotateEvent.ROTATE, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    shape.setRotate(shape.getRotate() + e.getAngle());
-                }
-            });
-
-            shape.addEventHandler(RotateEvent.ROTATION_STARTED, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-                    
-                    isRotated = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventHandler(RotateEvent.ROTATION_FINISHED, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isRotated = false;
-                    setOpacityByState();
-                }
-            });
-
-            /// Scroll gesture
-            shape.addEventHandler(ScrollEvent.SCROLL, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    if(!isInertia.get() && e.isInertia()) {
-                        return;
-                    }
-                    
-                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
-                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
-                }
-            });
-
-            shape.addEventHandler(ScrollEvent.SCROLL_STARTED, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventHandler(ScrollEvent.SCROLL_FINISHED, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Swipe gesture
-            shape.addEventHandler(SwipeEvent.SWIPE_DOWN, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    prevColorStroke();
-                }
-            });
-            shape.addEventHandler(SwipeEvent.SWIPE_UP, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    nextColorStroke();
-                }
-            });
-            shape.addEventHandler(SwipeEvent.SWIPE_LEFT, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    prevColorFill();
-                }
-            });
-            shape.addEventHandler(SwipeEvent.SWIPE_RIGHT, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    nextColorFill();
-                }
-            });
-
-            shape.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
-
-                @Override
-                public void handle(MouseEvent e) {
-                    if (e.getClickCount() != 2) {
-                        return;
-                    }
-
-                    if (shape.getFill() == null) {
-                        shape.setFill(colors[curColorFill]);
-                    } else {
-                        shape.setFill(null);
-                    }
-                }
-            });
-        }
-
-        private void setListenersUse_addEventFilter() {
-            shape.addEventFilter(ZoomEvent.ZOOM, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
-                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
-                }
-            });
-
-            shape.addEventFilter(ZoomEvent.ZOOM_STARTED, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventFilter(ZoomEvent.ZOOM_FINISHED, new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Rotate gesture
-            shape.addEventFilter(RotateEvent.ROTATE, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    shape.setRotate(shape.getRotate() + e.getAngle());
-                }
-            });
-
-            shape.addEventFilter(RotateEvent.ROTATION_STARTED, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isRotated = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventFilter(RotateEvent.ROTATION_FINISHED, new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isRotated = false;
-                    setOpacityByState();
-                }
-            });
-
-            /// Scroll gesture
-            shape.addEventFilter(ScrollEvent.SCROLL, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    if(!isInertia.get() && e.isInertia()) {
-                        return;
-                    }
-
-                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
-                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
-                }
-            });
-
-            shape.addEventFilter(ScrollEvent.SCROLL_STARTED, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.addEventFilter(ScrollEvent.SCROLL_FINISHED, new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Swipe gesture
-            shape.addEventFilter(SwipeEvent.SWIPE_DOWN, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    prevColorStroke();
-                }
-            });
-            shape.addEventFilter(SwipeEvent.SWIPE_UP, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    nextColorStroke();
-                }
-            });
-            shape.addEventFilter(SwipeEvent.SWIPE_LEFT, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    prevColorFill();
-                }
-            });
-            shape.addEventFilter(SwipeEvent.SWIPE_RIGHT, new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-                    
-                    nextColorFill();
-                }
-            });
-
-            shape.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
-
-                @Override
-                public void handle(MouseEvent e) {
-                    if (e.getClickCount() != 2) {
-                        return;
-                    }
-
-                    if (shape.getFill() == null) {
-                        shape.setFill(colors[curColorFill]);
-                    } else {
-                        shape.setFill(null);
-                    }
-                }
-            });
-        }
-
-        private void setListenersUse_setEventHandler() {
-            shape.setOnZoom(new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
-                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
-                }
-            });
-
-            shape.setOnZoomStarted(new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.setOnZoomFinished(new EventHandler<ZoomEvent>() {
-
-                @Override
-                public void handle(ZoomEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isZoomed = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Rotate gesture
-            shape.setOnRotate(new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-                    shape.setRotate(shape.getRotate() + e.getAngle());
-                }
-            });
-
-            shape.setOnRotationStarted(new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-                    isRotated = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.setOnRotationFinished(new EventHandler<RotateEvent>() {
-
-                @Override
-                public void handle(RotateEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-                    isRotated = false;
-                    setOpacityByState();
-                }
-            });
-
-            /// Scroll gesture
-            shape.setOnScroll(new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    if(!isInertia.get() && e.isInertia()) {
-                        return;
-                    }
-                        
-                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
-                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
-                }
-            });
-
-            shape.setOnScrollStarted(new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = true;
-                    setOpacityByState();
-                }
-            });
-
-            shape.setOnScrollFinished(new EventHandler<ScrollEvent>() {
-
-                @Override
-                public void handle(ScrollEvent e) {
-                    if(isDirect.get() ^ e.isDirect()) {
-                        return;
-                    }
-
-                    isScrolled = false;
-                    setOpacityByState();
-                }
-            });
-
-            ////////////////////////////////////////////////////////////
-            /// Swipe gesture
-            shape.setOnSwipeDown(new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    prevColorStroke();
-                }
-            });
-            shape.setOnSwipeUp(new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    nextColorStroke();
-                }
-            });
-            shape.setOnSwipeLeft(new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    prevColorFill();
-                }
-            });
-            shape.setOnSwipeRight(new EventHandler<SwipeEvent>() {
-
-                @Override
-                public void handle(SwipeEvent e) {
-                    nextColorFill();
-                }
-            });
-
-            shape.setOnMouseClicked(new EventHandler<MouseEvent>() {
-
-                @Override
-                public void handle(MouseEvent e) {
-                    if (e.getClickCount() != 2) {
-                        return;
-                    }
-
-                    if (shape.getFill() == null) {
-                        shape.setFill(colors[curColorFill]);
-                    } else {
-                        shape.setFill(null);
-                    }
-                }
-            });
-        }
-
-        private void setOpacityByState() {
-            if (isRotated || isZoomed || isScrolled) {
-                shape.setOpacity(1.0);
-            } else {
-                shape.setOpacity(0.5);
-            }
-        }
-
-        private void nextColorFill() {
-            curColorFill += 1;
-            if (curColorFill > colors.length - 1) {
-                curColorFill = 0;
-            }
-            shape.setFill(colors[curColorFill]);
-        }
-
-        private void prevColorFill() {
-            curColorFill -= 1;
-            if (curColorFill < 0) {
-                curColorFill = colors.length - 1;
-            }
-            shape.setFill(colors[curColorFill]);
-        }
-
-        private void nextColorStroke() {
-            curColorStroke += 1;
-            if (curColorStroke > colors.length - 1) {
-                curColorStroke = 0;
-            }
-            shape.setStroke(colors[curColorStroke]);
-        }
-
-        private void prevColorStroke() {
-            curColorStroke -= 1;
-            if (curColorStroke < 0) {
-                curColorStroke = colors.length - 1;
-            }
-            shape.setStroke(colors[curColorStroke]);
-        }
-
-        /**
-         * Dummy event handler
-         */
-        @Override
-        public void handle(KeyEvent t) {
-        }
-    }
-
-    public static <T extends Shape> T makeTouchable(T s, EventTransport et, ReadOnlyBooleanProperty isDirect, ReadOnlyBooleanProperty isInertia) {
-        new TouchListener(s, et, isDirect, isInertia);
-        return s;
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.multitouch.app;
+
+import javafx.beans.property.ReadOnlyBooleanProperty;
+import javafx.event.EventHandler;
+import javafx.event.EventType;
+import javafx.scene.input.*;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Shape;
+import javafx.scene.shape.StrokeLineCap;
+
+/**
+ *
+ * @author Taras Ledkov < taras.ledkov@oracle.com >
+ */
+public class TouchableShapeFactory {
+
+    public static enum EventTransport {
+
+        ADD_HANDLER, ADD_FILTER, SET_ON_EVENT_HANDLER
+    };
+
+    private static class TouchListener implements EventHandler<KeyEvent> {
+
+        private Shape shape;
+        Color[] colors = new Color[]{Color.GREEN, Color.YELLOW, Color.RED, Color.LIGHTBLUE, Color.BLACK};
+        int curColorFill = 0;
+        int curColorStroke = 0;
+        boolean isZoomed = false;
+        boolean isRotated = false;
+        boolean isScrolled = false;
+        ReadOnlyBooleanProperty isDirect;
+        ReadOnlyBooleanProperty isInertia;
+
+        TouchListener(Shape s, EventTransport et, ReadOnlyBooleanProperty isDirect, ReadOnlyBooleanProperty isInertia) {
+            this.shape = s;
+            this.isDirect = isDirect;
+            this.isInertia = isInertia;
+
+            shape.setStrokeWidth(10);
+            shape.setFill(colors[curColorFill]);
+            shape.setStrokeLineCap(StrokeLineCap.ROUND);
+            shape.setStroke(Color.GREEN);
+            setOpacityByState();
+
+            shape.addEventHandler(KeyEvent.KEY_PRESSED, this);
+
+            switch (et) {
+                case ADD_FILTER:
+                    setListenersUse_addEventFilter();
+                    break;
+                case ADD_HANDLER:
+                    setListenersUse_addEventHandler();
+                    break;
+                case SET_ON_EVENT_HANDLER:
+                    setListenersUse_setEventHandler();
+                    break;
+            }
+        }
+
+        private void setListenersUse_addEventHandler() {
+            shape.addEventHandler(ZoomEvent.ZOOM, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
+                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
+                }
+            });
+
+            shape.addEventHandler(ZoomEvent.ZOOM_STARTED, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventHandler(ZoomEvent.ZOOM_FINISHED, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Rotate gesture
+            shape.addEventHandler(RotateEvent.ROTATE, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    shape.setRotate(shape.getRotate() + e.getAngle());
+                }
+            });
+
+            shape.addEventHandler(RotateEvent.ROTATION_STARTED, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+                    
+                    isRotated = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventHandler(RotateEvent.ROTATION_FINISHED, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isRotated = false;
+                    setOpacityByState();
+                }
+            });
+
+            /// Scroll gesture
+            shape.addEventHandler(ScrollEvent.SCROLL, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    if(!isInertia.get() && e.isInertia()) {
+                        return;
+                    }
+                    
+                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
+                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
+                }
+            });
+
+            shape.addEventHandler(ScrollEvent.SCROLL_STARTED, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventHandler(ScrollEvent.SCROLL_FINISHED, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Swipe gesture
+            shape.addEventHandler(SwipeEvent.SWIPE_DOWN, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    prevColorStroke();
+                }
+            });
+            shape.addEventHandler(SwipeEvent.SWIPE_UP, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    nextColorStroke();
+                }
+            });
+            shape.addEventHandler(SwipeEvent.SWIPE_LEFT, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    prevColorFill();
+                }
+            });
+            shape.addEventHandler(SwipeEvent.SWIPE_RIGHT, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    nextColorFill();
+                }
+            });
+
+            shape.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
+
+                @Override
+                public void handle(MouseEvent e) {
+                    if (e.getClickCount() != 2) {
+                        return;
+                    }
+
+                    if (shape.getFill() == null) {
+                        shape.setFill(colors[curColorFill]);
+                    } else {
+                        shape.setFill(null);
+                    }
+                }
+            });
+        }
+
+        private void setListenersUse_addEventFilter() {
+            shape.addEventFilter(ZoomEvent.ZOOM, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
+                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
+                }
+            });
+
+            shape.addEventFilter(ZoomEvent.ZOOM_STARTED, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventFilter(ZoomEvent.ZOOM_FINISHED, new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Rotate gesture
+            shape.addEventFilter(RotateEvent.ROTATE, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    shape.setRotate(shape.getRotate() + e.getAngle());
+                }
+            });
+
+            shape.addEventFilter(RotateEvent.ROTATION_STARTED, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isRotated = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventFilter(RotateEvent.ROTATION_FINISHED, new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isRotated = false;
+                    setOpacityByState();
+                }
+            });
+
+            /// Scroll gesture
+            shape.addEventFilter(ScrollEvent.SCROLL, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    if(!isInertia.get() && e.isInertia()) {
+                        return;
+                    }
+
+                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
+                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
+                }
+            });
+
+            shape.addEventFilter(ScrollEvent.SCROLL_STARTED, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.addEventFilter(ScrollEvent.SCROLL_FINISHED, new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Swipe gesture
+            shape.addEventFilter(SwipeEvent.SWIPE_DOWN, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    prevColorStroke();
+                }
+            });
+            shape.addEventFilter(SwipeEvent.SWIPE_UP, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    nextColorStroke();
+                }
+            });
+            shape.addEventFilter(SwipeEvent.SWIPE_LEFT, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    prevColorFill();
+                }
+            });
+            shape.addEventFilter(SwipeEvent.SWIPE_RIGHT, new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+                    
+                    nextColorFill();
+                }
+            });
+
+            shape.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
+
+                @Override
+                public void handle(MouseEvent e) {
+                    if (e.getClickCount() != 2) {
+                        return;
+                    }
+
+                    if (shape.getFill() == null) {
+                        shape.setFill(colors[curColorFill]);
+                    } else {
+                        shape.setFill(null);
+                    }
+                }
+            });
+        }
+
+        private void setListenersUse_setEventHandler() {
+            shape.setOnZoom(new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    shape.setScaleX(shape.getScaleX() * e.getZoomFactor());
+                    shape.setScaleY(shape.getScaleX() * e.getZoomFactor());
+                }
+            });
+
+            shape.setOnZoomStarted(new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.setOnZoomFinished(new EventHandler<ZoomEvent>() {
+
+                @Override
+                public void handle(ZoomEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isZoomed = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Rotate gesture
+            shape.setOnRotate(new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+                    shape.setRotate(shape.getRotate() + e.getAngle());
+                }
+            });
+
+            shape.setOnRotationStarted(new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+                    isRotated = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.setOnRotationFinished(new EventHandler<RotateEvent>() {
+
+                @Override
+                public void handle(RotateEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+                    isRotated = false;
+                    setOpacityByState();
+                }
+            });
+
+            /// Scroll gesture
+            shape.setOnScroll(new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    if(!isInertia.get() && e.isInertia()) {
+                        return;
+                    }
+                        
+                    shape.setLayoutX(shape.getLayoutX() + e.getDeltaX());
+                    shape.setLayoutY(shape.getLayoutY() + e.getDeltaY());
+                }
+            });
+
+            shape.setOnScrollStarted(new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = true;
+                    setOpacityByState();
+                }
+            });
+
+            shape.setOnScrollFinished(new EventHandler<ScrollEvent>() {
+
+                @Override
+                public void handle(ScrollEvent e) {
+                    if(isDirect.get() ^ e.isDirect()) {
+                        return;
+                    }
+
+                    isScrolled = false;
+                    setOpacityByState();
+                }
+            });
+
+            ////////////////////////////////////////////////////////////
+            /// Swipe gesture
+            shape.setOnSwipeDown(new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    prevColorStroke();
+                }
+            });
+            shape.setOnSwipeUp(new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    nextColorStroke();
+                }
+            });
+            shape.setOnSwipeLeft(new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    prevColorFill();
+                }
+            });
+            shape.setOnSwipeRight(new EventHandler<SwipeEvent>() {
+
+                @Override
+                public void handle(SwipeEvent e) {
+                    nextColorFill();
+                }
+            });
+
+            shape.setOnMouseClicked(new EventHandler<MouseEvent>() {
+
+                @Override
+                public void handle(MouseEvent e) {
+                    if (e.getClickCount() != 2) {
+                        return;
+                    }
+
+                    if (shape.getFill() == null) {
+                        shape.setFill(colors[curColorFill]);
+                    } else {
+                        shape.setFill(null);
+                    }
+                }
+            });
+        }
+
+        private void setOpacityByState() {
+            if (isRotated || isZoomed || isScrolled) {
+                shape.setOpacity(1.0);
+            } else {
+                shape.setOpacity(0.5);
+            }
+        }
+
+        private void nextColorFill() {
+            curColorFill += 1;
+            if (curColorFill > colors.length - 1) {
+                curColorFill = 0;
+            }
+            shape.setFill(colors[curColorFill]);
+        }
+
+        private void prevColorFill() {
+            curColorFill -= 1;
+            if (curColorFill < 0) {
+                curColorFill = colors.length - 1;
+            }
+            shape.setFill(colors[curColorFill]);
+        }
+
+        private void nextColorStroke() {
+            curColorStroke += 1;
+            if (curColorStroke > colors.length - 1) {
+                curColorStroke = 0;
+            }
+            shape.setStroke(colors[curColorStroke]);
+        }
+
+        private void prevColorStroke() {
+            curColorStroke -= 1;
+            if (curColorStroke < 0) {
+                curColorStroke = colors.length - 1;
+            }
+            shape.setStroke(colors[curColorStroke]);
+        }
+
+        /**
+         * Dummy event handler
+         */
+        @Override
+        public void handle(KeyEvent t) {
+        }
+    }
+
+    public static <T extends Shape> T makeTouchable(T s, EventTransport et, ReadOnlyBooleanProperty isDirect, ReadOnlyBooleanProperty isInertia) {
+        new TouchListener(s, et, isDirect, isInertia);
+        return s;
+    }
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/AffineApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/AffineApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,343 +1,368 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.HPos;
-import javafx.geometry.Insets;
-import javafx.geometry.Orientation;
-import javafx.geometry.Point2D;
-import javafx.geometry.Point3D;
-import javafx.geometry.VPos;
-import javafx.scene.DepthTest;
-import javafx.scene.Group;
-import javafx.scene.PerspectiveCamera;
-import javafx.scene.Scene;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.CheckBoxBuilder;
-import javafx.scene.control.ScrollPane;
-import javafx.scene.layout.Border;
-import javafx.scene.layout.BorderStroke;
-import javafx.scene.layout.BorderStrokeStyle;
-import javafx.scene.layout.BorderWidths;
-import javafx.scene.layout.ColumnConstraints;
-import javafx.scene.layout.CornerRadii;
-import javafx.scene.layout.FlowPane;
-import javafx.scene.layout.GridPane;
-import javafx.scene.layout.RowConstraints;
-import javafx.scene.layout.StackPane;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
-import javafx.scene.transform.Affine;
-import javafx.scene.transform.MatrixType;
-import javafx.scene.transform.Rotate;
-import test.javaclient.shared.InteroperabilityApp;
-import test.javaclient.shared.Utils;
-
-/**
- *
- * @author Aleksandr Sakharuk
- */
-public class AffineApp extends InteroperabilityApp
-{
-    
-    public static void main(String[] args)
-    {
-	Utils.launch(AffineApp.class, args);
-    }
-
-    @Override
-    protected Scene getScene() 
-    {
-	return new AffineScene();
-    }
-    
-    private class AffineScene extends Scene
-    {
-	
-	public AffineScene()
-	{
-	    super(new Group(), 800, 600, true);
-	    
-	    regularAffine.setToIdentity();
-	    manualAffine.setToIdentity();
-	    
-	    fxTranformedRectangle.getTransforms().add(regularAffine);
-	    fxTranformedRectangle.setDepthTest(DepthTest.ENABLE);
-	    manualTranformedRectangle.getTransforms().add(manualAffine);
-	    manualTranformedRectangle.setDepthTest(DepthTest.ENABLE);
-	    
-	    fxTransRectPane.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT)));
-	    manualTransRectPane.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT)));
-	    
-	    fxTransRectPane.setId(FX_AFFINE_AREA);
-	    manualTransRectPane.setId(MANUAL_AFFINE_AREA);
-	    
-	    fxTransRectPane.getChildren().add(fxTranformedRectangle);
-	    manualTransRectPane.getChildren().add(manualTranformedRectangle);
-	    
-	    GridPane all = new GridPane();
-	    ScrollPane sp = new ScrollPane();
-	    FlowPane methodsFlow = new FlowPane(Orientation.VERTICAL, 10, 2);
-	    methodsFlow.setPadding(new Insets(5));
-	    sp.setContent(methodsFlow);
-            sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
-	    
-	    ColumnConstraints leftSide = new ColumnConstraints();
-	    leftSide.setPercentWidth(50);
-	    ColumnConstraints rightSide = new ColumnConstraints();
-	    rightSide.setPercentWidth(50);
-	    RowConstraints methods = new RowConstraints();
-	    methods.setPercentHeight(40);
-	    RowConstraints rectangles = new RowConstraints();
-	    rectangles.setPercentHeight(60);
-	    
-	    GridPane.setValignment(fxTransRectPane, VPos.CENTER);
-	    GridPane.setHalignment(fxTransRectPane, HPos.CENTER);
-	    GridPane.setValignment(manualTransRectPane, VPos.CENTER);
-	    GridPane.setHalignment(manualTransRectPane, HPos.CENTER);
-            GridPane.setColumnSpan(sp, 2);
-	    
-	    all.getColumnConstraints().addAll(leftSide, rightSide);
-	    all.getRowConstraints().addAll(methods, rectangles);
-	    
-	    for(CheckBox cb: boxes)
-            {
-                methodsFlow.getChildren().add(cb);
-            }
-	    
-	    all.add(sp, 0, 0);
-	    all.add(fxTransRectPane, 0, 1);
-	    all.add(manualTransRectPane, 1, 1);
-	    
-	    setRoot(all);
-	    setCamera(new PerspectiveCamera());
-            
-            appendTransform.setId(AffineAPI.APPEND_TRANSFORM.name());
-            appendMatrix.setId(AffineAPI.APPEND_D_ARR_MATRIX_TYPE_INT.name());
-	}
-	
-	private Group root;
-	private StackPane fxTransRectPane = new StackPane();
-	private StackPane manualTransRectPane = new StackPane();
-	private Rectangle fxTranformedRectangle = new Rectangle(100, 100);
-	private Rectangle manualTranformedRectangle = new Rectangle(100, 100);
-	private Affine regularAffine = new Affine();
-	private AffineManual manualAffine = new AffineManual();
-	
-	private CheckBox append6d = CheckBoxBuilder.create().text("append(double, double, double, double, double, double)").
-                id(AffineAPI.APPEND_6D.name()).onAction(new EventHandler<ActionEvent>() {
-
-                    public void handle(ActionEvent t) {
-                        if(append6d.isSelected())
-                        {
-                            regularAffine.append(1, 0, 10, 0, 1, 10);
-                            manualAffine.append(1, 0, 10, 0, 1, 10);
-                        }
-                        else
-                        {
-                            regularAffine.append(1, 0, -10, 0, 1, -10);
-                            manualAffine.append(1, 0, -10, 0, 1, -10);
-                        }
-                    }
-                }).build();
-        
-	private CheckBox append12d = CheckBoxBuilder.create().text("append(double, double, double, double, double, double, double, double, double, double, double, double)").
-                id(AffineAPI.APPEND_12D.name()).onAction(new EventHandler<ActionEvent>() {
-
-                    public void handle(ActionEvent t) {
-
-                        double angle = Math.PI / 4;
-                        double sin = Math.sin(angle);
-                        double cos = Math.cos(angle);
-
-                        if(append12d.isSelected())
-                        {
-                            regularAffine.append(cos, sin, 0, 0, 
-                                                 -sin, cos, 0, 0, 
-                                                 0, 0, 1, 0);
-                            manualAffine.append(cos, sin, 0, 0, 
-                                                -sin, cos, 0, 0, 
-                                                0, 0, 1, 0);
-                        }
-                        else
-                        {
-                            regularAffine.append(cos, -sin, 0, 0, 
-                                                 sin, cos, 0, 0, 
-                                                 0, 0, 1, 0);
-                            manualAffine.append(cos, -sin, 0, 0, 
-                                                sin, cos, 0, 0, 
-                                                0, 0, 1, 0);
-                        }
-                    }
-                }).build();
-        
-        private CheckBox appendTransform = CheckBoxBuilder.create().text("append(Transform)").
-                id(AffineAPI.APPEND_TRANSFORM.name()).onAction(new EventHandler<ActionEvent>() {
-
-                    public void handle(ActionEvent t) {
-                        if(appendTransform.isSelected())
-                        {
-                            regularAffine.append(new Rotate(45));
-                            manualAffine.append(new Rotate(45));
-                        }
-                        else
-                        {
-                            regularAffine.append(new Rotate(-45));
-                            manualAffine.append(new Rotate(-45));
-                        }
-                    }
-                }).build();
-        
-        private CheckBox appendMatrix = CheckBoxBuilder.create().text("append(double[], MatrixType, int)").
-                id(AffineAPI.APPEND_D_ARR_MATRIX_TYPE_INT.name()).onAction(new EventHandler<ActionEvent>() {
-
-                    public void handle(ActionEvent t) {
-                        double angle = Math.PI / 4;
-                        double sin = Math.sin(angle);
-                        double cos = Math.cos(angle);
-
-                        double[] forward = {0, 0, cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0};
-                        double[] backward = {0, 0, cos, -sin, 0, 0, sin, cos, 0, 0, 0, 0, 1, 0};
-
-                        if(appendMatrix.isSelected())
-                        {
-                            regularAffine.append(forward, MatrixType.MT_3D_3x4, 2);
-                            manualAffine.append(forward, MatrixType.MT_3D_3x4, 2);
-                        }
-                        else
-                        {
-                            regularAffine.append(backward, MatrixType.MT_3D_3x4, 2);
-                            manualAffine.append(backward, MatrixType.MT_3D_3x4, 2);
-                        }
-                    }
-                }).build();
-        
-        private CheckBox appendRotateD = CheckBoxBuilder.create().text("appendRotate(double)").
-                id(AffineAPI.APPEND_ROTATE_D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotateD.isSelected())
-                {
-                    regularAffine.appendRotation(30);
-                    manualAffine.appendRotation(30);
-                }
-                else
-                {
-                    regularAffine.appendRotation(-30);
-                    manualAffine.appendRotation(-30);
-                }
-            }
-        }).build();
-        
-        private CheckBox appendRotate3D = CheckBoxBuilder.create().text("appendRotate(double, double, double").
-                id(AffineAPI.APPEND_ROTATE_3D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotate3D.isSelected())
-                {
-                    regularAffine.appendRotation(30, 15, 15);
-                    manualAffine.appendRotation(30, 15, 15);
-                }
-                else
-                {
-                    regularAffine.appendRotation(-30, 15, 15);
-                    manualAffine.appendRotation(-30, 15, 15);
-                }
-            }
-        }).build();
-        
-        private CheckBox appendRotateDPoint2D = CheckBoxBuilder.create().text("append(double, Point2D)").
-                id(AffineAPI.APPEND_ROTATE_D_POINT2D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotateDPoint2D.isSelected())
-                {
-                    regularAffine.appendRotation(30, new Point2D(22, 22));
-                    manualAffine.appendRotation(30, new Point2D(22, 22));
-                }
-                else
-                {
-                    regularAffine.appendRotation(-30, new Point2D(22, 22));
-                    manualAffine.appendRotation(-30, new Point2D(22, 22));
-                }
-            }
-        }).build();
-        
-        private CheckBox appendRotate7D = CheckBoxBuilder.create().text("append(double, double, double, double, double, double, double)").
-                id(AffineAPI.APPEND_ROTATE_7D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotate7D.isSelected())
-                {
-                    regularAffine.appendRotation(15, 0, 0, 0, 10, 10, 10);
-                    manualAffine.appendRotation(15, 0, 0, 0, 10, 10, 10);
-                }
-                else
-                {
-                    regularAffine.appendRotation(-15, 0, 0, 0, 10, 10, 10);
-                    manualAffine.appendRotation(-15, 0, 0, 0, 10, 10, 10);
-                }
-            }
-        }).build();
-        
-        private CheckBox appendRotate4DPoint3D = CheckBoxBuilder.create().text("append(double, double, double, double, Point3D)").
-                id(AffineAPI.APPEND_ROTATE_4D_POINT3D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotate4DPoint3D.isSelected())
-                {
-                    regularAffine.appendRotation(15, 0, 0, 0, new Point3D(10, 10, 10));
-                    manualAffine.appendRotation(15, 0, 0, 0, new Point3D(10, 10, 10));
-                }
-                else
-                {
-                    regularAffine.appendRotation(-15, 0, 0, 0, new Point3D(10, 10, 10));
-                    manualAffine.appendRotation(-15, 0, 0, 0, new Point3D(10, 10, 10));
-                }
-            }
-        }).build();
-        
-        private CheckBox appendRotateD2Point3D = CheckBoxBuilder.create().text("append(double, Point3D, Point3D)").
-                id(AffineAPI.APPEND_ROTATE_D_2POINT3D.name()).onAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                if(appendRotateD2Point3D.isSelected())
-                {
-                    regularAffine.appendRotation(15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
-                    manualAffine.appendRotation(15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
-                }
-                else
-                {
-                    regularAffine.appendRotation(-15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
-                    manualAffine.appendRotation(-15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
-                }
-            }
-        }).build();
-        
-        private CheckBox[] boxes = new CheckBox[]{append6d, append12d, appendTransform, appendMatrix, appendRotateD, 
-                appendRotate3D, appendRotateDPoint2D, appendRotate7D, appendRotate4DPoint3D, appendRotateD2Point3D};
-	
-    }
-    
-    public static final String FX_AFFINE_AREA = "fx-affine-area";
-    public static final String MANUAL_AFFINE_AREA = "manual-affine-area";
-    
-    public enum AffineAPI
-    {
-        APPEND_6D,
-        APPEND_12D,
-        APPEND_TRANSFORM,
-        APPEND_D_ARR_MATRIX_TYPE_INT,
-        APPEND_ROTATE_D,
-        APPEND_ROTATE_3D,
-        APPEND_ROTATE_D_POINT2D,
-        APPEND_ROTATE_7D,
-        APPEND_ROTATE_4D_POINT3D,
-        APPEND_ROTATE_D_2POINT3D
-    }
-    
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.scenegraph.app;
+
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.HPos;
+import javafx.geometry.Insets;
+import javafx.geometry.Orientation;
+import javafx.geometry.Point2D;
+import javafx.geometry.Point3D;
+import javafx.geometry.VPos;
+import javafx.scene.DepthTest;
+import javafx.scene.Group;
+import javafx.scene.PerspectiveCamera;
+import javafx.scene.Scene;
+import javafx.scene.control.CheckBox;
+import javafx.scene.control.CheckBoxBuilder;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.layout.Border;
+import javafx.scene.layout.BorderStroke;
+import javafx.scene.layout.BorderStrokeStyle;
+import javafx.scene.layout.BorderWidths;
+import javafx.scene.layout.ColumnConstraints;
+import javafx.scene.layout.CornerRadii;
+import javafx.scene.layout.FlowPane;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.RowConstraints;
+import javafx.scene.layout.StackPane;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.scene.transform.Affine;
+import javafx.scene.transform.MatrixType;
+import javafx.scene.transform.Rotate;
+import test.javaclient.shared.InteroperabilityApp;
+import test.javaclient.shared.Utils;
+
+/**
+ *
+ * @author Aleksandr Sakharuk
+ */
+public class AffineApp extends InteroperabilityApp
+{
+    
+    public static void main(String[] args)
+    {
+	Utils.launch(AffineApp.class, args);
+    }
+
+    @Override
+    protected Scene getScene() 
+    {
+	return new AffineScene();
+    }
+    
+    private class AffineScene extends Scene
+    {
+	
+	public AffineScene()
+	{
+	    super(new Group(), 800, 600, true);
+	    
+	    regularAffine.setToIdentity();
+	    manualAffine.setToIdentity();
+	    
+	    fxTranformedRectangle.getTransforms().add(regularAffine);
+	    fxTranformedRectangle.setDepthTest(DepthTest.ENABLE);
+	    manualTranformedRectangle.getTransforms().add(manualAffine);
+	    manualTranformedRectangle.setDepthTest(DepthTest.ENABLE);
+	    
+	    fxTransRectPane.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT)));
+	    manualTransRectPane.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT)));
+	    
+	    fxTransRectPane.setId(FX_AFFINE_AREA);
+	    manualTransRectPane.setId(MANUAL_AFFINE_AREA);
+	    
+	    fxTransRectPane.getChildren().add(fxTranformedRectangle);
+	    manualTransRectPane.getChildren().add(manualTranformedRectangle);
+	    
+	    GridPane all = new GridPane();
+	    ScrollPane sp = new ScrollPane();
+	    FlowPane methodsFlow = new FlowPane(Orientation.VERTICAL, 10, 2);
+	    methodsFlow.setPadding(new Insets(5));
+	    sp.setContent(methodsFlow);
+            sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
+	    
+	    ColumnConstraints leftSide = new ColumnConstraints();
+	    leftSide.setPercentWidth(50);
+	    ColumnConstraints rightSide = new ColumnConstraints();
+	    rightSide.setPercentWidth(50);
+	    RowConstraints methods = new RowConstraints();
+	    methods.setPercentHeight(40);
+	    RowConstraints rectangles = new RowConstraints();
+	    rectangles.setPercentHeight(60);
+	    
+	    GridPane.setValignment(fxTransRectPane, VPos.CENTER);
+	    GridPane.setHalignment(fxTransRectPane, HPos.CENTER);
+	    GridPane.setValignment(manualTransRectPane, VPos.CENTER);
+	    GridPane.setHalignment(manualTransRectPane, HPos.CENTER);
+            GridPane.setColumnSpan(sp, 2);
+	    
+	    all.getColumnConstraints().addAll(leftSide, rightSide);
+	    all.getRowConstraints().addAll(methods, rectangles);
+	    
+	    for(CheckBox cb: boxes)
+            {
+                methodsFlow.getChildren().add(cb);
+            }
+	    
+	    all.add(sp, 0, 0);
+	    all.add(fxTransRectPane, 0, 1);
+	    all.add(manualTransRectPane, 1, 1);
+	    
+	    setRoot(all);
+	    setCamera(new PerspectiveCamera());
+            
+            appendTransform.setId(AffineAPI.APPEND_TRANSFORM.name());
+            appendMatrix.setId(AffineAPI.APPEND_D_ARR_MATRIX_TYPE_INT.name());
+	}
+	
+	private Group root;
+	private StackPane fxTransRectPane = new StackPane();
+	private StackPane manualTransRectPane = new StackPane();
+	private Rectangle fxTranformedRectangle = new Rectangle(100, 100);
+	private Rectangle manualTranformedRectangle = new Rectangle(100, 100);
+	private Affine regularAffine = new Affine();
+	private AffineManual manualAffine = new AffineManual();
+	
+	private CheckBox append6d = CheckBoxBuilder.create().text("append(double, double, double, double, double, double)").
+                id(AffineAPI.APPEND_6D.name()).onAction(new EventHandler<ActionEvent>() {
+
+                    public void handle(ActionEvent t) {
+                        if(append6d.isSelected())
+                        {
+                            regularAffine.append(1, 0, 10, 0, 1, 10);
+                            manualAffine.append(1, 0, 10, 0, 1, 10);
+                        }
+                        else
+                        {
+                            regularAffine.append(1, 0, -10, 0, 1, -10);
+                            manualAffine.append(1, 0, -10, 0, 1, -10);
+                        }
+                    }
+                }).build();
+        
+	private CheckBox append12d = CheckBoxBuilder.create().text("append(double, double, double, double, double, double, double, double, double, double, double, double)").
+                id(AffineAPI.APPEND_12D.name()).onAction(new EventHandler<ActionEvent>() {
+
+                    public void handle(ActionEvent t) {
+
+                        double angle = Math.PI / 4;
+                        double sin = Math.sin(angle);
+                        double cos = Math.cos(angle);
+
+                        if(append12d.isSelected())
+                        {
+                            regularAffine.append(cos, sin, 0, 0, 
+                                                 -sin, cos, 0, 0, 
+                                                 0, 0, 1, 0);
+                            manualAffine.append(cos, sin, 0, 0, 
+                                                -sin, cos, 0, 0, 
+                                                0, 0, 1, 0);
+                        }
+                        else
+                        {
+                            regularAffine.append(cos, -sin, 0, 0, 
+                                                 sin, cos, 0, 0, 
+                                                 0, 0, 1, 0);
+                            manualAffine.append(cos, -sin, 0, 0, 
+                                                sin, cos, 0, 0, 
+                                                0, 0, 1, 0);
+                        }
+                    }
+                }).build();
+        
+        private CheckBox appendTransform = CheckBoxBuilder.create().text("append(Transform)").
+                id(AffineAPI.APPEND_TRANSFORM.name()).onAction(new EventHandler<ActionEvent>() {
+
+                    public void handle(ActionEvent t) {
+                        if(appendTransform.isSelected())
+                        {
+                            regularAffine.append(new Rotate(45));
+                            manualAffine.append(new Rotate(45));
+                        }
+                        else
+                        {
+                            regularAffine.append(new Rotate(-45));
+                            manualAffine.append(new Rotate(-45));
+                        }
+                    }
+                }).build();
+        
+        private CheckBox appendMatrix = CheckBoxBuilder.create().text("append(double[], MatrixType, int)").
+                id(AffineAPI.APPEND_D_ARR_MATRIX_TYPE_INT.name()).onAction(new EventHandler<ActionEvent>() {
+
+                    public void handle(ActionEvent t) {
+                        double angle = Math.PI / 4;
+                        double sin = Math.sin(angle);
+                        double cos = Math.cos(angle);
+
+                        double[] forward = {0, 0, cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0};
+                        double[] backward = {0, 0, cos, -sin, 0, 0, sin, cos, 0, 0, 0, 0, 1, 0};
+
+                        if(appendMatrix.isSelected())
+                        {
+                            regularAffine.append(forward, MatrixType.MT_3D_3x4, 2);
+                            manualAffine.append(forward, MatrixType.MT_3D_3x4, 2);
+                        }
+                        else
+                        {
+                            regularAffine.append(backward, MatrixType.MT_3D_3x4, 2);
+                            manualAffine.append(backward, MatrixType.MT_3D_3x4, 2);
+                        }
+                    }
+                }).build();
+        
+        private CheckBox appendRotateD = CheckBoxBuilder.create().text("appendRotate(double)").
+                id(AffineAPI.APPEND_ROTATE_D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotateD.isSelected())
+                {
+                    regularAffine.appendRotation(30);
+                    manualAffine.appendRotation(30);
+                }
+                else
+                {
+                    regularAffine.appendRotation(-30);
+                    manualAffine.appendRotation(-30);
+                }
+            }
+        }).build();
+        
+        private CheckBox appendRotate3D = CheckBoxBuilder.create().text("appendRotate(double, double, double").
+                id(AffineAPI.APPEND_ROTATE_3D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotate3D.isSelected())
+                {
+                    regularAffine.appendRotation(30, 15, 15);
+                    manualAffine.appendRotation(30, 15, 15);
+                }
+                else
+                {
+                    regularAffine.appendRotation(-30, 15, 15);
+                    manualAffine.appendRotation(-30, 15, 15);
+                }
+            }
+        }).build();
+        
+        private CheckBox appendRotateDPoint2D = CheckBoxBuilder.create().text("append(double, Point2D)").
+                id(AffineAPI.APPEND_ROTATE_D_POINT2D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotateDPoint2D.isSelected())
+                {
+                    regularAffine.appendRotation(30, new Point2D(22, 22));
+                    manualAffine.appendRotation(30, new Point2D(22, 22));
+                }
+                else
+                {
+                    regularAffine.appendRotation(-30, new Point2D(22, 22));
+                    manualAffine.appendRotation(-30, new Point2D(22, 22));
+                }
+            }
+        }).build();
+        
+        private CheckBox appendRotate7D = CheckBoxBuilder.create().text("append(double, double, double, double, double, double, double)").
+                id(AffineAPI.APPEND_ROTATE_7D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotate7D.isSelected())
+                {
+                    regularAffine.appendRotation(15, 0, 0, 0, 10, 10, 10);
+                    manualAffine.appendRotation(15, 0, 0, 0, 10, 10, 10);
+                }
+                else
+                {
+                    regularAffine.appendRotation(-15, 0, 0, 0, 10, 10, 10);
+                    manualAffine.appendRotation(-15, 0, 0, 0, 10, 10, 10);
+                }
+            }
+        }).build();
+        
+        private CheckBox appendRotate4DPoint3D = CheckBoxBuilder.create().text("append(double, double, double, double, Point3D)").
+                id(AffineAPI.APPEND_ROTATE_4D_POINT3D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotate4DPoint3D.isSelected())
+                {
+                    regularAffine.appendRotation(15, 0, 0, 0, new Point3D(10, 10, 10));
+                    manualAffine.appendRotation(15, 0, 0, 0, new Point3D(10, 10, 10));
+                }
+                else
+                {
+                    regularAffine.appendRotation(-15, 0, 0, 0, new Point3D(10, 10, 10));
+                    manualAffine.appendRotation(-15, 0, 0, 0, new Point3D(10, 10, 10));
+                }
+            }
+        }).build();
+        
+        private CheckBox appendRotateD2Point3D = CheckBoxBuilder.create().text("append(double, Point3D, Point3D)").
+                id(AffineAPI.APPEND_ROTATE_D_2POINT3D.name()).onAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                if(appendRotateD2Point3D.isSelected())
+                {
+                    regularAffine.appendRotation(15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
+                    manualAffine.appendRotation(15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
+                }
+                else
+                {
+                    regularAffine.appendRotation(-15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
+                    manualAffine.appendRotation(-15, new Point3D(0, 0, 0), new Point3D(10, 10, 10));
+                }
+            }
+        }).build();
+        
+        private CheckBox[] boxes = new CheckBox[]{append6d, append12d, appendTransform, appendMatrix, appendRotateD, 
+                appendRotate3D, appendRotateDPoint2D, appendRotate7D, appendRotate4DPoint3D, appendRotateD2Point3D};
+	
+    }
+    
+    public static final String FX_AFFINE_AREA = "fx-affine-area";
+    public static final String MANUAL_AFFINE_AREA = "manual-affine-area";
+    
+    public enum AffineAPI
+    {
+        APPEND_6D,
+        APPEND_12D,
+        APPEND_TRANSFORM,
+        APPEND_D_ARR_MATRIX_TYPE_INT,
+        APPEND_ROTATE_D,
+        APPEND_ROTATE_3D,
+        APPEND_ROTATE_D_POINT2D,
+        APPEND_ROTATE_7D,
+        APPEND_ROTATE_4D_POINT3D,
+        APPEND_ROTATE_D_2POINT3D,
+        APPEND_SCALE_2D,
+        APPEND_SCALE_3D,
+        APPEND_SCALE_4D,
+        APPEND_SCALE_6D,
+        APPEND_SCALE_3D_POINT3D,
+        APPEND_SCALE_2D_POINT2D
+    }
+    
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/AffineManual.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/AffineManual.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,156 +1,175 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import javafx.geometry.Point2D;
-import javafx.geometry.Point3D;
-import javafx.scene.transform.Affine;
-import javafx.scene.transform.MatrixType;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Transform;
-
-/**
- * All overloaded methods do the same as in {@link Affine} but with it's own implementation.
- *
- * @author Aleksandr Sakharuk
- */
-public class AffineManual extends Affine
-{
-    
-    /**
-     * The same as {@link Affine#append(double mxx, double mxy, double tx, double myx, double myy, double ty)}
-     */
-    @Override
-    public void append(double mxx, double mxy, double tx, double myx, double myy, double ty)
-    {
-	setMxx(getMxx() * mxx + getMxy() * myx);
-	setMxy(getMxx() * mxy + getMxy() * myy);
-	setMxz(getMxz());
-	setTx(getMxx() * tx + getMxy() * ty + getTx());
-	
-	setMyx(getMyx() * mxx + getMyy() * myx);
-	setMyy(getMyx() * mxy + getMyy() * myy);
-	setMyz(getMyz());
-	setTy(getMyx() * tx + getMyy() * ty + getTy());
-	
-	setMzx(getMzx() * mxx + getMzy() * myx);
-	setMzy(getMzx() * mxy + getMzy() * myy);
-	setMzz(getMzz());
-	setTz(getMzx() * tx + getMzy() * ty + getTz());
-    }
-    
-    /**
-     * The same as {@link Affine#append(double mxx, double mxy, double mxz, double tx, double myx, 
-	    double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)}
-     */
-    @Override
-    public void append(double mxx, double mxy, double mxz, double tx, double myx, 
-	    double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
-    {
-	double xx = getMxx() * mxx + getMxy() * myx + getMxz() * mzx;
-	double xy = getMxx() * mxy + getMxy() * myy + getMxz() * mzy;
-	double xz = getMxx() * mxz + getMxy() * myz + getMxz() * mzz;
-	double trX = getMxx() * tx + getMxy() * ty + getMxz() * tz + getTx();
-	
-	double yx = getMyx() * mxx + getMyy() * myx + getMyz() * mzx;
-	double yy = getMyx() * mxy + getMyy() * myy + getMyz() * mzy;
-	double yz = getMyx() * mxz + getMyy() * myz + getMyz() * mzz;
-	double trY = getMyx() * tx + getMyy() * ty + getMyz() * tz + getTy();
-	
-	double zx = getMzx() * mxx + getMzy() * myx + getMzz() * mzx;
-	double zy = getMzx() * mxy + getMzy() * myy + getMzz() * mzy;
-	double zz = getMzx() * mxz + getMzy() * myz + getMzz() * mzz;
-	double trZ = getMzx() * tx + getMzy() * ty + getMzz() * tz + getTz();
-        
-        setMxx(xx);
-        setMxy(xy);
-        setMxz(xz);
-        setTx(trX);
-        
-        setMyx(yx);
-        setMyy(yy);
-        setMyz(yz);
-        setTy(trY);
-        
-        setMzx(zx);
-        setMzy(zy);
-        setMzz(zz);
-        setTz(trZ);
-    }
-    
-    /**
-     * The same as {@link Affine#append(Transform transform)}
-     */
-    @Override
-    public void append(Transform transform)
-    {
-        append(transform.getMxx(), transform.getMxy(), transform.getMxz(), transform.getTx(), 
-                transform.getMyx(), transform.getMyy(), transform.getMyz(), transform.getTy(), 
-                transform.getMzx(), transform.getMzy(), transform.getMzz(), transform.getTz());
-    }
-    
-    /**
-     * The same as {link Affine#append(double[] matrix, MatrixType type, int offset)}
-     */
-    @Override
-    public void append(double[] matrix, MatrixType type, int offset)
-    {
-        switch(type)
-        {
-            case MT_2D_2x3:
-            case MT_2D_3x3:
-                append(matrix[offset], matrix[offset + 1], matrix[offset + 2], 
-                        matrix[offset + 3], matrix[offset + 4], matrix[offset + 5]);
-                break;
-            case MT_3D_3x4:
-            case MT_3D_4x4:
-                append(matrix[offset], matrix[offset + 1], matrix[offset + 2], matrix[offset + 3], 
-                        matrix[offset + 4], matrix[offset + 5], matrix[offset + 6], matrix[offset + 7], 
-                        matrix[offset + 8], matrix[offset + 9], matrix[offset + 10], matrix[offset + 11]);
-                break;
-        }
-    }
-    
-    /**
-     * The same as {link Affine#appendRotation(double angle)}
-     */
-    @Override
-    public void appendRotation(double angle)
-    {
-        append(new Rotate(angle));
-    }
-    
-    @Override
-    public void appendRotation(double andle, double pivatX, double pivotY)
-    {
-        append(new Rotate(andle, pivatX, pivotY));
-    }
-    
-    @Override
-    public void appendRotation(double angle, Point2D pivot)
-    {
-        append(new Rotate(angle, pivot.getX(), pivot.getY()));
-    }
-    
-    @Override
-    public void appendRotation(double angle, double pivotX, double pivotY, double pivotZ,
-            double axisX, double axisY, double axisZ)
-    {
-        append(new Rotate(angle, pivotX, pivotY, pivotZ, new Point3D(axisX, axisY, axisZ)));
-    }
-    
-    @Override
-    public void appendRotation(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis)
-    {
-        append(new Rotate(angle, pivotX, pivotY, pivotZ, axis));
-    }
-    
-    @Override
-    public void appendRotation(double angle, Point3D pivot, Point3D axis)
-    {
-        append(new Rotate(angle, pivot.getX(), pivot.getY(), pivot.getZ(), axis));
-    }
-    
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.scenegraph.app;
+
+import javafx.geometry.Point2D;
+import javafx.geometry.Point3D;
+import javafx.scene.transform.Affine;
+import javafx.scene.transform.MatrixType;
+import javafx.scene.transform.Rotate;
+import javafx.scene.transform.Transform;
+
+/**
+ * All overloaded methods do the same as in {@link Affine} but with it's own implementation.
+ *
+ * @author Aleksandr Sakharuk
+ */
+public class AffineManual extends Affine
+{
+    
+    /**
+     * The same as {@link Affine#append(double mxx, double mxy, double tx, double myx, double myy, double ty)}
+     */
+    @Override
+    public void append(double mxx, double mxy, double tx, double myx, double myy, double ty)
+    {
+	setMxx(getMxx() * mxx + getMxy() * myx);
+	setMxy(getMxx() * mxy + getMxy() * myy);
+	setMxz(getMxz());
+	setTx(getMxx() * tx + getMxy() * ty + getTx());
+	
+	setMyx(getMyx() * mxx + getMyy() * myx);
+	setMyy(getMyx() * mxy + getMyy() * myy);
+	setMyz(getMyz());
+	setTy(getMyx() * tx + getMyy() * ty + getTy());
+	
+	setMzx(getMzx() * mxx + getMzy() * myx);
+	setMzy(getMzx() * mxy + getMzy() * myy);
+	setMzz(getMzz());
+	setTz(getMzx() * tx + getMzy() * ty + getTz());
+    }
+    
+    /**
+     * The same as {@link Affine#append(double mxx, double mxy, double mxz, double tx, double myx, 
+	    double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)}
+     */
+    @Override
+    public void append(double mxx, double mxy, double mxz, double tx, double myx, 
+	    double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
+    {
+	double xx = getMxx() * mxx + getMxy() * myx + getMxz() * mzx;
+	double xy = getMxx() * mxy + getMxy() * myy + getMxz() * mzy;
+	double xz = getMxx() * mxz + getMxy() * myz + getMxz() * mzz;
+	double trX = getMxx() * tx + getMxy() * ty + getMxz() * tz + getTx();
+	
+	double yx = getMyx() * mxx + getMyy() * myx + getMyz() * mzx;
+	double yy = getMyx() * mxy + getMyy() * myy + getMyz() * mzy;
+	double yz = getMyx() * mxz + getMyy() * myz + getMyz() * mzz;
+	double trY = getMyx() * tx + getMyy() * ty + getMyz() * tz + getTy();
+	
+	double zx = getMzx() * mxx + getMzy() * myx + getMzz() * mzx;
+	double zy = getMzx() * mxy + getMzy() * myy + getMzz() * mzy;
+	double zz = getMzx() * mxz + getMzy() * myz + getMzz() * mzz;
+	double trZ = getMzx() * tx + getMzy() * ty + getMzz() * tz + getTz();
+        
+        setMxx(xx);
+        setMxy(xy);
+        setMxz(xz);
+        setTx(trX);
+        
+        setMyx(yx);
+        setMyy(yy);
+        setMyz(yz);
+        setTy(trY);
+        
+        setMzx(zx);
+        setMzy(zy);
+        setMzz(zz);
+        setTz(trZ);
+    }
+    
+    /**
+     * The same as {@link Affine#append(Transform transform)}
+     */
+    @Override
+    public void append(Transform transform)
+    {
+        append(transform.getMxx(), transform.getMxy(), transform.getMxz(), transform.getTx(), 
+                transform.getMyx(), transform.getMyy(), transform.getMyz(), transform.getTy(), 
+                transform.getMzx(), transform.getMzy(), transform.getMzz(), transform.getTz());
+    }
+    
+    /**
+     * The same as {link Affine#append(double[] matrix, MatrixType type, int offset)}
+     */
+    @Override
+    public void append(double[] matrix, MatrixType type, int offset)
+    {
+        switch(type)
+        {
+            case MT_2D_2x3:
+            case MT_2D_3x3:
+                append(matrix[offset], matrix[offset + 1], matrix[offset + 2], 
+                        matrix[offset + 3], matrix[offset + 4], matrix[offset + 5]);
+                break;
+            case MT_3D_3x4:
+            case MT_3D_4x4:
+                append(matrix[offset], matrix[offset + 1], matrix[offset + 2], matrix[offset + 3], 
+                        matrix[offset + 4], matrix[offset + 5], matrix[offset + 6], matrix[offset + 7], 
+                        matrix[offset + 8], matrix[offset + 9], matrix[offset + 10], matrix[offset + 11]);
+                break;
+        }
+    }
+    
+    /**
+     * The same as {link Affine#appendRotation(double angle)}
+     */
+    @Override
+    public void appendRotation(double angle)
+    {
+        append(new Rotate(angle));
+    }
+    
+    @Override
+    public void appendRotation(double andle, double pivatX, double pivotY)
+    {
+        append(new Rotate(andle, pivatX, pivotY));
+    }
+    
+    @Override
+    public void appendRotation(double angle, Point2D pivot)
+    {
+        append(new Rotate(angle, pivot.getX(), pivot.getY()));
+    }
+    
+    @Override
+    public void appendRotation(double angle, double pivotX, double pivotY, double pivotZ,
+            double axisX, double axisY, double axisZ)
+    {
+        append(new Rotate(angle, pivotX, pivotY, pivotZ, new Point3D(axisX, axisY, axisZ)));
+    }
+    
+    @Override
+    public void appendRotation(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis)
+    {
+        append(new Rotate(angle, pivotX, pivotY, pivotZ, axis));
+    }
+    
+    @Override
+    public void appendRotation(double angle, Point3D pivot, Point3D axis)
+    {
+        append(new Rotate(angle, pivot.getX(), pivot.getY(), pivot.getZ(), axis));
+    }
+    
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/AnimationApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/AnimationApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 import java.text.DecimalFormat;
--- a/functional/SceneGraphTests/src/test/scenegraph/app/AnimationBooleanInterpolator.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/AnimationBooleanInterpolator.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 import javafx.animation.Interpolator;
--- a/functional/SceneGraphTests/src/test/scenegraph/app/AnimationTransitionApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/AnimationTransitionApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 import java.text.DecimalFormat;
--- a/functional/SceneGraphTests/src/test/scenegraph/app/CanvasEffects2App.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/CanvasEffects2App.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 import java.util.ArrayList;
--- a/functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapePathElements2App.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapePathElements2App.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 /**
--- a/functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapes2App.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/CanvasShapes2App.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,6 +1,25 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
 package test.scenegraph.app;
 
--- a/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,8 +1,26 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  */
-
 package test.scenegraph.app;
 
 import com.oracle.jdk.sqe.cc.markup.Covers;
--- a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,407 +1,426 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import java.util.Arrays;
-import java.util.List;
-import javafx.concurrent.WorkerStateEvent;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventType;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-import javafx.scene.control.Accordion;
-import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.CheckBoxTreeItem;
-import javafx.scene.control.ChoiceBox;
-import javafx.scene.control.ColorPicker;
-import javafx.scene.control.ComboBox;
-import javafx.scene.control.Control;
-import javafx.scene.control.Hyperlink;
-import javafx.scene.control.Label;
-import javafx.scene.control.ListCell;
-import javafx.scene.control.ListView;
-import javafx.scene.control.MenuButton;
-import javafx.scene.control.MenuItem;
-import javafx.scene.control.Pagination;
-import javafx.scene.control.PasswordField;
-import javafx.scene.control.TabPane;
-import javafx.scene.control.TextArea;
-import javafx.scene.control.TextField;
-import javafx.scene.control.TitledPane;
-import javafx.scene.control.ToggleButton;
-import javafx.scene.control.TreeItem;
-import javafx.scene.control.TreeView;
-import javafx.scene.control.cell.CheckBoxTreeCell;
-import javafx.scene.control.cell.TextFieldListCell;
-import javafx.scene.control.cell.TextFieldTreeCell;
-import javafx.scene.input.ContextMenuEvent;
-import javafx.scene.input.DragEvent;
-import javafx.scene.input.InputMethodEvent;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseDragEvent;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.input.ScrollEvent;
-import javafx.scene.media.MediaErrorEvent;
-import javafx.scene.web.WebEvent;
-import javafx.stage.WindowEvent;
-import javafx.util.Callback;
-import javafx.util.StringConverter;
-import test.javaclient.shared.InteroperabilityApp;
-
-/**
- *
- * @author Aleksandr Sakharuk
- */
-public class ControlEventsApp extends InteroperabilityApp {
-    
-
-    public static void main(String[] args) {
-        test.javaclient.shared.Utils.launch(ControlEventsApp.class, args);
-    }
-
-    @Override
-    protected Scene getScene() {
-        TabPane tabPane = new TabPane();
-        for (Controls c : Controls.values()) {
-            ControlEventsTab tab = new ControlEventsTab(c.name(), c.getControl(), c.getProcessedEvents());
-            tab.setId(c.toString());
-            tabPane.getTabs().add(tab);
-        }
-        return new Scene(tabPane);
-    }
-
-    public abstract static class AbstractControlFactory<T extends Control> {
-
-        public abstract T create();
-    }
-    
-    public static final String CONTROL_ID = "control";
-    public static final String DRAG_TARGET_ID = "drag_target";
-    public static final String DRAG_FIELD_ID = "drag_field";
-    public static final String RESET_FOCUS_AREA = "reset_focus";
-    public static final double INSETS = 50;
-
-    public static enum EventTypes {
-
-        ACTION(ActionEvent.ACTION),
-        CONTEXT_MENU_REQUESTED(ContextMenuEvent.CONTEXT_MENU_REQUESTED),
-        DRAG_DONE(DragEvent.DRAG_DONE),
-        DRAG_DROPPED(DragEvent.DRAG_DROPPED),
-        DRAG_ENTERED(DragEvent.DRAG_ENTERED),
-        DRAG_ENTERED_TARGET(DragEvent.DRAG_ENTERED_TARGET),
-        DRAG_EXITED(DragEvent.DRAG_EXITED),
-        DRAG_EXITED_TARGET(DragEvent.DRAG_EXITED_TARGET),
-        DRAG_OVER(DragEvent.DRAG_OVER),
-        INPUT_METHOD_TEXT_CHANGED(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED),
-        KEY_PRESSED(KeyEvent.KEY_PRESSED),
-        KEY_RELEASED(KeyEvent.KEY_RELEASED),
-        KEY_TYPED(KeyEvent.KEY_TYPED),
-        DRAG_DETECTED(MouseEvent.DRAG_DETECTED),
-        MOUSE_CLICKED(MouseEvent.MOUSE_CLICKED),
-        MOUSE_DRAGGED(MouseEvent.MOUSE_DRAGGED),
-        MOUSE_ENTERED(MouseEvent.MOUSE_ENTERED),
-//        MOUSE_ENTERED_TARGET(MouseEvent.MOUSE_ENTERED_TARGET),
-        MOUSE_EXITED(MouseEvent.MOUSE_EXITED),
-//        MOUSE_EXITED_TARGET(MouseEvent.MOUSE_EXITED_TARGET),
-        MOUSE_MOVED(MouseEvent.MOUSE_MOVED),
-        MOUSE_PRESSED(MouseEvent.MOUSE_PRESSED),
-        MOUSE_RELEASED(MouseEvent.MOUSE_RELEASED),
-        MOUSE_DRAG_ENTERED(MouseDragEvent.MOUSE_DRAG_ENTERED),
-//        MOUSE_DRAG_ENTERED_TARGET(MouseDragEvent.MOUSE_DRAG_ENTERED_TARGET),
-        MOUSE_DRAG_EXITED(MouseDragEvent.MOUSE_DRAG_EXITED),
-//        MOUSE_DRAG_EXITED_TARGET(MouseDragEvent.MOUSE_DRAG_EXITED_TARGET),
-        MOUSE_DRAG_OVER(MouseDragEvent.MOUSE_DRAG_OVER),
-        MOUSE_DRAG_RELEASED(MouseDragEvent.MOUSE_DRAG_RELEASED),
-        SCROLL(ScrollEvent.SCROLL),
-        MEDIA_ERROR(MediaErrorEvent.MEDIA_ERROR),
-        ALERT(WebEvent.ALERT),
-        RESIZED(WebEvent.RESIZED),
-        STATUS_CHANGED(WebEvent.STATUS_CHANGED),
-        VISIBILITY_CHANGED(WebEvent.VISIBILITY_CHANGED),
-        WINDOW_CLOSE_REQUEST(WindowEvent.WINDOW_CLOSE_REQUEST),
-        WINDOW_HIDDEN(WindowEvent.WINDOW_HIDDEN),
-        WINDOW_HIDING(WindowEvent.WINDOW_HIDING),
-        WINDOW_SHOWING(WindowEvent.WINDOW_SHOWING),
-        WINDOW_SHOWN(WindowEvent.WINDOW_SHOWN),
-        WORKER_STATE_CANCELLED(WorkerStateEvent.WORKER_STATE_CANCELLED),
-        WORKER_STATE_FAILED(WorkerStateEvent.WORKER_STATE_FAILED),
-        WORKER_STATE_READY(WorkerStateEvent.WORKER_STATE_READY),
-        WORKER_STATE_RUNNING(WorkerStateEvent.WORKER_STATE_RUNNING),
-        WORKER_STATE_SCHEDULED(WorkerStateEvent.WORKER_STATE_SCHEDULED),
-        WORKER_STATE_SUCCEEDED(WorkerStateEvent.WORKER_STATE_SUCCEEDED),
-        LIST_VIEW_EDIT_START_EVENT(ListView.editStartEvent()),
-        LIST_VIEW_EDIT_COMMIT_EVENT(ListView.editCommitEvent()),
-        LIST_VIEW_EDIT_CANCEL_EVENT(ListView.editCancelEvent()),
-        TREE_VIEW_EDIT_START_EVENT(TreeView.editStartEvent()),
-        TREE_VIEW_EDIT_COMMIT_EVENT(TreeView.editCommitEvent()),
-        TREE_VIEW_EDIT_CANCEL_EVENT(TreeView.editCancelEvent())
-        ;
-
-        private EventTypes(EventType<? extends Event> type) {
-            this.type = type;
-        }
-
-        public EventType<? extends Event> getType() {
-            return type;
-        }
-
-        public static EventTypes get(EventType<? extends Event> type) {
-            for (EventTypes t : EventTypes.values()) {
-                if (t.getType().equals(type)) {
-                    return t;
-                }
-            }
-            return null;
-        }
-        private EventType<? extends Event> type;
-    }
-
-    public static enum Controls 
-    {
-        
-        ACCORDION(new AbstractControlFactory<Accordion>() {
-
-            @Override
-            public Accordion create() {
-                TitledPane t1 = new TitledPane("Label", new Label("Label"));
-                TitledPane t2 = new TitledPane("TextField", new TextField());
-                TitledPane t3 = new TitledPane("Button", new Button("Button"));
-                Accordion accordion = new Accordion();
-                accordion.getPanes().addAll(t1, t2, t3);
-                return accordion;
-            }
-        }, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        CHOICE_BOX(new AbstractControlFactory<ChoiceBox>() {
-
-            @Override
-            public ChoiceBox create() {
-                ChoiceBox<String> cb = new ChoiceBox<String>();
-                cb.getItems().addAll("one", "two", "three");
-                cb.setValue("one");
-                return cb;
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-
-        LABEL(new AbstractControlFactory<Label>() {
-            @Override
-            public Label create() {
-                return new Label("Label");
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class),
-        
-        BUTTON(new AbstractControlFactory<Button>() {
-
-            @Override
-            public Button create() {
-                return new Button("Button");
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        CHECK_BOX(new AbstractControlFactory<CheckBox>() {
-
-            @Override
-            public CheckBox create() {
-                return new CheckBox("CheckBox");
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        HYPERLINK(new AbstractControlFactory<Hyperlink>() {
-
-            @Override
-            public Hyperlink create() {
-                return new Hyperlink("www.oracle.com");
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        MENU_BUTTON(new AbstractControlFactory<MenuButton>() {
-
-            @Override
-            public MenuButton create() {
-                MenuButton m = new MenuButton("Eats");
-                m.getItems().addAll(new MenuItem("Burger"), new MenuItem("Hot Dog"));
-                return m;
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class),
-        
-        TOGGLE_BUTTON(new AbstractControlFactory<ToggleButton>() {
-
-            @Override
-            public ToggleButton create() {
-                return new ToggleButton("Toggle button");
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        TITLED_PANE(new AbstractControlFactory<TitledPane>() {
-
-            @Override
-            public TitledPane create() {
-                Label l = new Label("Label");
-                TitledPane tp = new TitledPane("Label", l);
-                tp.setMaxWidth(l.getWidth());
-                return tp;
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class),
-        
-        COLOR_PICKER(new AbstractControlFactory<ColorPicker>() {
-
-            @Override
-            public ColorPicker create() {
-                return new ColorPicker();
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        COMBO_BOX(new AbstractControlFactory<ComboBox>() {
-
-            @Override
-            public ComboBox create() {
-                ComboBox<String> cb = new ComboBox<String>();
-                cb.getItems().addAll("one", "two", "three");
-                cb.setValue("one");
-                return cb;
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        PAGINATION(new AbstractControlFactory<Pagination>() {
-
-            @Override
-            public Pagination create() {
-                Pagination p = new Pagination(3);
-                p.setPageFactory(new Callback<Integer, Node>() {
-
-                    public Node call(Integer p) {
-                        return new Label(p.toString());
-                    }
-                });
-                return p;
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class),
-        
-        LIST_VIEW(new AbstractControlFactory<ListView>() {
-
-            @Override
-            public ListView create() {
-                ListView<String> lv = new ListView<String>();
-                lv.getItems().addAll("one", "two", "three");
-                lv.setEditable(true);
-                lv.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {
-
-                    public ListCell<String> call(ListView<String> p) {
-                        return new TextFieldListCell<String>(new StringConverter<String>() {
-
-                            @Override
-                            public String toString(String t) {
-                                return t;
-                            }
-
-                            @Override
-                            public String fromString(String string) {
-                                return string;
-                            }
-                        });
-                    }
-                });
-                return lv;
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
-                ListView.class),
-        
-        TEXT_FIELD(new AbstractControlFactory<TextField>() {
-
-            @Override
-            public TextField create() {
-                return new TextField("Text field");
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class, InputMethodEvent.class),
-        
-        PASSWORD_FIELD(new AbstractControlFactory<PasswordField>() {
-
-            @Override
-            public PasswordField create() {
-                return new PasswordField();
-            }
-        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
-                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
-                ScrollEvent.class, InputMethodEvent.class),
-        
-        TEXT_AREA(new AbstractControlFactory<TextArea>() {
-
-            @Override
-            public TextArea create() {
-                return new TextArea("Text area");
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
-                InputMethodEvent.class),
-        
-        TREE_VIEW(new AbstractControlFactory<TreeView>() {
-
-            @Override
-            public TreeView create() {
-                TreeItem<String> root = new CheckBoxTreeItem<String>("Root node");
-                root.setExpanded(true);
-                root.getChildren().addAll(
-                        new CheckBoxTreeItem<String>("Item 1"), 
-                        new CheckBoxTreeItem<String>("Item 2"), 
-                        new CheckBoxTreeItem<String>("Item 3")
-                );
-                TreeView<String> tw = new TreeView<String>(root);
-                tw.setCellFactory(TextFieldTreeCell.<String>forTreeView());
-                tw.setEditable(true);
-                return tw;
-            }
-        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
-                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
-                TreeView.class)
-        ;
-
-        private Controls(AbstractControlFactory<? extends Control> f, 
-                Class<?>... eventsDeclaringClasses) 
-        {
-            this.f = f;
-            this.eventsDeclaringClasses = Arrays.asList(eventsDeclaringClasses);
-        }
-
-        public Control getControl() 
-        {
-            return f.create();
-        }
-        
-        public List<Class<?>> getProcessedEvents()
-        {
-            return eventsDeclaringClasses;
-        }
-        
-        private AbstractControlFactory<? extends Control> f;
-        private List<Class<?>> eventsDeclaringClasses;
-        
-    }
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.scenegraph.app;
+
+import java.util.Arrays;
+import java.util.List;
+import javafx.concurrent.WorkerStateEvent;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.event.EventType;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.control.Accordion;
+import javafx.scene.control.Button;
+import javafx.scene.control.CheckBox;
+import javafx.scene.control.CheckBoxTreeItem;
+import javafx.scene.control.ChoiceBox;
+import javafx.scene.control.ColorPicker;
+import javafx.scene.control.ComboBox;
+import javafx.scene.control.Control;
+import javafx.scene.control.Hyperlink;
+import javafx.scene.control.Label;
+import javafx.scene.control.ListCell;
+import javafx.scene.control.ListView;
+import javafx.scene.control.MenuButton;
+import javafx.scene.control.MenuItem;
+import javafx.scene.control.Pagination;
+import javafx.scene.control.PasswordField;
+import javafx.scene.control.TabPane;
+import javafx.scene.control.TextArea;
+import javafx.scene.control.TextField;
+import javafx.scene.control.TitledPane;
+import javafx.scene.control.ToggleButton;
+import javafx.scene.control.TreeItem;
+import javafx.scene.control.TreeView;
+import javafx.scene.control.cell.CheckBoxTreeCell;
+import javafx.scene.control.cell.TextFieldListCell;
+import javafx.scene.control.cell.TextFieldTreeCell;
+import javafx.scene.input.ContextMenuEvent;
+import javafx.scene.input.DragEvent;
+import javafx.scene.input.InputMethodEvent;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseDragEvent;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.input.ScrollEvent;
+import javafx.scene.media.MediaErrorEvent;
+import javafx.scene.web.WebEvent;
+import javafx.stage.WindowEvent;
+import javafx.util.Callback;
+import javafx.util.StringConverter;
+import test.javaclient.shared.InteroperabilityApp;
+
+/**
+ *
+ * @author Aleksandr Sakharuk
+ */
+public class ControlEventsApp extends InteroperabilityApp {
+    
+
+    public static void main(String[] args) {
+        test.javaclient.shared.Utils.launch(ControlEventsApp.class, args);
+    }
+
+    @Override
+    protected Scene getScene() {
+        TabPane tabPane = new TabPane();
+        for (Controls c : Controls.values()) {
+            ControlEventsTab tab = new ControlEventsTab(c.name(), c.getControl(), c.getProcessedEvents());
+            tab.setId(c.toString());
+            tabPane.getTabs().add(tab);
+        }
+        return new Scene(tabPane);
+    }
+
+    public abstract static class AbstractControlFactory<T extends Control> {
+
+        public abstract T create();
+    }
+    
+    public static final String CONTROL_ID = "control";
+    public static final String DRAG_TARGET_ID = "drag_target";
+    public static final String DRAG_FIELD_ID = "drag_field";
+    public static final String RESET_FOCUS_AREA = "reset_focus";
+    public static final double INSETS = 50;
+
+    public static enum EventTypes {
+
+        ACTION(ActionEvent.ACTION),
+        CONTEXT_MENU_REQUESTED(ContextMenuEvent.CONTEXT_MENU_REQUESTED),
+        DRAG_DONE(DragEvent.DRAG_DONE),
+        DRAG_DROPPED(DragEvent.DRAG_DROPPED),
+        DRAG_ENTERED(DragEvent.DRAG_ENTERED),
+        DRAG_ENTERED_TARGET(DragEvent.DRAG_ENTERED_TARGET),
+        DRAG_EXITED(DragEvent.DRAG_EXITED),
+        DRAG_EXITED_TARGET(DragEvent.DRAG_EXITED_TARGET),
+        DRAG_OVER(DragEvent.DRAG_OVER),
+        INPUT_METHOD_TEXT_CHANGED(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED),
+        KEY_PRESSED(KeyEvent.KEY_PRESSED),
+        KEY_RELEASED(KeyEvent.KEY_RELEASED),
+        KEY_TYPED(KeyEvent.KEY_TYPED),
+        DRAG_DETECTED(MouseEvent.DRAG_DETECTED),
+        MOUSE_CLICKED(MouseEvent.MOUSE_CLICKED),
+        MOUSE_DRAGGED(MouseEvent.MOUSE_DRAGGED),
+        MOUSE_ENTERED(MouseEvent.MOUSE_ENTERED),
+//        MOUSE_ENTERED_TARGET(MouseEvent.MOUSE_ENTERED_TARGET),
+        MOUSE_EXITED(MouseEvent.MOUSE_EXITED),
+//        MOUSE_EXITED_TARGET(MouseEvent.MOUSE_EXITED_TARGET),
+        MOUSE_MOVED(MouseEvent.MOUSE_MOVED),
+        MOUSE_PRESSED(MouseEvent.MOUSE_PRESSED),
+        MOUSE_RELEASED(MouseEvent.MOUSE_RELEASED),
+        MOUSE_DRAG_ENTERED(MouseDragEvent.MOUSE_DRAG_ENTERED),
+//        MOUSE_DRAG_ENTERED_TARGET(MouseDragEvent.MOUSE_DRAG_ENTERED_TARGET),
+        MOUSE_DRAG_EXITED(MouseDragEvent.MOUSE_DRAG_EXITED),
+//        MOUSE_DRAG_EXITED_TARGET(MouseDragEvent.MOUSE_DRAG_EXITED_TARGET),
+        MOUSE_DRAG_OVER(MouseDragEvent.MOUSE_DRAG_OVER),
+        MOUSE_DRAG_RELEASED(MouseDragEvent.MOUSE_DRAG_RELEASED),
+        SCROLL(ScrollEvent.SCROLL),
+        MEDIA_ERROR(MediaErrorEvent.MEDIA_ERROR),
+        ALERT(WebEvent.ALERT),
+        RESIZED(WebEvent.RESIZED),
+        STATUS_CHANGED(WebEvent.STATUS_CHANGED),
+        VISIBILITY_CHANGED(WebEvent.VISIBILITY_CHANGED),
+        WINDOW_CLOSE_REQUEST(WindowEvent.WINDOW_CLOSE_REQUEST),
+        WINDOW_HIDDEN(WindowEvent.WINDOW_HIDDEN),
+        WINDOW_HIDING(WindowEvent.WINDOW_HIDING),
+        WINDOW_SHOWING(WindowEvent.WINDOW_SHOWING),
+        WINDOW_SHOWN(WindowEvent.WINDOW_SHOWN),
+        WORKER_STATE_CANCELLED(WorkerStateEvent.WORKER_STATE_CANCELLED),
+        WORKER_STATE_FAILED(WorkerStateEvent.WORKER_STATE_FAILED),
+        WORKER_STATE_READY(WorkerStateEvent.WORKER_STATE_READY),
+        WORKER_STATE_RUNNING(WorkerStateEvent.WORKER_STATE_RUNNING),
+        WORKER_STATE_SCHEDULED(WorkerStateEvent.WORKER_STATE_SCHEDULED),
+        WORKER_STATE_SUCCEEDED(WorkerStateEvent.WORKER_STATE_SUCCEEDED),
+        LIST_VIEW_EDIT_START_EVENT(ListView.editStartEvent()),
+        LIST_VIEW_EDIT_COMMIT_EVENT(ListView.editCommitEvent()),
+        LIST_VIEW_EDIT_CANCEL_EVENT(ListView.editCancelEvent()),
+        TREE_VIEW_EDIT_START_EVENT(TreeView.editStartEvent()),
+        TREE_VIEW_EDIT_COMMIT_EVENT(TreeView.editCommitEvent()),
+        TREE_VIEW_EDIT_CANCEL_EVENT(TreeView.editCancelEvent())
+        ;
+
+        private EventTypes(EventType<? extends Event> type) {
+            this.type = type;
+        }
+
+        public EventType<? extends Event> getType() {
+            return type;
+        }
+
+        public static EventTypes get(EventType<? extends Event> type) {
+            for (EventTypes t : EventTypes.values()) {
+                if (t.getType().equals(type)) {
+                    return t;
+                }
+            }
+            return null;
+        }
+        private EventType<? extends Event> type;
+    }
+
+    public static enum Controls 
+    {
+        
+        ACCORDION(new AbstractControlFactory<Accordion>() {
+
+            @Override
+            public Accordion create() {
+                TitledPane t1 = new TitledPane("Label", new Label("Label"));
+                TitledPane t2 = new TitledPane("TextField", new TextField());
+                TitledPane t3 = new TitledPane("Button", new Button("Button"));
+                Accordion accordion = new Accordion();
+                accordion.getPanes().addAll(t1, t2, t3);
+                return accordion;
+            }
+        }, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        CHOICE_BOX(new AbstractControlFactory<ChoiceBox>() {
+
+            @Override
+            public ChoiceBox create() {
+                ChoiceBox<String> cb = new ChoiceBox<String>();
+                cb.getItems().addAll("one", "two", "three");
+                cb.setValue("one");
+                return cb;
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+
+        LABEL(new AbstractControlFactory<Label>() {
+            @Override
+            public Label create() {
+                return new Label("Label");
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class),
+        
+        BUTTON(new AbstractControlFactory<Button>() {
+
+            @Override
+            public Button create() {
+                return new Button("Button");
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        CHECK_BOX(new AbstractControlFactory<CheckBox>() {
+
+            @Override
+            public CheckBox create() {
+                return new CheckBox("CheckBox");
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        HYPERLINK(new AbstractControlFactory<Hyperlink>() {
+
+            @Override
+            public Hyperlink create() {
+                return new Hyperlink("www.oracle.com");
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        MENU_BUTTON(new AbstractControlFactory<MenuButton>() {
+
+            @Override
+            public MenuButton create() {
+                MenuButton m = new MenuButton("Eats");
+                m.getItems().addAll(new MenuItem("Burger"), new MenuItem("Hot Dog"));
+                return m;
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class),
+        
+        TOGGLE_BUTTON(new AbstractControlFactory<ToggleButton>() {
+
+            @Override
+            public ToggleButton create() {
+                return new ToggleButton("Toggle button");
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        TITLED_PANE(new AbstractControlFactory<TitledPane>() {
+
+            @Override
+            public TitledPane create() {
+                Label l = new Label("Label");
+                TitledPane tp = new TitledPane("Label", l);
+                tp.setMaxWidth(l.getWidth());
+                return tp;
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class),
+        
+        COLOR_PICKER(new AbstractControlFactory<ColorPicker>() {
+
+            @Override
+            public ColorPicker create() {
+                return new ColorPicker();
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        COMBO_BOX(new AbstractControlFactory<ComboBox>() {
+
+            @Override
+            public ComboBox create() {
+                ComboBox<String> cb = new ComboBox<String>();
+                cb.getItems().addAll("one", "two", "three");
+                cb.setValue("one");
+                return cb;
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        PAGINATION(new AbstractControlFactory<Pagination>() {
+
+            @Override
+            public Pagination create() {
+                Pagination p = new Pagination(3);
+                p.setPageFactory(new Callback<Integer, Node>() {
+
+                    public Node call(Integer p) {
+                        return new Label(p.toString());
+                    }
+                });
+                return p;
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class),
+        
+        LIST_VIEW(new AbstractControlFactory<ListView>() {
+
+            @Override
+            public ListView create() {
+                ListView<String> lv = new ListView<String>();
+                lv.getItems().addAll("one", "two", "three");
+                lv.setEditable(true);
+                lv.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {
+
+                    public ListCell<String> call(ListView<String> p) {
+                        return new TextFieldListCell<String>(new StringConverter<String>() {
+
+                            @Override
+                            public String toString(String t) {
+                                return t;
+                            }
+
+                            @Override
+                            public String fromString(String string) {
+                                return string;
+                            }
+                        });
+                    }
+                });
+                return lv;
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
+                ListView.class),
+        
+        TEXT_FIELD(new AbstractControlFactory<TextField>() {
+
+            @Override
+            public TextField create() {
+                return new TextField("Text field");
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class, InputMethodEvent.class),
+        
+        PASSWORD_FIELD(new AbstractControlFactory<PasswordField>() {
+
+            @Override
+            public PasswordField create() {
+                return new PasswordField();
+            }
+        }, ActionEvent.class, ContextMenuEvent.class, DragEvent.class, 
+                MouseEvent.class, MouseDragEvent.class, KeyEvent.class, 
+                ScrollEvent.class, InputMethodEvent.class),
+        
+        TEXT_AREA(new AbstractControlFactory<TextArea>() {
+
+            @Override
+            public TextArea create() {
+                return new TextArea("Text area");
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
+                InputMethodEvent.class),
+        
+        TREE_VIEW(new AbstractControlFactory<TreeView>() {
+
+            @Override
+            public TreeView create() {
+                TreeItem<String> root = new CheckBoxTreeItem<String>("Root node");
+                root.setExpanded(true);
+                root.getChildren().addAll(
+                        new CheckBoxTreeItem<String>("Item 1"), 
+                        new CheckBoxTreeItem<String>("Item 2"), 
+                        new CheckBoxTreeItem<String>("Item 3")
+                );
+                TreeView<String> tw = new TreeView<String>(root);
+                tw.setCellFactory(TextFieldTreeCell.<String>forTreeView());
+                tw.setEditable(true);
+                return tw;
+            }
+        }, ContextMenuEvent.class, DragEvent.class, MouseEvent.class, 
+                MouseDragEvent.class, KeyEvent.class, ScrollEvent.class, 
+                TreeView.class)
+        ;
+
+        private Controls(AbstractControlFactory<? extends Control> f, 
+                Class<?>... eventsDeclaringClasses) 
+        {
+            this.f = f;
+            this.eventsDeclaringClasses = Arrays.asList(eventsDeclaringClasses);
+        }
+
+        public Control getControl() 
+        {
+            return f.create();
+        }
+        
+        public List<Class<?>> getProcessedEvents()
+        {
+            return eventsDeclaringClasses;
+        }
+        
+        private AbstractControlFactory<? extends Control> f;
+        private List<Class<?>> eventsDeclaringClasses;
+        
+    }
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,272 +1,291 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import java.lang.reflect.Field;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.event.EventType;
-import javafx.geometry.HPos;
-import javafx.geometry.Insets;
-import javafx.geometry.Orientation;
-import javafx.geometry.Pos;
-import javafx.scene.Node;
-import javafx.scene.control.Button;
-import javafx.scene.control.Control;
-import javafx.scene.control.RadioButton;
-import javafx.scene.control.ScrollPane;
-import javafx.scene.control.Tab;
-import javafx.scene.control.TextField;
-import javafx.scene.control.ToggleGroup;
-import javafx.scene.control.Tooltip;
-import javafx.scene.input.ClipboardContent;
-import javafx.scene.input.DragEvent;
-import javafx.scene.input.Dragboard;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.input.TransferMode;
-import javafx.scene.layout.ColumnConstraints;
-import javafx.scene.layout.FlowPane;
-import javafx.scene.layout.GridPane;
-import javafx.scene.layout.RowConstraints;
-import javafx.scene.layout.StackPane;
-import javafx.scene.layout.VBox;
-import test.scenegraph.app.ControlEventsApp.EventTypes;
-
-/**
- *
- * @author Aleksandr Sakharuk
- */
-public class ControlEventsTab extends Tab 
-{
-
-    public ControlEventsTab(String text, Control control, List<Class<?>> eventsDeclaringClasses)
-    {
-        super(text);
-        this.control = control;
-        control.setTooltip(dragTooltip);
-        this.eventsDeclaringClasses = eventsDeclaringClasses;
-        init();
-    }
-    
-    private void init()
-    {
-        ScrollPane sp = new ScrollPane();
-        final GridPane gp = new GridPane();
-        
-        ColumnConstraints activeArea = new ColumnConstraints();
-        activeArea.setPercentWidth(65);
-        ColumnConstraints eventTypesList = new ColumnConstraints();
-        eventTypesList.setPercentWidth(35);
-        RowConstraints chiefControl = new RowConstraints();
-        chiefControl.setPercentHeight(65);
-        RowConstraints helperControls = new RowConstraints();
-        helperControls.setPercentHeight(35);
-        gp.getColumnConstraints().addAll(activeArea, eventTypesList);
-        gp.getRowConstraints().addAll(chiefControl, helperControls);
-        
-        StackPane controlPane = new StackPane();
-        controlPane.setPadding(new Insets(ControlEventsApp.INSETS));
-        controlPane.getChildren().add(control);
-        
-        GridPane.setHalignment(controlPane, HPos.CENTER);
-        gp.add(controlPane, 0, 0);
-        eventTypes = new VBox(1);
-        final ToggleGroup eventSwitch = new ToggleGroup();
-        
-        //List<String> fieldNames = new LinkedList<String>(); 
-        List<Object> events = new LinkedList<Object>();
-            for(Class<?> eventClass: eventsDeclaringClasses)
-            {
-                for(Field field: eventClass.getDeclaredFields())
-                {
-                    //fieldNames.add(field.getName());
-                    try 
-                    {
-                        if(!field.isAccessible())
-                        {
-                            field.setAccessible(true);
-                        }
-                        if(field.getType().equals(EventType.class))
-                        {
-                            events.add(field.get(eventClass));
-                        }
-                    } 
-                    catch(Exception ex) 
-                    {
-                        ex.printStackTrace();
-                    }
-                }
-            }
-        
-        for(EventTypes et: EventTypes.values())
-        {
-            
-            if(!events.contains(et.getType()))
-            {
-                continue;
-            }
-            final RadioButton rb = new RadioButton(et.toString());
-            eventTypes.getChildren().add(rb);
-            rb.setToggleGroup(eventSwitch);
-            rb.setStyle(NOT_HANDLED_STYLE);
-            rb.addEventHandler(ActionEvent.ACTION, new EventHandler<ActionEvent>() {
-
-                public void handle(ActionEvent t) {
-                    EventType type = EventTypes.valueOf(rb.getText()).getType();
-                    if(!type.getName().endsWith("_TARGET"))
-                    {
-                        control.addEventHandler(type, new EventHandler<Event>() {
-
-                            public void handle(Event t) {
-                                System.out.println(t.getEventType() + " handled by " + control.
-                                        getClass().getSimpleName());
-
-                                rb.setStyle(HANDLED_STYLE);
-                                control.removeEventHandler(t.getEventType(), this);
-                            }
-                        });
-                    }
-                    else
-                    {
-                        control.getScene().addEventHandler(type, new EventHandler<Event>() {
-
-                            public void handle(Event t) {
-                                if(t.getTarget().equals(control))
-                                {
-                                    System.out.println(t.getEventType() + " handled by " + control.
-                                            getScene().getClass().getSimpleName());
-
-                                    rb.setStyle(HANDLED_STYLE);
-                                    control.getScene().removeEventHandler(t.getEventType(), this);
-                                }
-                            }
-                        });
-                    }
-                }
-            });
-        }
-        sp.setContent(eventTypes);
-        gp.add(sp, 1, 0, 1, 2);
-        
-        resetButton.setOnAction(new EventHandler<ActionEvent>() {
-
-            public void handle(ActionEvent t) {
-                for(Node n: eventTypes.getChildren())
-                {
-                    n.setStyle(NOT_HANDLED_STYLE);
-                    dragTooltip.setText(ControlEventsTab.DRAG_WAIT);
-                    eventSwitch.selectToggle(null);
-                    dragTarget.setText("");
-                }
-            }
-        });
-        
-        FlowPane fp = new FlowPane(Orientation.HORIZONTAL, 10, 10);
-        fp.getChildren().addAll(dragField, dragTarget, resetButton);
-        GridPane.setHalignment(fp, HPos.CENTER);
-        gp.add(fp, 0, 1);
-        
-        dragField.setOnDragDetected(new EventHandler<MouseEvent>() {
-
-            public void handle(MouseEvent event) {
-                final Dragboard db = dragField.startDragAndDrop(TransferMode.ANY);
-                final ClipboardContent content = new ClipboardContent();
-                content.putString(dragField.getText());
-                db.setContent(content);
-                event.consume();
-            }
-        });
-        
-        control.setOnDragDetected(new EventHandler<MouseEvent>() {
-
-            public void handle(MouseEvent event) {
-                final Dragboard db = control.startDragAndDrop(TransferMode.ANY);
-                final ClipboardContent content = new ClipboardContent();
-                content.putString(control.getClass().getSimpleName());
-                db.setContent(content);
-                event.consume();
-            }
-        });
-        
-        control.setOnDragOver(new EventHandler<DragEvent>() {
-
-            public void handle(DragEvent event) {
-                event.acceptTransferModes(TransferMode.ANY);
-            }
-        });
-        
-        control.setOnDragDropped(new EventHandler<DragEvent>() {
-
-            public void handle(DragEvent event) {
-                Dragboard db = event.getDragboard();
-                boolean success = false;
-                if (db.hasString()) {
-                    dragTooltip.setText(db.getString());
-                    success = true;
-                }
-                event.setDropCompleted(success);
-            }
-        });
-        
-        dragTarget.setOnDragOver(new EventHandler<DragEvent>() {
-
-            public void handle(DragEvent event) {
-                event.acceptTransferModes(TransferMode.ANY);
-            }
-        });
-        
-        dragTarget.setOnDragDropped(new EventHandler<DragEvent>() {
-
-            public void handle(DragEvent event) {
-                Dragboard db = event.getDragboard();
-                boolean success = false;
-                if (db.hasString()) {
-                    dragTarget.setText(db.getString());
-                    success = true;
-                }
-                event.setDropCompleted(success);
-            }
-        });
-        
-        gp.addEventHandler(MouseEvent.DRAG_DETECTED, new EventHandler<MouseEvent>() {
-
-            public void handle(MouseEvent arg0) {
-                gp.startFullDrag();
-            }
-        });
-        
-        gp.setAlignment(Pos.CENTER);
-        setContent(gp);
-        setClosable(false);
-        
-        setId(getText());
-        control.setId(ControlEventsApp.CONTROL_ID);
-        for(Node rb: eventTypes.getChildren())
-        {
-            rb.setId(((RadioButton) rb).getText());
-        }
-        dragField.setId(ControlEventsApp.DRAG_FIELD_ID);
-        dragTarget.setId(ControlEventsApp.DRAG_TARGET_ID);
-        
-    }
-    
-    private Control control;
-    private VBox eventTypes;
-    private List<Class<?>> eventsDeclaringClasses;
-    private TextField dragField = new TextField("Drag text");
-    private TextField dragTarget = new TextField();
-    private Tooltip dragTooltip = new Tooltip(DRAG_WAIT);
-    private Button resetButton = new Button("Reset");
-    
-    public static final String NOT_HANDLED_STYLE = "-fx-text-fill: red;";
-    public static final String HANDLED_STYLE = "-fx-text-fill: green;";
-    public static final String DRAG_WAIT = "Waiting for a drug";
-    
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.scenegraph.app;
+
+import java.lang.reflect.Field;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.event.EventHandler;
+import javafx.event.EventType;
+import javafx.geometry.HPos;
+import javafx.geometry.Insets;
+import javafx.geometry.Orientation;
+import javafx.geometry.Pos;
+import javafx.scene.Node;
+import javafx.scene.control.Button;
+import javafx.scene.control.Control;
+import javafx.scene.control.RadioButton;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.control.Tab;
+import javafx.scene.control.TextField;
+import javafx.scene.control.ToggleGroup;
+import javafx.scene.control.Tooltip;
+import javafx.scene.input.ClipboardContent;
+import javafx.scene.input.DragEvent;
+import javafx.scene.input.Dragboard;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.input.TransferMode;
+import javafx.scene.layout.ColumnConstraints;
+import javafx.scene.layout.FlowPane;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.RowConstraints;
+import javafx.scene.layout.StackPane;
+import javafx.scene.layout.VBox;
+import test.scenegraph.app.ControlEventsApp.EventTypes;
+
+/**
+ *
+ * @author Aleksandr Sakharuk
+ */
+public class ControlEventsTab extends Tab 
+{
+
+    public ControlEventsTab(String text, Control control, List<Class<?>> eventsDeclaringClasses)
+    {
+        super(text);
+        this.control = control;
+        control.setTooltip(dragTooltip);
+        this.eventsDeclaringClasses = eventsDeclaringClasses;
+        init();
+    }
+    
+    private void init()
+    {
+        ScrollPane sp = new ScrollPane();
+        final GridPane gp = new GridPane();
+        
+        ColumnConstraints activeArea = new ColumnConstraints();
+        activeArea.setPercentWidth(65);
+        ColumnConstraints eventTypesList = new ColumnConstraints();
+        eventTypesList.setPercentWidth(35);
+        RowConstraints chiefControl = new RowConstraints();
+        chiefControl.setPercentHeight(65);
+        RowConstraints helperControls = new RowConstraints();
+        helperControls.setPercentHeight(35);
+        gp.getColumnConstraints().addAll(activeArea, eventTypesList);
+        gp.getRowConstraints().addAll(chiefControl, helperControls);
+        
+        StackPane controlPane = new StackPane();
+        controlPane.setPadding(new Insets(ControlEventsApp.INSETS));
+        controlPane.getChildren().add(control);
+        
+        GridPane.setHalignment(controlPane, HPos.CENTER);
+        gp.add(controlPane, 0, 0);
+        eventTypes = new VBox(1);
+        final ToggleGroup eventSwitch = new ToggleGroup();
+        
+        //List<String> fieldNames = new LinkedList<String>(); 
+        List<Object> events = new LinkedList<Object>();
+            for(Class<?> eventClass: eventsDeclaringClasses)
+            {
+                for(Field field: eventClass.getDeclaredFields())
+                {
+                    //fieldNames.add(field.getName());
+                    try 
+                    {
+                        if(!field.isAccessible())
+                        {
+                            field.setAccessible(true);
+                        }
+                        if(field.getType().equals(EventType.class))
+                        {
+                            events.add(field.get(eventClass));
+                        }
+                    } 
+                    catch(Exception ex) 
+                    {
+                        ex.printStackTrace();
+                    }
+                }
+            }
+        
+        for(EventTypes et: EventTypes.values())
+        {
+            
+            if(!events.contains(et.getType()))
+            {
+                continue;
+            }
+            final RadioButton rb = new RadioButton(et.toString());
+            eventTypes.getChildren().add(rb);
+            rb.setToggleGroup(eventSwitch);
+            rb.setStyle(NOT_HANDLED_STYLE);
+            rb.addEventHandler(ActionEvent.ACTION, new EventHandler<ActionEvent>() {
+
+                public void handle(ActionEvent t) {
+                    EventType type = EventTypes.valueOf(rb.getText()).getType();
+                    if(!type.getName().endsWith("_TARGET"))
+                    {
+                        control.addEventHandler(type, new EventHandler<Event>() {
+
+                            public void handle(Event t) {
+                                System.out.println(t.getEventType() + " handled by " + control.
+                                        getClass().getSimpleName());
+
+                                rb.setStyle(HANDLED_STYLE);
+                                control.removeEventHandler(t.getEventType(), this);
+                            }
+                        });
+                    }
+                    else
+                    {
+                        control.getScene().addEventHandler(type, new EventHandler<Event>() {
+
+                            public void handle(Event t) {
+                                if(t.getTarget().equals(control))
+                                {
+                                    System.out.println(t.getEventType() + " handled by " + control.
+                                            getScene().getClass().getSimpleName());
+
+                                    rb.setStyle(HANDLED_STYLE);
+                                    control.getScene().removeEventHandler(t.getEventType(), this);
+                                }
+                            }
+                        });
+                    }
+                }
+            });
+        }
+        sp.setContent(eventTypes);
+        gp.add(sp, 1, 0, 1, 2);
+        
+        resetButton.setOnAction(new EventHandler<ActionEvent>() {
+
+            public void handle(ActionEvent t) {
+                for(Node n: eventTypes.getChildren())
+                {
+                    n.setStyle(NOT_HANDLED_STYLE);
+                    dragTooltip.setText(ControlEventsTab.DRAG_WAIT);
+                    eventSwitch.selectToggle(null);
+                    dragTarget.setText("");
+                }
+            }
+        });
+        
+        FlowPane fp = new FlowPane(Orientation.HORIZONTAL, 10, 10);
+        fp.getChildren().addAll(dragField, dragTarget, resetButton);
+        GridPane.setHalignment(fp, HPos.CENTER);
+        gp.add(fp, 0, 1);
+        
+        dragField.setOnDragDetected(new EventHandler<MouseEvent>() {
+
+            public void handle(MouseEvent event) {
+                final Dragboard db = dragField.startDragAndDrop(TransferMode.ANY);
+                final ClipboardContent content = new ClipboardContent();
+                content.putString(dragField.getText());
+                db.setContent(content);
+                event.consume();
+            }
+        });
+        
+        control.setOnDragDetected(new EventHandler<MouseEvent>() {
+
+            public void handle(MouseEvent event) {
+                final Dragboard db = control.startDragAndDrop(TransferMode.ANY);
+                final ClipboardContent content = new ClipboardContent();
+                content.putString(control.getClass().getSimpleName());
+                db.setContent(content);
+                event.consume();
+            }
+        });
+        
+        control.setOnDragOver(new EventHandler<DragEvent>() {
+
+            public void handle(DragEvent event) {
+                event.acceptTransferModes(TransferMode.ANY);
+            }
+        });
+        
+        control.setOnDragDropped(new EventHandler<DragEvent>() {
+
+            public void handle(DragEvent event) {
+                Dragboard db = event.getDragboard();
+                boolean success = false;
+                if (db.hasString()) {
+                    dragTooltip.setText(db.getString());
+                    success = true;
+                }
+                event.setDropCompleted(success);
+            }
+        });
+        
+        dragTarget.setOnDragOver(new EventHandler<DragEvent>() {
+
+            public void handle(DragEvent event) {
+                event.acceptTransferModes(TransferMode.ANY);
+            }
+        });
+        
+        dragTarget.setOnDragDropped(new EventHandler<DragEvent>() {
+
+            public void handle(DragEvent event) {
+                Dragboard db = event.getDragboard();
+                boolean success = false;
+                if (db.hasString()) {
+                    dragTarget.setText(db.getString());
+                    success = true;
+                }
+                event.setDropCompleted(success);
+            }
+        });
+        
+        gp.addEventHandler(MouseEvent.DRAG_DETECTED, new EventHandler<MouseEvent>() {
+
+            public void handle(MouseEvent arg0) {
+                gp.startFullDrag();
+            }
+        });
+        
+        gp.setAlignment(Pos.CENTER);
+        setContent(gp);
+        setClosable(false);
+        
+        setId(getText());
+        control.setId(ControlEventsApp.CONTROL_ID);
+        for(Node rb: eventTypes.getChildren())
+        {
+            rb.setId(((RadioButton) rb).getText());
+        }
+        dragField.setId(ControlEventsApp.DRAG_FIELD_ID);
+        dragTarget.setId(ControlEventsApp.DRAG_TARGET_ID);
+        
+    }
+    
+    private Control control;
+    private VBox eventTypes;
+    private List<Class<?>> eventsDeclaringClasses;
+    private TextField dragField = new TextField("Drag text");
+    private TextField dragTarget = new TextField();
+    private Tooltip dragTooltip = new Tooltip(DRAG_WAIT);
+    private Button resetButton = new Button("Reset");
+    
+    public static final String NOT_HANDLED_STYLE = "-fx-text-fill: red;";
+    public static final String HANDLED_STYLE = "-fx-text-fill: green;";
+    public static final String DRAG_WAIT = "Waiting for a drug";
+    
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestApp.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestApp.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,30 +1,49 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import javafx.scene.Scene;
-import test.javaclient.shared.InteroperabilityApp;
-import test.javaclient.shared.Utils;
-
-
-/**
- *
- * @author Aleksandr Sakharuk
- */
-public class DepthTestApp extends InteroperabilityApp
-{
-    
-    public static void main(String... args) 
-    {
-        Utils.launch(DepthTestApp.class, args);
-    }
-
-    @Override
-    protected Scene getScene() 
-    {
-        return new DepthTestScene();
-    }
-       
-}
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ */
+package test.scenegraph.app;
+
+import javafx.scene.Scene;
+import test.javaclient.shared.InteroperabilityApp;
+import test.javaclient.shared.Utils;
+
+
+/**
+ *
+ * @author Aleksandr Sakharuk
+ */
+public class DepthTestApp extends InteroperabilityApp
+{
+    
+    public static void main(String... args) 
+    {
+        Utils.launch(DepthTestApp.class, args);
+    }
+
+    @Override
+    protected Scene getScene() 
+    {
+        return new DepthTestScene();
+    }
+       
+}
--- a/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestScene.java	Thu Feb 07 16:36:54 2013 +0400
+++ b/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestScene.java	Tue Feb 12 17:56:14 2013 +0400
@@ -1,332 +1,351 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- */
-package test.scenegraph.app;
-
-import java.util.Arrays;
-import java.util.List;
-import javafx.collections.FXCollections;
-import javafx.collections.ListChangeListener;
-import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.scene.*;
-import javafx.scene.control.*;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.layout.*;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Circle;
-import javafx.scene.shape.Rectangle;
-import javafx.scene.shape.Shape;
-
-/**
- *
- * @author Aleksandr Sakharuk
- */
-public class DepthTestScene extends Scene
-{
-
-    public DepthTestScene() 
-    {
-        super(new BorderPane(), 500, 280.25, true);
-        BorderPane root = (BorderPane) getRoot();
-        final Group depthTestGroup = new Group();
-        depthTestGroup.getChildren().addListener(new NodeListener());
-        depthTestGroup.getChildren().addAll(Nodes.RECTANGLE.getNode("green"), Nodes.CIRCLE.getNode("red"));
-        
-        parentDT.setOnAction(new DepthTestChangeHandler(depthTestGroup));
-        
-        GridPane tuneGrid = new GridPane();
-        tuneGrid.setVgap(1);
-        tuneGrid.setHgap(1);
-        tuneGrid.addRow(0, oneLabel, oneDT);
-        tuneGrid.addRow(1, anotherLabel, anotherDT);
-        tuneGrid.addRow(2, parentLabel, parentDT);
-        
-        oneNodeCmb.getSelectionModel().select(Nodes.RECTANGLE);
-        oneNodeCmb.setOnAction(new NodeChangeHandler(depthTestGroup.getChildren(), 0));
-        anotherNodeCmb.getSelectionModel().select(Nodes.CIRCLE);
-        anotherNodeCmb.setOnAction(new NodeChangeHandler(depthTestGroup.getChildren(), 1));
-        
-        HBox nodeSwitches = new HBox(1);
-        nodeSwitches.getChildren().addAll(oneNodeCmb, anotherNodeCmb);
-        
-        oneToFront.setOnAction(new FrontBackChangeHandler(depthTestGroup.getChildren(), 0));
-        anotherToFront.setOnAction(new FrontBackChangeHandler(depthTestGroup.getChildren(), 1));
-        
-        VBox backFrontRadio = new VBox(1);
-        backFrontRadio.getChildren().addAll(oneToFront, anotherToFront);
-        
-        VBox switchesAndRadios = new VBox(1);
-        switchesAndRadios.getChildren().addAll(tuneGrid, backFrontRadio, 
-                HBoxBuilder.create().children(indicator, referenceGreen, referenceRed).spacing(10).
-                build(), details);
-        
-        root.setLeft(depthTestGroup);
-        root.setRight(switchesAndRadios);
-        root.setTop(nodeSwitches);
-        setCamera(new PerspectiveCamera());
-        
-        oneDT.setValue(DepthTest.INHERIT);
-        anotherDT.setValue(DepthTest.INHERIT);
-        parentDT.setValue(DepthTest.DISABLE);
-    }
-    
-    private Label oneLabel = new Label("First node DepthTest");
-    private Label anotherLabel = new Label("Second node DepthTest");
-    private Label parentLabel = new Label("Parent node DepthTest");
-    
-    private ObservableList<DepthTest> depthTestList = FXCollections.observableArrayList(DepthTest.values());
-    private ComboBox<DepthTest> oneDT = new ComboBox<DepthTest>(depthTestList);
-    private ComboBox<DepthTest> anotherDT = new ComboBox<DepthTest>(depthTestList);
-    private ComboBox<DepthTest> parentDT = new ComboBox<DepthTest>(
-            FXCollections.observableArrayList(DepthTest.DISABLE, DepthTest.ENABLE));
-    
-    private ObservableList<DepthTestScene.Nodes> nodesList = FXCollections.observableArrayList(DepthTestScene.Nodes.values());
-    private ComboBox<DepthTestScene.Nodes> oneNodeCmb = new ComboBox<DepthTestScene.Nodes>(nodesList);
-    private ComboBox<DepthTestScene.Nodes> anotherNodeCmb = new ComboBox<DepthTestScene.Nodes>(nodesList);
-    
-    private ToggleGroup backFrontSwitch = new ToggleGroup();
-    private RadioButton oneToFront = new RadioButton("First node to front");
-    private RadioButton anotherToFront = new RadioButton("Second node to front");
-    
-    private Circle indicator = new Circle(10);
-    private Label details = new Label("");
-    private Circle referenceGreen = new Circle(10, Color.GREEN);
-    private Circle referenceRed = new Circle(10, Color.RED);
-    
-    {
-        oneDT.setId("first_depth_test");
-        anotherDT.setId("second_depth_test");
-        parentDT.setId("parent_depth_test");
-        
-        oneNodeCmb.setId("first_node_combo");
-        anotherNodeCmb.setId("second_node_combo");
-        
-        oneToFront.setId("first_node_to_front");
-        anotherToFront.setId("second_node_to_front");
-        
-        oneToFront.setToggleGroup(backFrontSwitch);
-        anotherToFront.setToggleGroup(backFrontSwitch);
-        
-        indicator.setId("indicator");
-        //details.setWrapText(true);
-        referenceGreen.setId("reference_green");
-        referenceRed.setId("reference_red");
-    }
-        
-    public enum Nodes
-    {
-        
-        RECTANGLE(){
-            public Node create()
-            {
-                Node node = new Rectangle(100, 100, Color.GREEN);
-                return node;
-            }
-        },
-        CIRCLE(){
-            public Node create()
-            {
-                Node node = new Circle(40, Color.RED);
-                return node;
-            }
-        },
-        BUTTON(){
-            public Node create()
-            {
-                Node node = new Button("Button");
-                return node;
-            }
-        };
-        
-        protected abstract Node create();
-        
-        public Node getNode()
-        {
-            Node node = create();
-            node.setId(toString());
-            node.setTranslateX(100);
-            node.setTranslateY(100);
-            return node;
-        }
-        
-        public Node getNode(String color)
-        {
-            Node node = create();
-            node.setId(toString() + "-" + color);
-            if(node instanceof Shape)
-            {
-                ((Shape) node).setFill(Color.web(color));
-            }
-            else if(node instanceof Control)
-            {
-                node.setStyle(String.format("-fx-background-color:%1$s; -fx-text-fill:%1$s", color));
-            }
-            return node;
-        }
-        
-        public String getId()
-        {
-            return id;
-        }
-        
-        private String id;
-        
-    }
-    
-    class NodeListener implements ListChangeListener<Node>
-    {
-
-        public void onChanged(final ListChangeListener.Change<? extends Node> change) 
-        {
-            while(change.next())
-            {
-                if(change.wasAdded())
-                {
-                    final List<? extends Node> added = change.getAddedSubList();
-                    for(final Node node: added)
-                    {
-                        final ObservableList<? extends Node> list = change.getList();
-                        final int current = list.indexOf(node);
-                        ComboBox<DepthTest> box = boxes.get(current);
-                        box.setOnAction(new DepthTestScene.DepthTestChangeHandler(node));
-                        node.setDepthTest(box.getValue());
-                        labels.get(current).setText(node.getClass().getSimpleName() + " DepthTest");
-                        RadioButton radio = radios.get(current);
-                        radio.setText(node.getClass().getSimpleName() + " to front");
-                        for(RadioButton rb: radios)
-                        {
-                            if(rb.selectedProperty().get())
-                            {
-                                ActionEvent.fireEvent(rb, new ActionEvent(rb, rb));
-                            }
-                        }
-                        node.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
-
-                            public void handle(MouseEvent t) 
-                            {
-                                details.setText(node.getId() + " was reached");
-                                if(isOnTop())
-                                {
-                                    indicator.setStyle("-fx-fill: green;");
-                                }
-                                else
-                                {
-                                    indicator.setStyle("-fx-fill: red;");
-                                }
-                            }
-                            
-                            public boolean isOnTop()
-                            {
-                                boolean meets = false;
-                                boolean onTop = list.indexOf(node) == list.size() - 1;
-                                boolean selfDTEnable = isDepthTestEnable(boxes.get(current));
-                                boolean otherDTEnable = isDepthTest