changeset 2367:d32d3206f3e8

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/MASTER/jfx//rt
author jpgodine
date Thu, 24 Jan 2013 09:23:47 -0800
parents 63d458f96141 9d502f03ee58
children e0ae9907428b
files
diffstat 30 files changed, 594 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/scene/KeyboardShortcutsHandler.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/scene/KeyboardShortcutsHandler.java	Thu Jan 24 09:23:47 2013 -0800
@@ -227,7 +227,7 @@
                     KeyEvent fakeEvent = new KeyEvent(null, event.getTarget(), KeyEvent.KEY_PRESSED,
                                                                 event.getCharacter(),
                                                                 event.getText(),
-                                                                ((KeyCode)event.getCode()).impl_getCode(),
+                                                                event.getCode(),
                                                                 event.isShiftDown(),
                                                                 event.isControlDown(),
                                                                 true,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-ui-common/src/com/sun/javafx/scene/input/KeyCodeMap.java	Thu Jan 24 09:23:47 2013 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009, 2013, 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
+ * questions.
+ */
+package com.sun.javafx.scene.input;
+
+import java.util.HashMap;
+import java.util.Map;
+import javafx.scene.input.KeyCode;
+
+/**
+ * Map from int codes to KeyCode.
+ * Should be removed once RT-20448 is fixed.
+ */
+public final class KeyCodeMap {
+
+    KeyCodeMap() {
+    }
+    
+    private static final Map<Integer, KeyCode> charMap;
+
+    static {
+        charMap = new HashMap<Integer, KeyCode>(KeyCode.values().length);
+
+        for (KeyCode c : KeyCode.values()) {
+            charMap.put(c.impl_getCode(), c);
+        }
+    }
+
+    public static KeyCode valueOf(int code) {
+        return charMap.get(code);
+    }
+}
--- a/javafx-ui-common/src/com/sun/javafx/stage/PopupWindowPeerListener.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/stage/PopupWindowPeerListener.java	Thu Jan 24 09:23:47 2013 -0800
@@ -58,6 +58,10 @@
         // Not applicable for popups
     }
 
+    public void changedMaximized(boolean maximized) {
+        // Not applicable for popups
+    }
+
     public void changedResizable(boolean resizable) {
         // Not applicable for popups
     }
--- a/javafx-ui-common/src/com/sun/javafx/stage/StagePeerListener.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/stage/StagePeerListener.java	Thu Jan 24 09:23:47 2013 -0800
@@ -36,6 +36,7 @@
 
     public static interface StageAccessor {
         public void setIconified(Stage stage, boolean iconified);
+        public void setMaximized(Stage stage, boolean maximized);
         public void setResizable(Stage stage, boolean resizable);
         public void setFullScreen(Stage stage, boolean fs);
     }
@@ -53,6 +54,11 @@
     }
 
     @Override
+    public void changedMaximized(boolean maximized) {
+        stageAccessor.setMaximized(stage, maximized);
+    }
+
+    @Override
     public void changedResizable(boolean resizable) {
         stageAccessor.setResizable(stage, resizable);
     }
--- a/javafx-ui-common/src/com/sun/javafx/stage/WindowPeerListener.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/stage/WindowPeerListener.java	Thu Jan 24 09:23:47 2013 -0800
@@ -69,6 +69,10 @@
         // Overridden in subclasses
     }
 
+    public void changedMaximized(boolean maximized) {
+        // Overridden in subclasses
+    }
+
     public void changedResizable(boolean resizable) {
         // Overridden in subclasses
     }
--- a/javafx-ui-common/src/com/sun/javafx/tk/DummyToolkit.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/tk/DummyToolkit.java	Thu Jan 24 09:23:47 2013 -0800
@@ -487,6 +487,7 @@
     public List<File> showFileChooser(TKStage ownerWindow,
                                       String title,
                                       File initialDirectory,
+                                      String initialFileName,
                                       FileChooserType fileChooserType,
                                       List<ExtensionFilter> extensionFilters) {
         throw new UnsupportedOperationException("Not supported yet.");
--- a/javafx-ui-common/src/com/sun/javafx/tk/TKStage.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/tk/TKStage.java	Thu Jan 24 09:23:47 2013 -0800
@@ -99,6 +99,8 @@
 
     public void setIconified(boolean iconified);
 
+    public void setMaximized(boolean maximized);
+
     public void setResizable(boolean resizable);
 
     public void setImportant(boolean important);
--- a/javafx-ui-common/src/com/sun/javafx/tk/TKStageListener.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/tk/TKStageListener.java	Thu Jan 24 09:23:47 2013 -0800
@@ -62,6 +62,13 @@
     public void changedIconified(boolean iconified);
 
     /**
+     * The stages peer has become maximized or unmaximized
+     *
+     * @param maximized True if the stage's peer is now maximized
+     */
+    public void changedMaximized(boolean maximized);
+
+    /**
      * The stages peer has become resizable or nonresizable
      *
      * @param resizable True if the stage's peer is now resizable
--- a/javafx-ui-common/src/com/sun/javafx/tk/Toolkit.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/com/sun/javafx/tk/Toolkit.java	Thu Jan 24 09:23:47 2013 -0800
@@ -796,6 +796,7 @@
             TKStage ownerWindow,
             String title,
             File initialDirectory,
+            String initialFileName,
             FileChooserType fileChooserType,
             List<ExtensionFilter> extensionFilters);
 
--- a/javafx-ui-common/src/javafx/scene/Node.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Thu Jan 24 09:23:47 2013 -0800
@@ -49,6 +49,7 @@
 import javafx.beans.property.ReadOnlyBooleanPropertyBase;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
 import javafx.beans.property.ReadOnlyObjectProperty;
+import javafx.beans.property.ReadOnlyObjectPropertyBase;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
@@ -5190,8 +5191,9 @@
      *                       Component Orientation Properties                  *
      *                                                                         *
      **************************************************************************/
-    
+
     private ObjectProperty<NodeOrientation> nodeOrientation;
+    private EffectiveOrientationProperty effectiveNodeOrientationProperty;
 
     private NodeOrientation effectiveNodeOrientation;
     private NodeOrientation automaticNodeOrientation;
@@ -5244,13 +5246,6 @@
         return nodeOrientation;
     }
 
