home *** CD-ROM | disk | FTP | other *** search
- package sun.swing;
-
- import java.awt.event.ActionEvent;
- import javax.swing.AbstractAction;
- import javax.swing.JFileChooser;
-
- class FilePane$1FilePaneAction extends AbstractAction {
- // $FF: synthetic field
- final FilePane this$0;
-
- FilePane$1FilePaneAction(FilePane var1, String var2) {
- this(var1, var2, var2);
- }
-
- FilePane$1FilePaneAction(FilePane var1, String var2, String var3) {
- super(var2);
- this.this$0 = var1;
- this.putValue("ActionCommandKey", var3);
- }
-
- public void actionPerformed(ActionEvent var1) {
- String var2 = (String)this.getValue("ActionCommandKey");
- if (var2 == "cancelSelection") {
- if (this.this$0.editFile != null) {
- FilePane.access$200(this.this$0);
- } else {
- this.this$0.getFileChooser().cancelSelection();
- }
- } else if (var2 == "editFileName") {
- JFileChooser var3 = this.this$0.getFileChooser();
- int var4 = FilePane.access$300(this.this$0).getMinSelectionIndex();
- if (var4 >= 0 && this.this$0.editFile == null && (!var3.isMultiSelectionEnabled() || var3.getSelectedFiles().length <= 1)) {
- FilePane.access$400(this.this$0, var4);
- }
- } else if (var2 == "refresh") {
- this.this$0.getFileChooser().rescanCurrentDirectory();
- }
-
- }
-
- public boolean isEnabled() {
- String var1 = (String)this.getValue("ActionCommandKey");
- if (var1 == "cancelSelection") {
- return this.this$0.getFileChooser().isEnabled();
- } else if (var1 != "editFileName") {
- return true;
- } else {
- return !FilePane.access$500(this.this$0) && this.this$0.getFileChooser().isEnabled();
- }
- }
- }
-