home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / swing / JComponent$ActionStandin.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.4 KB  |  76 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.    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.       if (this.actionListener == null) {
  46.          return false;
  47.       } else {
  48.          return this.action == null ? true : this.action.isEnabled();
  49.       }
  50.    }
  51.  
  52.    public void actionPerformed(ActionEvent var1) {
  53.       if (this.actionListener != null) {
  54.          this.actionListener.actionPerformed(var1);
  55.       }
  56.  
  57.    }
  58.  
  59.    public void putValue(String var1, Object var2) {
  60.    }
  61.  
  62.    public void setEnabled(boolean var1) {
  63.    }
  64.  
  65.    public void addPropertyChangeListener(PropertyChangeListener var1) {
  66.    }
  67.  
  68.    public void removePropertyChangeListener(PropertyChangeListener var1) {
  69.    }
  70.  
  71.    // $FF: synthetic method
  72.    static ActionListener access$000(JComponent$ActionStandin var0) {
  73.       return var0.actionListener;
  74.    }
  75. }
  76.