-    /**
-     * Returns the NodeOrientation that is used to draw the node.
-     * <p>
-     * The effective orientation of a node resolves the inheritance of
-     * node orientation, returning either left-to-right or right-to-left.
-     * </p>
-     */
     public final NodeOrientation getEffectiveNodeOrientation() {
         if (effectiveNodeOrientation == null) {
             effectiveNodeOrientation = calcEffectiveNodeOrientation();
@@ -5260,10 +5255,24 @@
     }
 
     /**
+     * The effective orientation of a node resolves the inheritance of
+     * node orientation, returning either left-to-right or right-to-left.
+     */
+    public final ReadOnlyObjectProperty<NodeOrientation>
+            effectiveNodeOrientationProperty() {
+        if (effectiveNodeOrientationProperty == null) {
+            effectiveNodeOrientationProperty =
+                    new EffectiveOrientationProperty();
+        }
+
+        return effectiveNodeOrientationProperty;
+    }
+
+    /**
      * Determines whether a node should be mirrored when node orientation
      * is right-to-left.
      * <p>
-     * When a node is mirrored, the origin is automtically moved to the
+     * When a node is mirrored, the origin is automatically moved to the
      * top right corner causing the node to layout children and draw from
      * right to left using a mirroring transformation.  Some nodes may wish
      * to draw from right to left without using a transformation.  These
@@ -5295,6 +5304,11 @@
     void nodeEffectiveOrientationChanged() {
         effectiveNodeOrientation = null;
         automaticNodeOrientation = null;
+
+        if (effectiveNodeOrientationProperty != null) {
+            effectiveNodeOrientationProperty.invalidate();
+        }
+
         // mirroring changed
         impl_transformsChanged();
     }
@@ -5358,6 +5372,28 @@
         return thisOrientation != parentOrientation;
     }
 
+    private final class EffectiveOrientationProperty
+            extends ReadOnlyObjectPropertyBase<NodeOrientation> {
+        @Override
+        public NodeOrientation get() {
+            return getEffectiveNodeOrientation();
+        }
+
+        @Override
+        public Object getBean() {
+            return Node.this;
+        }
+
+        @Override
+        public String getName() {
+            return "effectiveNodeOrientation";
+        }
+
+        public void invalidate() {
+            fireValueChangedEvent();
+        }
+    }
+
     /***************************************************************************
      *                                                                         *
      *                       Misc Seldom Used Properties                       *
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Thu Jan 24 09:23:47 2013 -0800
@@ -44,6 +44,7 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.beans.property.ReadOnlyBooleanProperty;
+import javafx.beans.property.ReadOnlyObjectPropertyBase;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.collections.ListChangeListener.Change;
 import javafx.collections.ObservableList;
@@ -131,6 +132,7 @@
 
 import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED;
 import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGER;
+import com.sun.javafx.scene.input.KeyCodeMap;
 import javafx.geometry.NodeOrientation;
 
 /**
@@ -2292,7 +2294,7 @@
         {
             String chars = new String(cs);
             String text = chars; // TODO: this must be a text like "HOME", "F1", or "A"
-            KeyEvent keyEvent = new KeyEvent(type, chars, text, key,
+            KeyEvent keyEvent = new KeyEvent(type, chars, text, KeyCodeMap.valueOf(key),
                     shiftDown, controlDown, altDown, metaDown);
             impl_processKeyEvent(keyEvent);
         }
@@ -5584,6 +5586,8 @@
 
     
     private ObjectProperty<NodeOrientation> nodeOrientation;
+    private EffectiveOrientationProperty effectiveNodeOrientationProperty;
+
     private NodeOrientation effectiveNodeOrientation;
 
     public final void setNodeOrientation(NodeOrientation orientation) {
@@ -5642,6 +5646,20 @@
         return effectiveNodeOrientation;
     }
 
+    /**
+     * The effective node orientation of a scene resolves the inheritance of
+     * node orientation, returning either left-to-right or right-to-left.
+     */
+    public final ReadOnlyObjectProperty<NodeOrientation>
+            effectiveNodeOrientationProperty() {
+        if (effectiveNodeOrientationProperty == null) {
+            effectiveNodeOrientationProperty =
+                    new EffectiveOrientationProperty();
+        }
+
+        return effectiveNodeOrientationProperty;
+    }
+
     private void parentEffectiveOrientationChanged() {
         if (getNodeOrientation() == NodeOrientation.INHERIT) {
             sceneEffectiveOrientationChanged();
@@ -5650,6 +5668,11 @@
 
     private void sceneEffectiveOrientationChanged() {
         effectiveNodeOrientation = null;
+
+        if (effectiveNodeOrientationProperty != null) {
+            effectiveNodeOrientationProperty.invalidate();
+        }
+
         getRoot().parentEffectiveOrientationChanged();
     }
 
@@ -5675,4 +5698,26 @@
         }
         return orientation;
     }
+
+    private final class EffectiveOrientationProperty
+            extends ReadOnlyObjectPropertyBase<NodeOrientation> {
+        @Override
+        public NodeOrientation get() {
+            return getEffectiveNodeOrientation();
+        }
+
+        @Override
+        public Object getBean() {
+            return Scene.this;
+        }
+
+        @Override
+        public String getName() {
+            return "effectiveNodeOrientation";
+        }
+
+        public void invalidate() {
+            fireValueChangedEvent();
+        }
+    }
 }
