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 / JTextField$NotifyAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  580 b   |  26 lines

  1. package javax.swing;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import javax.swing.text.JTextComponent;
  5. import javax.swing.text.TextAction;
  6.  
  7. class JTextField$NotifyAction extends TextAction {
  8.    JTextField$NotifyAction() {
  9.       super("notify-field-accept");
  10.    }
  11.  
  12.    public void actionPerformed(ActionEvent var1) {
  13.       JTextComponent var2 = ((TextAction)this).getFocusedComponent();
  14.       if (var2 instanceof JTextField) {
  15.          JTextField var3 = (JTextField)var2;
  16.          var3.postActionEvent();
  17.       }
  18.  
  19.    }
  20.  
  21.    public boolean isEnabled() {
  22.       JTextComponent var1 = ((TextAction)this).getFocusedComponent();
  23.       return var1 instanceof JTextField ? ((JTextField)var1).hasActionListener() : false;
  24.    }
  25. }
  26.