home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Rectangle;
- import java.awt.event.FocusEvent;
- import java.awt.event.FocusListener;
-
- public class BasicTableUI$FocusHandler implements FocusListener {
- // $FF: synthetic field
- private final BasicTableUI this$0;
-
- public BasicTableUI$FocusHandler(BasicTableUI var1) {
- this.this$0 = var1;
- }
-
- public void focusGained(FocusEvent var1) {
- if (this.this$0.table.getRowCount() > 0) {
- if (this.this$0.table.getSelectedColumn() == -1) {
- this.this$0.table.setColumnSelectionInterval(0, 0);
- }
-
- if (this.this$0.table.getSelectedRow() == -1) {
- this.this$0.table.setRowSelectionInterval(0, 0);
- }
-
- this.repaintAnchorCell();
- }
- }
-
- public void focusLost(FocusEvent var1) {
- this.repaintAnchorCell();
- }
-
- private void repaintAnchorCell() {
- int var1 = this.this$0.table.getSelectedRow();
- int var2 = this.this$0.table.getSelectedColumn();
- Rectangle var3 = this.this$0.table.getCellRect(var1, var2, false);
- this.this$0.table.repaint(var3);
- }
- }
-