--- a/javafx-ui-common/src/javafx/scene/input/KeyCode.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/scene/input/KeyCode.java	Thu Jan 24 09:23:47 2013 -0800
@@ -1312,21 +1312,16 @@
         return code;
     }
 
-    private static final Map<Integer, KeyCode> charMap;
+   
     private static final Map<String, KeyCode> nameMap;
     static {
-        charMap = new HashMap<Integer, KeyCode>(KeyCode.values().length);
+        
         nameMap = new HashMap<String, KeyCode>(KeyCode.values().length);
         for (KeyCode c : KeyCode.values()) {
-            charMap.put(c.code, c);
             nameMap.put(c.name, c);
         }
     }
 
-    static KeyCode valueOf(int code) {
-        return charMap.get(code);
-    }
-
     /**
      * Parses textual representation of a key.
      * @param name Textual representation of the key
--- a/javafx-ui-common/src/javafx/scene/input/KeyEvent.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/scene/input/KeyEvent.java	Thu Jan 24 09:23:47 2013 -0800
@@ -32,6 +32,7 @@
 
 import com.sun.javafx.robot.impl.FXRobotHelper;
 import com.sun.javafx.robot.impl.FXRobotHelper.FXRobotInputAccessor;
+import com.sun.javafx.scene.input.KeyCodeMap;
 import javafx.event.Event;
 import javafx.scene.input.ScrollEvent.HorizontalTextScrollUnits;
 import javafx.scene.input.ScrollEvent.VerticalTextScrollUnits;
@@ -117,7 +118,7 @@
                 return keyCode.code;
             }
             @Override public KeyCode getKeyCodeForCode(int code) {
-                return KeyCode.valueOf(code);
+                return KeyCodeMap.valueOf(code);
             }
             @Override public KeyEvent createKeyEvent(
                 EventType<? extends KeyEvent> eventType,
@@ -171,26 +172,8 @@
         FXRobotHelper.setInputAccessor(a);
     }
 
-
     /**
-     * Constructs new KeyEvent event with null source and target.
-     * @param eventType The type of the event.
-     * @param character The character or sequence of characters associated with the event
-     * @param text A String describing the key code
-     * @param code The integer key code
-     * @param shiftDown true if shift modifier was pressed.
-     * @param controlDown true if control modifier was pressed.
-     * @param altDown true if alt modifier was pressed.
-     * @param metaDown true if meta modifier was pressed.
-     */
-    public KeyEvent(EventType<KeyEvent> eventType, String character,
-            String text, int code, boolean shiftDown, boolean controlDown,
-            boolean altDown, boolean metaDown) {
-        this(null, null, eventType, character, text, code, shiftDown, controlDown, altDown, metaDown);
-    }
-
-    /**
-     * Constructs new KeyEvent event.
+     * Constructs new KeyEvent event with null source and target and KeyCode object directly specified.
      * @param source the source of the event. Can be null.
      * @param target the target of the event. Can be null.
      * @param eventType The type of the event.
@@ -203,14 +186,14 @@
      * @param metaDown true if meta modifier was pressed.
      */
     public KeyEvent(Object source, EventTarget target, EventType<KeyEvent> eventType, String character,
-            String text, int code, boolean shiftDown, boolean controlDown,
+            String text, KeyCode code, boolean shiftDown, boolean controlDown,
             boolean altDown, boolean metaDown) {
         super(source, target, eventType);
         boolean isKeyTyped = eventType == KEY_TYPED;
 
         this.character = isKeyTyped ? character : KeyEvent.CHAR_UNDEFINED;
         this.text = isKeyTyped ? "" : text;
-        this.code = isKeyTyped ? KeyCode.UNDEFINED : KeyCode.valueOf(code);
+        this.code = isKeyTyped ? KeyCode.UNDEFINED : code;
         this.shiftDown = shiftDown;
         this.controlDown = controlDown;
         this.altDown = altDown;
--- a/javafx-ui-common/src/javafx/stage/FileChooser.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/stage/FileChooser.java	Thu Jan 24 09:23:47 2013 -0800
@@ -240,6 +240,37 @@
     }
 
     /**
+     * The initial file name for the displayed dialog.
+     * <p>
+     * This property is used mostly in the displayed file save dialogs as the
+     * initial file name for the file being saved. If set for a file open
+     * dialog it will have any impact on the displayed dialog only if the
+     * corresponding platform provides support for such property in its
+     * file open dialogs.
+     * </p>
+     *
+     * @since JavaFX 8.0
+     */
+    private ObjectProperty<String> initialFileName;
+
+    public final void setInitialFileName(final String value) {
+        initialFileNameProperty().set(value);
+    }
+
+    public final String getInitialFileName() {
+        return (initialFileName != null) ? initialFileName.get() : null;
+    }
+
+    public final ObjectProperty<String> initialFileNameProperty() {
+        if (initialFileName == null) {
+            initialFileName =
+                    new SimpleObjectProperty<String>(this, "initialFileName");
+        }
+
+        return initialFileName;
+    }
+
+    /**
      * Specifies the extension filters used in the displayed file dialog.
      */
     private ObservableList<ExtensionFilter> extensionFilters =
