Ignore:
Timestamp:
Jan 23, 2013, 12:43:13 PM (12 years ago)
Author:
alloc
Message:

AEI2 0.99c:

  • Download window: Show which file is currently being downloaded and if it is an automaticly resolved dependency
  • Added mandatory packages dialog
  • Added option to show automatic resolved dependencies after installation is done instead of interrupting installation process to ask whether to continue
  • ToolManager: version number + last change added
  • Correct output of download-size in mainwin after installation of mods done
Location:
AE/installer2/src/net/oni2/aeinstaller/gui/downloadwindow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • AE/installer2/src/net/oni2/aeinstaller/gui/downloadwindow/Downloader.java

    r638 r646  
    3131        private BuildResult result = SwingJavaBuilder.build(this, bundle);
    3232
     33        private JLabel lblNameVal;
     34        private JLabel lblIsDep;
    3335        private JLabel lblElapsedVal;
    3436        private JLabel lblRemainingVal;
     
    3739        private JLabel lblRateVal;
    3840        private JProgressBar progress;
    39        
     41
    4042        private JButton btnAbort;
    4143
    4244        private ModDownloader downloader;
     45        private TreeSet<Mod> dependencies = new TreeSet<Mod>();
    4346
    4447        /**
    4548         * @param mods
    4649         *            Mods to download
     50         * @param dependencies
     51         *            List of mods that only are auto-resolved dependencies
    4752         */
    48         public Downloader(TreeSet<Mod> mods) {
     53        public Downloader(TreeSet<Mod> mods, TreeSet<Mod> dependencies) {
    4954                super();
    5055
    5156                setResizable(false);
    5257                setSize(500, (int) getSize().getHeight());
     58
     59                if (dependencies != null)
     60                        this.dependencies = dependencies;
    5361
    5462                downloader = new ModDownloader(mods, this);
     
    8492
    8593        @Override
    86         public void updateStatus(ModDownloader source, State state, int filesDown,
    87                         int filesTotal, int bytesDown, int bytesTotal, int duration,
    88                         int remaining, int speed) {
     94        public void updateStatus(ModDownloader source, Mod currentDownload,
     95                        State state, int filesDown, int filesTotal, int bytesDown,
     96                        int bytesTotal, int duration, int remaining, int speed) {
    8997                if (state == ModDownloader.State.FINISHED) {
    9098                        close();
     
    92100                        if (state == State.LAST_FILE_DOWNLOADED)
    93101                                btnAbort.setEnabled(false);
    94                        
     102
    95103                        progress.setValue(bytesDown);
    96104                        progress.setToolTipText(String.format("%d / %d files downloaded",
    97105                                        filesDown, filesTotal));
     106
     107                        if (currentDownload != null) {
     108                                lblNameVal.setText(currentDownload.getName());
     109                                lblIsDep.setVisible(dependencies.contains(currentDownload));
     110                        } else {
     111                                lblNameVal.setText(bundle.getString("unpacking"));
     112                                lblIsDep.setVisible(false);
     113                        }
    98114
    99115                        lblElapsedVal.setText(formatTime(duration));
  • AE/installer2/src/net/oni2/aeinstaller/gui/downloadwindow/Downloader.yml

    r605 r646  
    1010  content:
    1111    - JButton(name=btnAbort, text=btnAbort.title, icon=img.stop, onAction=[confirm,close])
     12    - JLabel(name=lblName, text=lblName.title)
     13    - JLabel(name=lblNameVal, font=14pt)
     14    - JLabel(name=lblIsDep, text=lblIsDep.title, foreground=darkred, visible=false)
    1215    - JLabel(name=lblElapsed, text=lblElapsed.title)
    1316    - JLabel(name=lblElapsedVal)
     
    2326    - MigLayout: |
    2427         [grow]
     28         lblName<,lblNameVal<,lblIsDep<                                  [min]
    2529         lblElapsed=1,lblElapsedVal=2,lblRemaining=1,lblRemainingVal=2   [min]
    2630         lblDownloaded=1,lblDownloadedVal=2,lblTotal=1,lblTotalVal=2     [min]
Note: See TracChangeset for help on using the changeset viewer.