jdk/src/share/classes/javax/swing/JFileChooser.java
changeset 7961 252a7e8c37c1
parent 5506 202f599c92aa
child 9035 1255eb81cc2f
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java	Thu Jan 13 20:12:45 2011 +0300
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java	Mon Jan 17 19:14:58 2011 +0300
@@ -256,10 +256,6 @@
 
     private FileView fileView = null;
 
-    // uiFileView is not serialized, as it is initialized
-    // by updateUI() after deserialization
-    private transient FileView uiFileView = null;
-
     private boolean controlsShown = true;
 
     private boolean useFileHiding = true;
@@ -1504,6 +1500,9 @@
             if(getFileView() != null) {
                 filename = getFileView().getName(f);
             }
+
+            FileView uiFileView = getUI().getFileView(this);
+
             if(filename == null && uiFileView != null) {
                 filename = uiFileView.getName(f);
             }
@@ -1524,6 +1523,9 @@
             if(getFileView() != null) {
                 description = getFileView().getDescription(f);
             }
+
+            FileView uiFileView = getUI().getFileView(this);
+
             if(description == null && uiFileView != null) {
                 description = uiFileView.getDescription(f);
             }
@@ -1544,6 +1546,9 @@
             if(getFileView() != null) {
                 typeDescription = getFileView().getTypeDescription(f);
             }
+
+            FileView uiFileView = getUI().getFileView(this);
+
             if(typeDescription == null && uiFileView != null) {
                 typeDescription = uiFileView.getTypeDescription(f);
             }
@@ -1564,6 +1569,9 @@
             if(getFileView() != null) {
                 icon = getFileView().getIcon(f);
             }
+
+            FileView uiFileView = getUI().getFileView(this);
+
             if(icon == null && uiFileView != null) {
                 icon = uiFileView.getIcon(f);
             }
@@ -1584,6 +1592,9 @@
             if (getFileView() != null) {
                 traversable = getFileView().isTraversable(f);
             }
+
+            FileView uiFileView = getUI().getFileView(this);
+
             if (traversable == null && uiFileView != null) {
                 traversable = uiFileView.isTraversable(f);
             }
@@ -1791,7 +1802,6 @@
         }
         setUI(ui);
 
-        uiFileView = getUI().getFileView(this);
         if(isAcceptAllFileFilterUsed()) {
             addChoosableFileFilter(getAcceptAllFileFilter());
         }