~helioviewer/jhelioviewer/trunk

« back to all changes in this revision

Viewing changes to src/jhv/src/org/helioviewer/jhv/io/FileDownloader.java

  • Committer: Daniel Mueller
  • Date: 2014-03-18 09:37:47 UTC
  • mfrom: (499.1.9 stereo-masks)
  • Revision ID: daniel.mueller@esa.int-20140318093747-b3uggn7qj1xe6wz1
Merged Andre's stereo-masks branch into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package org.helioviewer.jhv.io;
2
2
 
 
3
import java.awt.Dimension;
3
4
import java.awt.FlowLayout;
 
5
import java.awt.Point;
4
6
import java.awt.event.ActionEvent;
5
7
import java.awt.event.ActionListener;
6
8
import java.io.File;
13
15
 
14
16
import javax.swing.BorderFactory;
15
17
import javax.swing.JButton;
 
18
import javax.swing.JPanel;
16
19
import javax.swing.JProgressBar;
17
20
import javax.swing.JWindow;
18
21
 
210
213
        // set up progress bar and progress label
211
214
        this.progressBar = progressBar;
212
215
        progressBar.setName("Downloading '" + source.getPath().substring(source.getPath().lastIndexOf("/") + 1) + "'...");
213
 
 
214
216
        // download the file
215
217
        return downloadFile(source, dest);
216
218
    }
347
349
            add(cmdCancel);
348
350
 
349
351
            setSize(getPreferredSize());
 
352
            JPanel mainPanel = ImageViewerGui.getSingletonInstance().getMainImagePanel();
 
353
            Point mainImagePanelLocation = mainPanel.getLocationOnScreen();
 
354
            Dimension mainImagePanelSize = mainPanel.getSize();
 
355
            int x = mainImagePanelLocation.x + mainImagePanelSize.width - getSize().width - 4;
 
356
            int y = mainImagePanelLocation.y + 2;
 
357
            setLocation(x, y);
350
358
        }
351
359
 
352
360
        /**