public void propertyChange(PropertyChangeEvent e) { String prop = e.getPropertyName(); if (prop == JFileChooser.DIRECTORY_CHANGED_PROPERTY || prop == JFileChooser.FILE_VIEW_CHANGED_PROPERTY || prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY || prop == JFileChooser.FILE_HIDING_CHANGED_PROPERTY || prop == JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY) { validateFileCache(); } else if ("UI".equals(prop)) { Object old = e.getOldValue(); if (old instanceof BasicFileChooserUI) { BasicFileChooserUI ui = (BasicFileChooserUI) old; BasicDirectoryModel model = ui.getModel(); if (model != null) { model.invalidateFileCache(); } } } else if ("JFileChooserDialogIsClosingProperty".equals(prop)) { invalidateFileCache(); } }
protected void installStrings(JFileChooser fc) { super.installStrings(fc); Locale l = fc.getLocale(); enterFileNameLabelText = UIManager.getString("FileChooser.enterFileNameLabelText", l); enterFileNameLabelMnemonic = UIManager.getInt("FileChooser.enterFileNameLabelMnemonic"); filesLabelText = UIManager.getString("FileChooser.filesLabelText", l); filesLabelMnemonic = UIManager.getInt("FileChooser.filesLabelMnemonic"); foldersLabelText = UIManager.getString("FileChooser.foldersLabelText", l); foldersLabelMnemonic = UIManager.getInt("FileChooser.foldersLabelMnemonic"); pathLabelText = UIManager.getString("FileChooser.pathLabelText", l); pathLabelMnemonic = UIManager.getInt("FileChooser.pathLabelMnemonic"); filterLabelText = UIManager.getString("FileChooser.filterLabelText", l); filterLabelMnemonic = UIManager.getInt("FileChooser.filterLabelMnemonic"); }
public void uninstallUI(JComponent c) { getFileChooser().removeAll(); super.uninstallUI(c); }
public void installUI(JComponent c) { super.installUI(c); }