Coder Social home page Coder Social logo

internet-download-manager's Introduction

Internet-Download-Manager

This is a prototype of a fully functional internet download manager which accepts an URL from the user and starts downloading content from that URL. Major Festures-
1.The GUI maintains a list of downloads that are currently being managed.
2.GUI contains Progress Bar to show the percentage of downloading completed.
3.GUI has buttons allowing user to add,pause,resume,cancel, and to clear a download.

Language Used : JAVA , the GUI has been made using swing.

This is the preview of the Download manager Application which can be used to download files

screenshot 21

Another Sceen shot

screenshot 22

Functionality

The Download Manager is broken into a few classes for natural separation of functional components. These are Download, DownloadsTableModel, ProgressRenderer and DownloadManager Classes.

  1. DownloadManager - Responsible for GUI interface and makes use of DownloadsTableModel and ProgressRenderer for displaying current list of downloads.
  2. Download - Represents "managed" download and is reponsible for actual downloading of a file.

The Download Class

The Download class is the workhorse of the Download Manager. Its primary purpose is to download a file and save that file's contents to disk. Each time a new download is added to the Download Manager, a new Download object is instantiated to handle the download. The Download Manager has the ability to download multiple files at once. To achieve this, it's necessary for each of the simultaneous downloads to run independently. It's also necessary for each individual download to manage its own state so that it can be reflected in the GUI. This is accomplished with the Download class. The entire code for Download is shown here. Notice that it extends Observable andimplements Runnable.

The ProgressRenderer Class

The ProgressRenderer class is a small utility class that is used to render the current progress of a download listed in the GUI's "Downloads" JTable instance. Normally, a JTable instance renders each cell's data as text. However, often it's particularly useful to render a cell's data as something other than text. In the Download Manager 's case, we want to render each ofthe table's Progress column cells as progress bars. The ProgressRenderer class shown here makes that possible. Notice that it extends JProgressBar and implements TableCellRenderer

The DownloadsTableModel Class

The DownloadsTableModel class houses the Download Manager's list of downloads and is the backing data source for the GUI's "Downloads" JTable instance. It extends AbstractTableModel and implements the obserever interface.

The DownloadManager Class

The DownloadManager class isresponsible for creating and running the Download Manager's GUI. This class has a main( )method declared, so on execution it will be invoked first. The main( ) method instantiates anew DownloadManager class instance and then calls its show( ) method, which causes it to be displayed. It extends JFrame and implements Observer.

Compiling Download Manager

Compile DonwloadManager like this
javac DownloadManager.java DownloadsTableModel.java ProgressRenderer.java Download.java

Running Donwload Manager

Run DownloadManager like this
javaw DownloadManager

Thank you! I hope you like this project :)

internet-download-manager's People

Contributors

utkarshkekre avatar

Forkers

zenith-78

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.