home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.metal;
-
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
- import java.io.File;
- import javax.swing.JComponent;
- import javax.swing.JFileChooser;
- import javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel;
-
- final class MetalFileChooserUI$3 implements PropertyChangeListener {
- // $FF: synthetic field
- private final MetalFileChooserUI this$0;
-
- // $FF: synthetic method
- MetalFileChooserUI$3(MetalFileChooserUI var1) {
- this.this$0 = var1;
- }
-
- public void propertyChange(PropertyChangeEvent var1) {
- String var2 = var1.getPropertyName();
- if (var2.equals("SelectedFileChangedProperty")) {
- MetalFileChooserUI.access$0(this.this$0);
- File var3 = (File)var1.getNewValue();
- if (var3 != null) {
- this.this$0.setFileName(this.this$0.getFileChooser().getName(var3));
- if (this.this$0.getModel().contains(var3)) {
- MetalFileChooserUI.access$1(this.this$0).setSelectedIndex(this.this$0.getModel().indexOf(var1.getNewValue()));
- MetalFileChooserUI.access$1(this.this$0).ensureIndexIsVisible(MetalFileChooserUI.access$1(this.this$0).getSelectedIndex());
- }
- }
- } else if (var2.equals("directoryChanged")) {
- MetalFileChooserUI.access$0(this.this$0);
- this.this$0.clearIconCache();
- MetalFileChooserUI.access$1(this.this$0).clearSelection();
- File var4 = this.this$0.getFileChooser().getCurrentDirectory();
- if (var4 != null) {
- DirectoryComboBoxModel.access$0(MetalFileChooserUI.access$2(this.this$0), var4);
- this.this$0.getNewFolderAction().setEnabled(var4.canWrite());
- }
- } else if (var2.equals("fileSelectionChanged")) {
- this.this$0.clearIconCache();
- MetalFileChooserUI.access$1(this.this$0).clearSelection();
- } else if (var2 == "AccessoryChangedProperty") {
- if (this.this$0.getAccessoryPanel() != null) {
- if (var1.getOldValue() != null) {
- this.this$0.getAccessoryPanel().remove((JComponent)var1.getOldValue());
- }
-
- JComponent var5 = (JComponent)var1.getNewValue();
- if (var5 != null) {
- this.this$0.getAccessoryPanel().add(var5, "Center");
- }
- }
- } else if (var2 != "ApproveButtonTextChangedProperty" && var2 != "DialogTypeChangedProperty") {
- if (var2.equals("ApproveButtonMnemonicChangedProperty")) {
- MetalFileChooserUI.access$3(this.this$0).setMnemonic(this.this$0.getApproveButtonMnemonic(this.this$0.getFileChooser()));
- }
- } else {
- JFileChooser var6 = this.this$0.getFileChooser();
- MetalFileChooserUI.access$3(this.this$0).setText(this.this$0.getApproveButtonText(var6));
- MetalFileChooserUI.access$3(this.this$0).setToolTipText(this.this$0.getApproveButtonToolTipText(var6));
- MetalFileChooserUI.access$3(this.this$0).setMnemonic(this.this$0.getApproveButtonMnemonic(var6));
- }
-
- }
- }
-