home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / plaf / basic / BasicFileChooserUI$NewFolderAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.5 KB  |  35 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import java.io.File;
  5. import java.io.IOException;
  6. import javax.swing.AbstractAction;
  7. import javax.swing.JFileChooser;
  8. import javax.swing.JOptionPane;
  9.  
  10. public class BasicFileChooserUI$NewFolderAction extends AbstractAction {
  11.    // $FF: synthetic field
  12.    private final BasicFileChooserUI this$0;
  13.  
  14.    protected BasicFileChooserUI$NewFolderAction(BasicFileChooserUI var1) {
  15.       super("New Folder");
  16.       this.this$0 = var1;
  17.    }
  18.  
  19.    public void actionPerformed(ActionEvent var1) {
  20.       JFileChooser var2 = this.this$0.getFileChooser();
  21.       File var3 = var2.getCurrentDirectory();
  22.       Object var4 = null;
  23.  
  24.       try {
  25.          var7 = var2.getFileSystemView().createNewFolder(var3);
  26.       } catch (IOException var6) {
  27.          JOptionPane.showMessageDialog(var2, BasicFileChooserUI.access$000(this.this$0) + BasicFileChooserUI.access$100(this.this$0) + var6, BasicFileChooserUI.access$000(this.this$0), 0);
  28.          return;
  29.       }
  30.  
  31.       var2.rescanCurrentDirectory();
  32.       var2.ensureFileIsVisible(var7);
  33.    }
  34. }
  35.