import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SpringLayout;
+import javax.swing.filechooser.FileFilter;
import javax.swing.plaf.basic.BasicFileChooserUI;
/**
includeBackupFiles = backupfilesCheckBox.isSelected();
Cache.setProperty(BackupFiles.NS + "_FC_INCLUDE",
String.valueOf(includeBackupFiles));
+
+ if (Platform.isAMac())
+ {
+ // This is a kludge. Cannot find out how to get the file list to
+ // refresh on its own! This works the best out of a number of
+ // different attempts!
+ FileFilter ff = jfc.getFileFilter();
+ jfc.setFileFilter(jfc.getAcceptAllFileFilter());
+ jfc.setFileFilter(ff);
+
+ /*
+ jfc.setFileHidingEnabled(!jfc.isFileHidingEnabled());
+ jfc.setFileHidingEnabled(!jfc.isFileHidingEnabled());
+ */
+
+ /*
+ jfc.getRootPane()
+ .paintImmediately(jfc.getRootPane().getBounds());
+ jfc.paintImmediately(jfc.getBounds());
+ */
+
+ /*
+ Object o = jfc.getClientProperty(
+ CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY);
+ jfc.firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY,
+ o, o);
+ */
+
+ /*
+ File f = jfc.getSelectedFile();
+ jfc.setSelectedFile(null);
+ if (f != null)
+ {
+ jfc.setSelectedFile(f);
+ }
+ */
+
+ /*
+ Graphics g = jfc.getGraphics();
+ jfc.update(g);
+ jfc.paintAll(g);
+ */
+
+ /*
+ jfc.setFileHidingEnabled(!jfc.isFileHidingEnabled());
+ jfc.setFileHidingEnabled(!jfc.isFileHidingEnabled());
+ */
+ /*
+ jfc.invalidate();
+ Component[] c = jfc.getComponents();
+ for (int i = 0; i < c.length; i++)
+ {
+ c[i].invalidate();
+ System.out.println("INVALIDATING " + c[i].getName());
+ }
+ */
+ }
+
jfc.rescanCurrentDirectory();
jfc.revalidate();
jfc.repaint();
- // This is a kludge. Cannot find out how to get the file list to
- // refresh!
- /*
- Object o = jfc.getClientProperty(
- CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY);
- jfc.firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY,
- o, o);
- */
}
});
}