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

  1. package javax.swing.plaf.basic;
  2.  
  3. import javax.swing.event.ListSelectionEvent;
  4. import javax.swing.event.ListSelectionListener;
  5.  
  6. public class BasicListUI$ListSelectionHandler implements ListSelectionListener {
  7.    // $FF: synthetic field
  8.    private final BasicListUI this$0;
  9.  
  10.    public BasicListUI$ListSelectionHandler(BasicListUI var1) {
  11.       this.this$0 = var1;
  12.    }
  13.  
  14.    public void valueChanged(ListSelectionEvent var1) {
  15.       this.this$0.maybeUpdateLayoutState();
  16.       int var2 = this.this$0.convertRowToY(var1.getFirstIndex());
  17.       int var3 = this.this$0.convertRowToY(var1.getLastIndex());
  18.       if (var2 != -1 && var3 != -1) {
  19.          var3 += this.this$0.getRowHeight(var1.getLastIndex());
  20.          this.this$0.list.repaint(0, var2, this.this$0.list.getWidth(), var3 - var2);
  21.       } else {
  22.          this.this$0.list.repaint(0, 0, this.this$0.list.getWidth(), this.this$0.list.getHeight());
  23.       }
  24.  
  25.    }
  26. }
  27.