home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / plaf / basic / BasicTreeUI$TreeExtendSelectionAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  1.4 KB  |  39 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. class BasicTreeUI$TreeExtendSelectionAction extends AbstractAction {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$TreeExtendSelectionAction(BasicTreeUI var1, String var2) {
  12.       super(var2);
  13.       this.this$0 = var1;
  14.    }
  15.  
  16.    public void actionPerformed(ActionEvent var1) {
  17.       if (this.this$0.tree != null && this.this$0.getRowCount(this.this$0.tree) > 0) {
  18.          int var2 = BasicTreeUI.access$5(this.this$0);
  19.          if (var2 != -1) {
  20.             TreePath var3 = BasicTreeUI.access$4(this.this$0);
  21.             TreePath var4 = BasicTreeUI.access$9(this.this$0);
  22.             int var5 = this.this$0.getRowForPath(this.this$0.tree, var4);
  23.             if (var5 == -1) {
  24.                var5 = 0;
  25.             }
  26.  
  27.             this.this$0.tree.setSelectionInterval(var5, var2);
  28.             BasicTreeUI.access$3(this.this$0, var3);
  29.             BasicTreeUI.access$2(this.this$0, var4);
  30.          }
  31.       }
  32.  
  33.    }
  34.  
  35.    public boolean isEnabled() {
  36.       return this.this$0.tree != null && this.this$0.tree.isEnabled();
  37.    }
  38. }
  39.