@@ -327,6 +358,7 @@
                 (ownerWindow != null) ? ownerWindow.impl_getPeer() : null,
                 getTitle(),
                 getInitialDirectory(),
+                getInitialFileName(),
                 fileChooserType,
                 extensionFilters);
         
--- a/javafx-ui-common/src/javafx/stage/Stage.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/src/javafx/stage/Stage.java	Thu Jan 24 09:23:47 2013 -0800
@@ -183,6 +183,11 @@
         }
 
         @Override
+        public void setMaximized(Stage stage, boolean maximized) {
+            stage.maximizedPropertyImpl().set(maximized);
+        }
+
+        @Override
         public void setResizable(Stage stage, boolean resizable) {
             ((ResizableProperty)stage.resizableProperty()).setNoInvalidate(resizable);
         }
@@ -546,6 +551,11 @@
      * assume those attributes.
      * </p>
      * <p>
+     * In case that more {@code Stage} modes are set simultaneously their order
+     * of importance is {@code iconified}, fullScreen, {@code maximized} (from
+     * strongest to weakest).
+     * </p>
+     * <p>
      * The property is read only because it can be changed externally
      * by the underlying platform and therefore must not be bindable.
      * </p>
@@ -685,6 +695,11 @@
     /**
      * Defines whether the {@code Stage} is iconified or not.
      * <p>
+     * In case that more {@code Stage} modes are set simultaneously their order
+     * of importance is iconified} {@code fullScreen}, {@code maximized} (from
+     * strongest to weakest).
+     * </p>
+     * <p>
      * The property is read only because it can be changed externally
      * by the underlying platform and therefore must not be bindable.
      * </p>
@@ -715,6 +730,43 @@
     }
 
     /**
+     * Defines whether the {@code Stage} is maximized or not.
+     * <p>
+     * In case that more {@code Stage} modes are set simultaneously their order
+     * of importance is {@code iconified}, {@code fullScreen}, maximized (from
+     * strongest to weakest).
+     * </p>
+     * <p>
+     * The property is read only because it can be changed externally
+     * by the underlying platform and therefore must not be bindable.
+     * </p>
+     *
+     * @defaultValue false
+     */
+    private ReadOnlyBooleanWrapper maximized;
+
+    public final void setMaximized(boolean value) {
+        maximizedPropertyImpl().set(value);
+        if (impl_peer != null)
+            impl_peer.setMaximized(value);
+    }
+
+    public final boolean isMaximized() {
+        return maximized == null ? false : maximized.get();
+    }
+
+    public final ReadOnlyBooleanProperty maximizedProperty() {
+        return maximizedPropertyImpl().getReadOnlyProperty();
+    }
+
+    private final ReadOnlyBooleanWrapper maximizedPropertyImpl() {
+        if (maximized == null) {
+            maximized = new ReadOnlyBooleanWrapper(Stage.this, "maximized");
+        }
+        return maximized;
+    }
+
+    /**
      * Defines whether the {@code Stage} is resizable or not by the user.
      * Programatically you may still change the size of the Stage. This is
      * a hint which allows the implementation to optionally make the Stage
@@ -985,6 +1037,7 @@
             impl_peer.setResizable(isResizable());
             impl_peer.setFullScreen(isFullScreen());
             impl_peer.setIconified(isIconified());
+            impl_peer.setMaximized(isMaximized());
             impl_peer.setTitle(getTitle());
             impl_peer.setMinimumSize((int) Math.ceil(getMinWidth()),
                     (int) Math.ceil(getMinHeight()));
--- a/javafx-ui-common/test/unit/javafx/scene/Node_properties_Test.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/Node_properties_Test.java	Thu Jan 24 09:23:47 2013 -0800
@@ -43,6 +43,7 @@
 
 import com.sun.javafx.event.EventHandlerManager;
 import com.sun.javafx.test.PropertiesTestBase;
+import javafx.geometry.NodeOrientation;
 
 @RunWith(Parameterized.class)
 public final class Node_properties_Test extends PropertiesTestBase {
@@ -142,6 +143,17 @@
             config(testNode, "eventDispatcher", 
                    null,
                    new EventHandlerManager(null)),
+            config(testNode,
+                   "nodeOrientation", NodeOrientation.INHERIT,
+                                      NodeOrientation.RIGHT_TO_LEFT,
+                   "effectiveNodeOrientation", NodeOrientation.LEFT_TO_RIGHT,
+                                               NodeOrientation.RIGHT_TO_LEFT),
+            config(testParent, "nodeOrientation",
+                       NodeOrientation.LEFT_TO_RIGHT,
+                       NodeOrientation.RIGHT_TO_LEFT,
+                   testNode, "effectiveNodeOrientation",
+                       NodeOrientation.LEFT_TO_RIGHT,
+                       NodeOrientation.RIGHT_TO_LEFT)
         });
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/Scene_properties_Test.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/Scene_properties_Test.java	Thu Jan 24 09:23:47 2013 -0800
@@ -31,6 +31,7 @@
 import java.util.Collection;
 import javafx.event.Event;
 import javafx.event.EventHandler;
+import javafx.geometry.NodeOrientation;
 import javafx.scene.paint.Color;
 
 import org.junit.runner.RunWith;
@@ -125,7 +126,12 @@
             config(testScene, "onTouchMoved", null, testEventHandler),
             config(testScene, "onTouchStationary", null, testEventHandler),
             config(testScene, "onInputMethodTextChanged",
-                   null, testEventHandler)
+                   null, testEventHandler),
+            config(testScene,
+                   "nodeOrientation", NodeOrientation.INHERIT,
+                                      NodeOrientation.RIGHT_TO_LEFT,
+                   "effectiveNodeOrientation", NodeOrientation.LEFT_TO_RIGHT,
+                                               NodeOrientation.RIGHT_TO_LEFT)
         });
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/Scenegraph_eventHandlers_Test.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/Scenegraph_eventHandlers_Test.java	Thu Jan 24 09:23:47 2013 -0800
@@ -340,7 +340,7 @@
         }
 
         return new KeyEvent(keyEventType, character, text,
-                                      keyCode.impl_getCode(),
+                                      keyCode,
                                       false, false, false, false);
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/input/KeyCodeTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/input/KeyCodeTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -25,6 +25,7 @@
 
 package javafx.scene.input;
 
+import com.sun.javafx.scene.input.KeyCodeMap;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
@@ -45,7 +46,7 @@
     @Test
     public void shouldFindCorrectCode() {
         for (KeyCode code : KeyCode.values()) {
-            assertSame(code, KeyCode.valueOf(code.impl_getCode()));
+            assertSame(code, KeyCodeMap.valueOf(code.impl_getCode()));
         }
     }
 }
--- a/javafx-ui-common/test/unit/javafx/scene/input/KeyCombinationTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/input/KeyCombinationTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -45,39 +45,40 @@
 import org.junit.Test;
 
 import com.sun.javafx.pgstub.StubToolkit;
+import com.sun.javafx.scene.input.KeyCodeMap;
 import com.sun.javafx.tk.Toolkit;
 
 
 public class KeyCombinationTest {
     final KeyEvent ctrlAltQEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "q", null, 0x51, false, true, true, false);
+            "q", null, KeyCodeMap.valueOf(0x51), false, true, true, false);
 
     final KeyEvent ctrlAltQUpEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_RELEASED, 
-            "q", null, 0x51, false, true, true, false);
+            "q", null, KeyCodeMap.valueOf(0x51), false, true, true, false);
 
     final KeyEvent ctrlShiftQEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "Q", null, 0x51, true, true, false, false);
+            "Q", null, KeyCodeMap.valueOf(0x51), true, true, false, false);
 
     final KeyEvent ctrlAltShiftQEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "Q", null, 0x51, true, true, true, false);
+            "Q", null, KeyCodeMap.valueOf(0x51), true, true, true, false);
 
     final KeyEvent alt2Event = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "2", null, 0x32, false, false, true, false);
+            "2", null, KeyCodeMap.valueOf(0x32), false, false, true, false);
 
     final KeyEvent altShift2Event = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "@", null, 0x32, true, false, true, false);
+            "@", null, KeyCodeMap.valueOf(0x32), true, false, true, false);
 
     final KeyEvent altSoftkey0Event = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "~", null, 0x1000, false, false, true, false);
+            "~", null, KeyCodeMap.valueOf(0x1000), false, false, true, false);
 
     final KeyEvent altShiftSoftkey0Event = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "~", null, 0x1000, true, false, true, false);
+            "~", null, KeyCodeMap.valueOf(0x1000), true, false, true, false);
 
     final KeyEvent altShiftPlusEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "~", null, 0x209, true, false, true, false);
+            "~", null, KeyCodeMap.valueOf(0x209), true, false, true, false);
 
     final KeyEvent altShiftQuoteEvent = new KeyEvent(null, Event.NULL_SOURCE_TARGET, KeyEvent.KEY_PRESSED, 
-            "~", null, 0xDE, true, false, true, false);
+            "~", null, KeyCodeMap.valueOf(0xDE), true, false, true, false);
 
     @BeforeClass
     public static void setUpCharToKeyCodeMap() {
@@ -315,15 +316,15 @@
     public void testKeyCombinationWithShortcutModifier() {
         final KeyEvent ctrlC = new KeyEvent(
                                    KeyEvent.KEY_PRESSED,
-                                   "c", null, 0x43,
+                                   "c", null, KeyCodeMap.valueOf(0x43),
                                    false, true, false, false);
         final KeyEvent metaC = new KeyEvent(
                                    KeyEvent.KEY_PRESSED,
-                                   "c", null, 0x43,
+                                   "c", null, KeyCodeMap.valueOf(0x43),
                                    false, false, false, true);
         final KeyEvent metaAltC = new KeyEvent(
                                    KeyEvent.KEY_PRESSED,
-                                      "c", null, 0x43,
+                                      "c", null, KeyCodeMap.valueOf(0x43),
                                       false, false, true, true);
 
         final KeyCombination shortcutC =
--- a/javafx-ui-common/test/unit/javafx/scene/input/KeyEventTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/scene/input/KeyEventTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -25,6 +25,7 @@
 
 package javafx.scene.input;
 
+import com.sun.javafx.scene.input.KeyCodeMap;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -41,12 +42,12 @@
     private final Node node2 = new TestNode();
     
     public KeyEvent testKeyEvent(EventTarget target, String character, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown) {
-        return new KeyEvent(null, target, KeyEvent.KEY_PRESSED, character, null, code.impl_getCode(), shiftDown, controlDown, altDown, metaDown);
+        return new KeyEvent(null, target, KeyEvent.KEY_PRESSED, character, null, code, shiftDown, controlDown, altDown, metaDown);
     }
 
     @Test
     public void shouldCreateKeyTypedEvent() {
-        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_TYPED, "A", "A", 0x41, true,
+        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_TYPED, "A", "A", KeyCodeMap.valueOf(0x41), true,
                 false, false, false);
 
         assertSame(node1, event.getTarget());
@@ -62,7 +63,7 @@
 
     @Test
     public void shouldCreateKeyReleasedEvent() {
-        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_RELEASED, "A", "A", 0x41, true,
+        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_RELEASED, "A", "A", KeyCodeMap.valueOf(0x41), true,
                 false, false, false);
 
         assertSame(node1, event.getTarget());
@@ -78,7 +79,7 @@
 
     @Test
     public void shouldCopyKeyTypedEvent() {
-        KeyEvent original = new KeyEvent(null, node1, KeyEvent.KEY_TYPED, "A", "A", 0x41, true,
+        KeyEvent original = new KeyEvent(null, node1, KeyEvent.KEY_TYPED, "A", "A", KeyCodeMap.valueOf(0x41), true,
                 false, false, false);
         KeyEvent event = original.copyFor(null, node2);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-ui-common/test/unit/javafx/stage/CommonDialogsTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2013, 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
+ * questions.
+ */
+
+package javafx.stage;
+
+import com.sun.javafx.pgstub.StubToolkit;
+import com.sun.javafx.pgstub.StubToolkit.CommonDialogsSupport;
+import com.sun.javafx.tk.FileChooserType;
+import com.sun.javafx.tk.TKStage;
+import com.sun.javafx.tk.Toolkit;
+import java.io.File;
+import java.util.List;
+import javafx.stage.FileChooser.ExtensionFilter;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public final class CommonDialogsTest {
+    private StubToolkit toolkit;
+    private StubCommonDialogs stubDialogs;
+
+    @Before
+    public void setUp() {
+        toolkit = (StubToolkit) Toolkit.getToolkit();
+        stubDialogs = new StubCommonDialogs();
+
+        toolkit.setCommonDialogsSupport(stubDialogs);
+    }
+
+    @After
+    public void tearDown() {
+        toolkit.setCommonDialogsSupport(null);
+    }
+
+    @Test
+    public void testFileChooser_showOpenDialog() {
+        final FileChooser fileChooser = new FileChooser();
+        final ExtensionFilter txtFiles =
+                new ExtensionFilter("Text Files", "*.txt");
+        final ExtensionFilter jpgFiles =
+                new ExtensionFilter("JPEG Files", "*.jpg");
+        final File initialDirectory = new File(".");
+
+        fileChooser.setTitle("Open Single");
+        fileChooser.setInitialDirectory(initialDirectory);
+        fileChooser.setInitialFileName("open.txt");
+        fileChooser.getExtensionFilters().addAll(txtFiles, jpgFiles);
+
+        Assert.assertEquals(
+                null, fileChooser.showOpenDialog(null));
+        Assert.assertEquals(FileChooserType.OPEN,
+                            stubDialogs.getFileChooserType());
+        Assert.assertEquals(null, stubDialogs.getOwnerWindow());
+        Assert.assertEquals("Open Single", stubDialogs.getTitle());
+        Assert.assertEquals(initialDirectory,
+                            stubDialogs.getInitialDirectory());
+        Assert.assertEquals("open.txt", stubDialogs.getInitialFileName());
+        Assert.assertArrayEquals(
+                new Object[] { txtFiles, jpgFiles },
+                stubDialogs.getExtensionFilters().toArray());
+    }
+
+    @Test
+    public void testFileChooser_showOpenMultipleDialog() {
+        final FileChooser fileChooser = new FileChooser();
+        final ExtensionFilter allFiles =
+                new ExtensionFilter("All Files", "*.*");
+
+        fileChooser.setTitle("Open Multiple");
+        fileChooser.getExtensionFilters().addAll(allFiles);
+
+        Assert.assertEquals(
+                null, fileChooser.showOpenMultipleDialog(null));
+        Assert.assertEquals(FileChooserType.OPEN_MULTIPLE,
+                            stubDialogs.getFileChooserType());
+        Assert.assertEquals(null, stubDialogs.getOwnerWindow());
+        Assert.assertEquals("Open Multiple", stubDialogs.getTitle());
+        Assert.assertEquals(null, stubDialogs.getInitialDirectory());
+        Assert.assertEquals(null, stubDialogs.getInitialFileName());
+        Assert.assertArrayEquals(
+                new Object[] { allFiles },
+                stubDialogs.getExtensionFilters().toArray());
+    }
+
+    @Test
+    public void testFileChooser_showSaveDialog() {
+        final FileChooser fileChooser = new FileChooser();
+        final File initialDirectory = new File(".");
+
+        fileChooser.setTitle("Save");
+        fileChooser.setInitialDirectory(initialDirectory);
+        fileChooser.setInitialFileName("save.txt");
+
+        Assert.assertEquals(
+                null, fileChooser.showSaveDialog(null));
+        Assert.assertEquals(FileChooserType.SAVE,
+                            stubDialogs.getFileChooserType());
+        Assert.assertEquals(null, stubDialogs.getOwnerWindow());
+        Assert.assertEquals("Save", stubDialogs.getTitle());
+        Assert.assertEquals(initialDirectory,
+                            stubDialogs.getInitialDirectory());
+        Assert.assertEquals("save.txt", stubDialogs.getInitialFileName());
+        Assert.assertEquals(0, stubDialogs.getExtensionFilters().size());
+    }
+
+    @Test
+    public void testDirectoryChooser_showDialog() {
+        final DirectoryChooser directoryChooser = new DirectoryChooser();
+        final File initialDirectory = new File(".");
+
+        directoryChooser.setTitle("Open");
+        directoryChooser.setInitialDirectory(initialDirectory);
+
+        Assert.assertEquals(
+                null, directoryChooser.showDialog(null));
+        Assert.assertEquals(null, stubDialogs.getOwnerWindow());
+        Assert.assertEquals("Open", stubDialogs.getTitle());
+        Assert.assertEquals(initialDirectory,
+                            stubDialogs.getInitialDirectory());
+    }
+
+    private static final class StubCommonDialogs
+            implements CommonDialogsSupport {
+        private FileChooserType fileChooserType;
+        private TKStage ownerWindow;
+        private String title;
+        private File initialDirectory;
+        private String initialFileName;
+        private List<ExtensionFilter> extensionFilters;
+
+        public FileChooserType getFileChooserType() {
+            return fileChooserType;
+        }
+
+        public TKStage getOwnerWindow() {
+            return ownerWindow;
+        }
+
+        public String getTitle() {
+            return title;
+        }
+
+        public File getInitialDirectory() {
+            return initialDirectory;
+        }
+
+        public String getInitialFileName() {
+            return initialFileName;
+        }
+
+        public List<ExtensionFilter> getExtensionFilters() {
+            return extensionFilters;
+        }
+
+        @Override
+        public List<File> showFileChooser(
+                              final TKStage ownerWindow,
+                              final String title,
+                              final File initialDirectory,
+                              final String initialFileName,
+                              final FileChooserType fileChooserType,
+                              final List<ExtensionFilter> extensionFilters) {
+            this.ownerWindow = ownerWindow;
+            this.title = title;
+            this.initialDirectory = initialDirectory;
+            this.initialFileName = initialFileName;
+            this.fileChooserType = fileChooserType;
+            this.extensionFilters = extensionFilters;
+
+            return null;
+        }
+
+        @Override
+        public File showDirectoryChooser(final TKStage ownerWindow,
+                                         final String title,
+                                         final File initialDirectory) {
+            this.ownerWindow = ownerWindow;
+            this.title = title;
+            this.initialDirectory = initialDirectory;
+
+            return null;
+        }
+    }
+}
--- a/javafx-ui-common/test/unit/javafx/stage/PopupTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/stage/PopupTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -448,7 +448,7 @@
                             new KeyEvent(null, stage,
                                 KeyEvent.KEY_PRESSED, KeyEvent.CHAR_UNDEFINED,
                                 KeyCode.ESCAPE.getName(),
-                                KeyCode.ESCAPE.impl_getCode(),
+                                KeyCode.ESCAPE,
                                 false, false, false, false));
             assertEquals(0, keyEventCounter.getValue());
 
