changeset 12830:605ab377eed1

8138674: Some platforms may not support showing the user-specified title in a file dialog Reviewed-by: serb
author alexsch
date Fri, 02 Oct 2015 10:29:36 +0400
parents 1ca9365c8173
children 6fa168f3c0c0
files src/java.desktop/share/classes/java/awt/FileDialog.java
diffstat 1 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/java/awt/FileDialog.java	Wed Sep 30 17:46:11 2015 +0400
+++ b/src/java.desktop/share/classes/java/awt/FileDialog.java	Fri Oct 02 10:29:36 2015 +0400
@@ -174,6 +174,12 @@
      * Creates a file dialog for loading a file.  The title of the
      * file dialog is initially empty.  This is a convenience method for
      * <code>FileDialog(parent, "", LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param parent the owner of the dialog
      * @since 1.1
@@ -187,6 +193,12 @@
      * a file. The files shown are those in the current directory.
      * This is a convenience method for
      * <code>FileDialog(parent, title, LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog
@@ -204,6 +216,12 @@
      * in the current directory.   If the value of
      * <code>mode</code> is <code>SAVE</code>, the file dialog is finding
      * a place to write a file.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title   the title of the dialog
@@ -224,6 +242,12 @@
      * Creates a file dialog for loading a file.  The title of the
      * file dialog is initially empty.  This is a convenience method for
      * <code>FileDialog(parent, "", LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @exception java.lang.IllegalArgumentException if the <code>parent</code>'s
@@ -245,6 +269,12 @@
      * a file. The files shown are those in the current directory.
      * This is a convenience method for
      * <code>FileDialog(parent, title, LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog; a <code>null</code> value
@@ -273,6 +303,12 @@
      * in the current directory.   If the value of
      * <code>mode</code> is <code>SAVE</code>, the file dialog is finding
      * a place to write a file.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog; a <code>null</code> value
@@ -300,6 +336,22 @@
         setLayout(null);
     }
 
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
+     */
+    @Override
+    public void setTitle(String title) {
+        super.setTitle(title);
+    }
+
+
     /**
      * Constructs a name for this component. Called by <code>getName()</code>
      * when the name is <code>null</code>.