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

  1. import java.awt.Window;
  2. import mug.app.Command;
  3. import mug.ui.Callback;
  4. import mug.ui.MultipleChoiceDialog;
  5.  
  6. public class ChooseImageCommand extends Command implements Callback {
  7.    private MainShell _app;
  8.  
  9.    public ChooseImageCommand(MainShell var1) {
  10.       this._app = var1;
  11.    }
  12.  
  13.    public void execute() {
  14.       String[] var1 = new String[]{"File", "URL", "None"};
  15.       MultipleChoiceDialog var2 = new MultipleChoiceDialog(this._app, "New", false, "Load image (GIF, JPEG) from:", var1, this);
  16.       ((Window)var2).show();
  17.    }
  18.  
  19.    public void execute(Object var1, Object var2) {
  20.       if (((String)var2).equals("File")) {
  21.          ((Command)this).executeNext(new LoadImageFileCommand(this._app));
  22.       } else if (((String)var2).equals("URL")) {
  23.          ((Command)this).executeNext(new LoadImageURLCommand(this._app));
  24.       } else {
  25.          if (((String)var2).equals("None")) {
  26.             ((Command)this).executeNext();
  27.          }
  28.  
  29.       }
  30.    }
  31. }
  32.