@@ -466,7 +466,7 @@
                                 KeyEvent.KEY_PRESSED,
                                 KeyEvent.CHAR_UNDEFINED,
                                 KeyCode.ESCAPE.getName(),
-                                KeyCode.ESCAPE.impl_getCode(),
+                                KeyCode.ESCAPE,
                                 false, false, false, false));
             assertEquals(1, keyEventCounter.getValue());
             
--- a/javafx-ui-common/test/unit/javafx/stage/StageTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/stage/StageTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -339,6 +339,32 @@
     }
 
     @Test
+    public void testMaximixedNotLostForAsyncNotifications() {
+        peer.holdNotifications();
+
+        s.setMaximized(true);
+        assertTrue(s.isMaximized());
+
+        s.setMaximized(false);
+        assertFalse(s.isMaximized());
+
+        peer.releaseSingleNotification();
+        assertTrue(s.isMaximized());
+
+        peer.releaseNotifications();
+
+        assertFalse(s.isMaximized());
+    }
+
+    @Test
+    public void testMaximizedNotification() {
+        peer.setMaximized(true);
+        assertTrue(s.isMaximized());
+        peer.setMaximized(false);
+        assertFalse(s.isMaximized());
+    }
+
+    @Test
     public void testBoundsSetAfterPeerIsRecreated() {
         s.setX(20);
         s.setY(50);
--- a/javafx-ui-common/test/unit/javafx/stage/Stage_builder_Test.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-common/test/unit/javafx/stage/Stage_builder_Test.java	Thu Jan 24 09:23:47 2013 -0800
@@ -89,6 +89,7 @@
 
         cfg.addProperty("fullScreen", false);
         cfg.addProperty("iconified", false);
+        cfg.addProperty("maximized", false);
         cfg.addProperty("minWidth", 1.0);
         cfg.addProperty("minHeight", 2.0);
         cfg.addProperty("maxWidth", 3.0);
--- a/javafx-ui-controls/test/javafx/scene/control/KeyEventFirer.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-controls/test/javafx/scene/control/KeyEventFirer.java	Thu Jan 24 09:23:47 2013 -0800
@@ -61,7 +61,7 @@
                 evtType,  // eventType
                 null,     // Character (unused unless KeyCode == KEY_TYPED
                 null,     // text
-                keyCode.impl_getCode(), // KeyCode
+                keyCode, // KeyCode
                 ml.contains(KeyModifier.SHIFT),                                   // shiftDown
                 ml.contains(KeyModifier.CTRL),                                    // ctrlDown
                 ml.contains(KeyModifier.ALT),                                     // altDown
--- a/javafx-ui-controls/test/javafx/scene/control/TabPaneTest.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/javafx-ui-controls/test/javafx/scene/control/TabPaneTest.java	Thu Jan 24 09:23:47 2013 -0800
@@ -8,6 +8,7 @@
 import static javafx.scene.control.ControlTestUtils.*;
 import com.sun.javafx.pgstub.StubToolkit;
 import com.sun.javafx.scene.control.skin.TabPaneSkin;
+import com.sun.javafx.scene.input.KeyCodeMap;
 import com.sun.javafx.tk.Toolkit;
 import javafx.application.Platform;
 import javafx.beans.property.BooleanProperty;
@@ -817,7 +818,7 @@
         stage.show();
         stage.requestFocus();
 
-        final KeyEvent tabEvent = new KeyEvent(KeyEvent.KEY_PRESSED, "", "", 0x09,
+        final KeyEvent tabEvent = new KeyEvent(KeyEvent.KEY_PRESSED, "", "", KeyCodeMap.valueOf(0x09),
                                                          false, false, false, false);
         Platform.runLater(new Runnable() {
             @Override public void run() {
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubPopupStage.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubPopupStage.java	Thu Jan 24 09:23:47 2013 -0800
@@ -42,6 +42,11 @@
     }
 
     @Override
+    public void setMaximized(boolean maximized) {
+        getNotificationSender().changedMaximized(maximized);
+    }
+
+    @Override
     public void setResizable(boolean resizable) {
         getNotificationSender().changedResizable(resizable);
     }
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubStage.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubStage.java	Thu Jan 24 09:23:47 2013 -0800
@@ -168,6 +168,11 @@
     }
 
     @Override
+    public void setMaximized(boolean maximized) {
+        notificationSender.changedMaximized(maximized);
+    }
+
+    @Override
     public void setResizable(boolean resizable) {
         notificationSender.changedResizable(resizable);
     }
@@ -392,6 +397,17 @@
         }
 
         @Override
+        public void changedMaximized(final boolean maximized) {
+            process(new Notification() {
+                        @Override
+                        public void execute(final TKStageListener listener) {
+                            listener.changedMaximized(maximized);
+                        }
+                    });
+        }
+
+
+        @Override
         public void changedResizable(final boolean resizable) {
             process(new Notification() {
                         @Override
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubToolkit.java	Wed Jan 23 11:39:06 2013 -0500
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubToolkit.java	Thu Jan 24 09:23:47 2013 -0800
@@ -827,13 +827,39 @@
         void enableDrop(TKDropTargetListener l);
     }
 
+    public interface CommonDialogsSupport {
+        List<File> showFileChooser(TKStage ownerWindow,
+                                   String title,
+                                   File initialDirectory,
+                                   String initialFileName,
+                                   FileChooserType fileChooserType,
+                                   List<ExtensionFilter> extensionFilters);
+
+        File showDirectoryChooser(TKStage ownerWindow,
+                                  String title,
+                                  File initialDirectory);
+    }
+
+    private CommonDialogsSupport commonDialogsSupport;
+    public void setCommonDialogsSupport(
+            final CommonDialogsSupport commonDialogsSupport) {
+        this.commonDialogsSupport = commonDialogsSupport;
+    }
+
     @Override
     public List<File> showFileChooser(TKStage ownerWindow,
                                       String title,
                                       File initialDirectory,
+                                      String initialFileName,
                                       FileChooserType fileChooserType,
                                       List<ExtensionFilter> extensionFilters) {
-        throw new UnsupportedOperationException("Not supported yet.");
+        return commonDialogsSupport.showFileChooser(
+                                        ownerWindow,
+                                        title,
+                                        initialDirectory,
+                                        initialFileName,
+                                        fileChooserType,
+                                        extensionFilters);
     }
 
 
@@ -841,7 +867,10 @@
     public File showDirectoryChooser(TKStage ownerWindow,
                                      String title,
                                      File initialDirectory) {
-        throw new UnsupportedOperationException("Not supported yet.");
+        return commonDialogsSupport.showDirectoryChooser(
+                                        ownerWindow,
+                                        title,
+                                        initialDirectory);
     }
 
     @Override