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

  1. import java.awt.Window;
  2. import java.io.File;
  3. import java.net.URL;
  4. import mug.app.Command;
  5. import mug.ui.Callback;
  6. import mug.ui.TextFieldDialog;
  7.  
  8. public class LoadImageURLCommand extends Command implements Callback {
  9.    private MainShell _app;
  10.  
  11.    public LoadImageURLCommand(MainShell var1) {
  12.       this._app = var1;
  13.    }
  14.  
  15.    public void execute() {
  16.       TextFieldDialog var1 = new TextFieldDialog(this._app, "Load Image URL", false, "Image URL", 40, this);
  17.       ((Window)var1).show();
  18.    }
  19.  
  20.    public void execute(Object var1, Object var2) {
  21.       String var3 = (String)var2;
  22.       if (var3 != null) {
  23.          this._app.setBusy(true);
  24.          this._app.getMapCanvas().loadImage((URL)null, (File)null, var3);
  25.          this._app.setBusy(false);
  26.          ((Command)this).executeNext();
  27.       }
  28.    }
  29. }
  30.