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

  1. import java.io.File;
  2. import java.net.URL;
  3. import mug.app.Command;
  4.  
  5. public class ImportImageMapFileCommand extends Command {
  6.    private MainShell _app;
  7.  
  8.    public ImportImageMapFileCommand(MainShell var1) {
  9.       this._app = var1;
  10.    }
  11.  
  12.    public void execute() {
  13.       File var1 = this._app.showFileDialog("Import Image Map", 0, new ImageFilenameFilter());
  14.       if (var1 != null) {
  15.          this._app.setBusy(true);
  16.          ImageMap var2 = (ImageMap)this._app.getDocument();
  17.          var2.import_(var1);
  18.          this._app.getMapCanvas().loadImage((URL)null, var2.getBaseFile(), var2.getImgSrc());
  19.          this._app.setBusy(false);
  20.          ((Command)this).executeNext();
  21.       }
  22.    }
  23. }
  24.