home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 May / PCO_5_97.ISO / FilesBBS / OS2 / CSIME.ARJ / CSIME.ZIP / csime / mug / app / CommandMenuItem.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-02-09  |  647 b   |  28 lines

  1. package mug.app;
  2.  
  3. import java.awt.MenuItem;
  4.  
  5. public class CommandMenuItem extends MenuItem {
  6.    private Command _cmd;
  7.  
  8.    public CommandMenuItem(String var1, Command var2) {
  9.       super(var1);
  10.       this._cmd = var2;
  11.    }
  12.  
  13.    public void execute() {
  14.       if (this._cmd != null) {
  15.          this._cmd.execute();
  16.       }
  17.  
  18.    }
  19.  
  20.    public Command getCommand() {
  21.       return this._cmd;
  22.    }
  23.  
  24.    public void setCommand(Command var1) {
  25.       this._cmd = var1;
  26.    }
  27. }
  28.