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 / JComponent$ActionStandin.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.4 KB  |  69 lines

  1. package javax.swing;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import java.awt.event.ActionListener;
  5. import java.beans.PropertyChangeListener;
  6.  
  7. final class JComponent$ActionStandin implements Action {
  8.    private final ActionListener actionListener;
  9.    private final String command;
  10.    private final Action action;
  11.    // $FF: synthetic field
  12.    private final JComponent this$0;
  13.  
  14.    JComponent$ActionStandin(JComponent var1, ActionListener var2, String var3) {
  15.       this.this$0 = var1;
  16.       this.actionListener = var2;
  17.       if (var2 instanceof Action) {
  18.          this.action = (Action)var2;
  19.       } else {
  20.          this.action = null;
  21.       }
  22.  
  23.       this.command = var3;
  24.    }
  25.  
  26.    public Object getValue(String var1) {
  27.       if (var1 != null) {
  28.          if (var1.equals("ActionCommandKey")) {
  29.             return this.command;
  30.          }
  31.  
  32.          if (this.action != null) {
  33.             return this.action.getValue(var1);
  34.          }
  35.  
  36.          if (var1.equals("Name")) {
  37.             return "ActionStandin";
  38.          }
  39.       }
  40.  
  41.       return null;
  42.    }
  43.  
  44.    public boolean isEnabled() {
  45.       return this.action == null ? true : this.action.isEnabled();
  46.    }
  47.  
  48.    public void actionPerformed(ActionEvent var1) {
  49.       this.actionListener.actionPerformed(var1);
  50.    }
  51.  
  52.    public void putValue(String var1, Object var2) {
  53.    }
  54.  
  55.    public void setEnabled(boolean var1) {
  56.    }
  57.  
  58.    public void addPropertyChangeListener(PropertyChangeListener var1) {
  59.    }
  60.  
  61.    public void removePropertyChangeListener(PropertyChangeListener var1) {
  62.    }
  63.  
  64.    // $FF: synthetic method
  65.    static ActionListener access$000(JComponent$ActionStandin var0) {
  66.       return var0.actionListener;
  67.    }
  68. }
  69.