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 / BasicTreeUI$TreeToggleAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.2 KB  |  33 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import javax.swing.AbstractAction;
  5. import javax.swing.tree.TreePath;
  6.  
  7. public class BasicTreeUI$TreeToggleAction extends AbstractAction {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$TreeToggleAction(BasicTreeUI var1, String var2) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void actionPerformed(ActionEvent var1) {
  16.       if (this.this$0.tree != null) {
  17.          int var2 = BasicTreeUI.access$1300(this.this$0);
  18.          if (var2 != -1 && !this.this$0.isLeaf(var2)) {
  19.             TreePath var3 = BasicTreeUI.access$1600(this.this$0);
  20.             TreePath var4 = BasicTreeUI.access$500(this.this$0);
  21.             this.this$0.toggleExpandState(this.this$0.getPathForRow(this.this$0.tree, var2));
  22.             BasicTreeUI.access$600(this.this$0, var3);
  23.             BasicTreeUI.access$700(this.this$0, var4);
  24.          }
  25.       }
  26.  
  27.    }
  28.  
  29.    public boolean isEnabled() {
  30.       return this.this$0.tree != null && this.this$0.tree.isEnabled();
  31.    }
  32. }
  33.