home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / DefaultCellEditor$EditorDelegate.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  61 lines

  1. package javax.swing;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import java.awt.event.ActionListener;
  5. import java.awt.event.ItemEvent;
  6. import java.awt.event.ItemListener;
  7. import java.awt.event.MouseEvent;
  8. import java.io.Serializable;
  9. import java.util.EventObject;
  10.  
  11. public class DefaultCellEditor$EditorDelegate implements ActionListener, ItemListener, Serializable {
  12.    protected Object value;
  13.    // $FF: synthetic field
  14.    private final DefaultCellEditor this$0;
  15.  
  16.    protected DefaultCellEditor$EditorDelegate(DefaultCellEditor var1) {
  17.       this.this$0 = var1;
  18.    }
  19.  
  20.    public Object getCellEditorValue() {
  21.       return this.value;
  22.    }
  23.  
  24.    public void setValue(Object var1) {
  25.       this.value = var1;
  26.    }
  27.  
  28.    public boolean isCellEditable(EventObject var1) {
  29.       if (var1 instanceof MouseEvent) {
  30.          return ((MouseEvent)var1).getClickCount() >= this.this$0.clickCountToStart;
  31.       } else {
  32.          return true;
  33.       }
  34.    }
  35.  
  36.    public boolean shouldSelectCell(EventObject var1) {
  37.       return true;
  38.    }
  39.  
  40.    public boolean startCellEditing(EventObject var1) {
  41.       return true;
  42.    }
  43.  
  44.    public boolean stopCellEditing() {
  45.       this.this$0.fireEditingStopped();
  46.       return true;
  47.    }
  48.  
  49.    public void cancelCellEditing() {
  50.       this.this$0.fireEditingCanceled();
  51.    }
  52.  
  53.    public void actionPerformed(ActionEvent var1) {
  54.       this.this$0.stopCellEditing();
  55.    }
  56.  
  57.    public void itemStateChanged(ItemEvent var1) {
  58.       this.this$0.stopCellEditing();
  59.    }
  60. }
  61.