home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / plaf / basic / BasicTreeUI$FocusHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  1.1 KB  |  34 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.FocusEvent;
  4. import java.awt.event.FocusListener;
  5. import javax.swing.tree.TreePath;
  6.  
  7. public class BasicTreeUI$FocusHandler implements FocusListener {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$FocusHandler(BasicTreeUI var1) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void focusGained(FocusEvent var1) {
  16.       if (this.this$0.tree != null) {
  17.          TreePath var2 = this.this$0.tree.getLeadSelectionPath();
  18.          if (var2 != null) {
  19.             this.this$0.tree.repaint(this.this$0.getPathBounds(this.this$0.tree, var2));
  20.          }
  21.  
  22.          var2 = BasicTreeUI.access$4(this.this$0);
  23.          if (var2 != null) {
  24.             this.this$0.tree.repaint(this.this$0.getPathBounds(this.this$0.tree, var2));
  25.          }
  26.       }
  27.  
  28.    }
  29.  
  30.    public void focusLost(FocusEvent var1) {
  31.       this.focusGained(var1);
  32.    }
  33. }
  34.