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

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.Rectangle;
  4. import java.awt.event.FocusEvent;
  5. import java.awt.event.FocusListener;
  6.  
  7. public class BasicTableUI$FocusHandler implements FocusListener {
  8.    // $FF: synthetic field
  9.    private final BasicTableUI this$0;
  10.  
  11.    public BasicTableUI$FocusHandler(BasicTableUI var1) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    private void repaintAnchorCell() {
  16.       int var1 = this.this$0.table.getRowCount();
  17.       int var2 = this.this$0.table.getColumnCount();
  18.       int var3 = this.this$0.table.getSelectionModel().getAnchorSelectionIndex();
  19.       int var4 = this.this$0.table.getColumnModel().getSelectionModel().getAnchorSelectionIndex();
  20.       if (var3 >= 0 && var3 < var1 && var4 >= 0 && var4 < var2) {
  21.          Rectangle var5 = this.this$0.table.getCellRect(var3, var4, false);
  22.          this.this$0.table.repaint(var5);
  23.       }
  24.    }
  25.  
  26.    public void focusGained(FocusEvent var1) {
  27.       this.repaintAnchorCell();
  28.    }
  29.  
  30.    public void focusLost(FocusEvent var1) {
  31.       this.repaintAnchorCell();
  32.    }
  33. }
  34.