Skip to content

Commit 8ed9b27

Browse files
committed
Java Download Manager With GUI
1 parent d097017 commit 8ed9b27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2331
-0
lines changed

JDM/build.xml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- You may freely edit this file. See commented blocks below for -->
3+
<!-- some examples of how to customize the build. -->
4+
<!-- (If you delete it and reopen the project it will be recreated.) -->
5+
<!-- By default, only the Clean and Build commands use this build script. -->
6+
<!-- Commands such as Run, Debug, and Test only use this build script if -->
7+
<!-- the Compile on Save feature is turned off for the project. -->
8+
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9+
<!-- in the project's Project Properties dialog box.-->
10+
<project name="JDM" default="default" basedir=".">
11+
<description>Builds, tests, and runs the project JDM.</description>
12+
<import file="nbproject/build-impl.xml"/>
13+
<!--
14+
15+
There exist several targets which are by default empty and which can be
16+
used for execution of your tasks. These targets are usually executed
17+
before and after some main targets. They are:
18+
19+
-pre-init: called before initialization of project properties
20+
-post-init: called after initialization of project properties
21+
-pre-compile: called before javac compilation
22+
-post-compile: called after javac compilation
23+
-pre-compile-single: called before javac compilation of single file
24+
-post-compile-single: called after javac compilation of single file
25+
-pre-compile-test: called before javac compilation of JUnit tests
26+
-post-compile-test: called after javac compilation of JUnit tests
27+
-pre-compile-test-single: called before javac compilation of single JUnit test
28+
-post-compile-test-single: called after javac compilation of single JUunit test
29+
-pre-jar: called before JAR building
30+
-post-jar: called after JAR building
31+
-post-clean: called after cleaning build products
32+
33+
(Targets beginning with '-' are not intended to be called on their own.)
34+
35+
Example of inserting an obfuscator after compilation could look like this:
36+
37+
<target name="-post-compile">
38+
<obfuscate>
39+
<fileset dir="${build.classes.dir}"/>
40+
</obfuscate>
41+
</target>
42+
43+
For list of available properties check the imported
44+
nbproject/build-impl.xml file.
45+
46+
47+
Another way to customize the build is by overriding existing main targets.
48+
The targets of interest are:
49+
50+
-init-macrodef-javac: defines macro for javac compilation
51+
-init-macrodef-junit: defines macro for junit execution
52+
-init-macrodef-debug: defines macro for class debugging
53+
-init-macrodef-java: defines macro for class execution
54+
-do-jar: JAR building
55+
run: execution of project
56+
-javadoc-build: Javadoc generation
57+
test-report: JUnit report generation
58+
59+
An example of overriding the target for project execution could look like this:
60+
61+
<target name="run" depends="JDM-impl.jar">
62+
<exec dir="bin" executable="launcher.exe">
63+
<arg file="${dist.jar}"/>
64+
</exec>
65+
</target>
66+
67+
Notice that the overridden target depends on the jar target and not only on
68+
the compile target as the regular run target does. Again, for a list of available
69+
properties which you can use, check the target you are overriding in the
70+
nbproject/build-impl.xml file.
71+
72+
-->
73+
</project>

JDM/build/classes/.netbeans_automatic_build

Whitespace-only changes.

JDM/build/classes/.netbeans_update_resources

Whitespace-only changes.

JDM/build/classes/images/Icon.png

46 KB
8.43 KB
8.53 KB
9.31 KB
9.34 KB
10.7 KB

JDM/build/classes/images/cancel.png

4.44 KB

JDM/build/classes/images/delete.png

4.98 KB

JDM/build/classes/images/favicon.png

2.21 KB

JDM/build/classes/images/favicons.png

667 Bytes
4.9 KB

JDM/build/classes/images/pause.png

4.74 KB

JDM/build/classes/images/resume.png

4.93 KB

JDM/build/classes/images/setting.png

4.54 KB
814 Bytes
Binary file not shown.
1.37 KB
Binary file not shown.

JDM/build/classes/jdm/JDM.class

800 Bytes
Binary file not shown.

JDM/build/classes/jdm/JDMWindow.class

428 Bytes
Binary file not shown.

JDM/build/classes/jdm/MyButton.class

755 Bytes
Binary file not shown.
821 Bytes
Binary file not shown.
791 Bytes
Binary file not shown.
1.66 KB
Binary file not shown.
857 Bytes
Binary file not shown.
865 Bytes
Binary file not shown.
1.01 KB
Binary file not shown.
865 Bytes
Binary file not shown.

JDM/build/classes/jdm/mainFrame.class

15.9 KB
Binary file not shown.

JDM/build/classes/jdm/register.class

1.25 KB
Binary file not shown.
8.34 KB
9.65 KB
11.5 KB
22.2 KB
11.4 KB
46 KB
6.4 KB
5.89 KB

JDM/manifest.mf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
X-COMMENT: Main-Class will be added automatically by build
3+

JDM/nbproject/build-impl.xml

+1,407
Large diffs are not rendered by default.

JDM/nbproject/genfiles.properties

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build.xml.data.CRC32=ad96b8ae
2+
build.xml.script.CRC32=adefe5ff
3+
build.xml.stylesheet.CRC32=[email protected]
4+
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5+
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6+
nbproject/build-impl.xml.data.CRC32=ad96b8ae
7+
nbproject/build-impl.xml.script.CRC32=b69b24e5
8+
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compile.on.save=true
2+
user.properties.file=C:\\Users\\Espinas\\AppData\\Roaming\\NetBeans\\7.4\\build.properties

JDM/nbproject/private/private.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3+
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
4+
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
5+
<group/>
6+
</open-files>
7+
</project-private>

JDM/nbproject/project.properties

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
annotation.processing.enabled=true
2+
annotation.processing.enabled.in.editor=false
3+
annotation.processing.processor.options=
4+
annotation.processing.processors.list=
5+
annotation.processing.run.all.processors=true
6+
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
7+
build.classes.dir=${build.dir}/classes
8+
build.classes.excludes=**/*.java,**/*.form
9+
# This directory is removed when the project is cleaned:
10+
build.dir=build
11+
build.generated.dir=${build.dir}/generated
12+
build.generated.sources.dir=${build.dir}/generated-sources
13+
# Only compile against the classpath explicitly listed here:
14+
build.sysclasspath=ignore
15+
build.test.classes.dir=${build.dir}/test/classes
16+
build.test.results.dir=${build.dir}/test/results
17+
# Uncomment to specify the preferred debugger connection transport:
18+
#debug.transport=dt_socket
19+
debug.classpath=\
20+
${run.classpath}
21+
debug.test.classpath=\
22+
${run.test.classpath}
23+
# Files in build.classes.dir which should be excluded from distribution jar
24+
dist.archive.excludes=
25+
# This directory is removed when the project is cleaned:
26+
dist.dir=dist
27+
dist.jar=${dist.dir}/JDM.jar
28+
dist.javadoc.dir=${dist.dir}/javadoc
29+
excludes=
30+
file.reference.JDLib.jar=C:\\Users\\Espinas\\Downloads\\Documents\\Term2\\AP\\HW6\\JDLib\\JDLib.jar
31+
includes=**
32+
jar.compress=false
33+
javac.classpath=\
34+
${file.reference.JDLib.jar}
35+
# Space-separated list of extra javac options
36+
javac.compilerargs=
37+
javac.deprecation=false
38+
javac.processorpath=\
39+
${javac.classpath}
40+
javac.source=1.7
41+
javac.target=1.7
42+
javac.test.classpath=\
43+
${javac.classpath}:\
44+
${build.classes.dir}
45+
javac.test.processorpath=\
46+
${javac.test.classpath}
47+
javadoc.additionalparam=
48+
javadoc.author=false
49+
javadoc.encoding=${source.encoding}
50+
javadoc.noindex=false
51+
javadoc.nonavbar=false
52+
javadoc.notree=false
53+
javadoc.private=false
54+
javadoc.splitindex=true
55+
javadoc.use=true
56+
javadoc.version=false
57+
javadoc.windowtitle=
58+
main.class=jdm.JDM
59+
manifest.file=manifest.mf
60+
meta.inf.dir=${src.dir}/META-INF
61+
mkdist.disabled=false
62+
platform.active=default_platform
63+
run.classpath=\
64+
${javac.classpath}:\
65+
${build.classes.dir}
66+
# Space-separated list of JVM arguments used when running the project.
67+
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
68+
# To set system properties for unit tests define test-sys-prop.name=value:
69+
run.jvmargs=
70+
run.test.classpath=\
71+
${javac.test.classpath}:\
72+
${build.test.classes.dir}
73+
source.encoding=UTF-8
74+
src.dir=src
75+
test.src.dir=test

JDM/nbproject/project.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://www.netbeans.org/ns/project/1">
3+
<type>org.netbeans.modules.java.j2seproject</type>
4+
<configuration>
5+
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
6+
<name>JDM</name>
7+
<source-roots>
8+
<root id="src.dir"/>
9+
</source-roots>
10+
<test-roots>
11+
<root id="test.src.dir"/>
12+
</test-roots>
13+
</data>
14+
</configuration>
15+
</project>

JDM/src/jdm/AbsTableModel.java

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Table model of the JDM
3+
*/
4+
package jdm;
5+
6+
import javax.swing.table.AbstractTableModel;
7+
8+
/**
9+
*
10+
* @author Sajad Azami
11+
*/
12+
public class AbsTableModel extends AbstractTableModel {
13+
14+
@Override
15+
public int getRowCount() {
16+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
17+
}
18+
19+
@Override
20+
public int getColumnCount() {
21+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
22+
}
23+
24+
@Override
25+
public Object getValueAt(int rowIndex, int columnIndex) {
26+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
27+
}
28+
29+
}

JDM/src/jdm/JDM.java

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package jdm;
2+
3+
import java.awt.AWTException;
4+
import java.io.IOException;
5+
import static java.lang.Thread.MIN_PRIORITY;
6+
import java.util.ArrayList;
7+
import javax.swing.JOptionPane;
8+
import static jdm.JDM.pass;
9+
import static jdm.JDM.registered;
10+
11+
/*
12+
* @author Sajad Azami
13+
*/
14+
public class JDM {
15+
16+
static ArrayList downoads = new ArrayList();
17+
public static String registered = "no";
18+
public static String pass = "sajad";
19+
20+
public static void main(String[] args) throws IOException, AWTException {
21+
JDM jdm = new JDM();
22+
JDMWindow window = new JDMWindow();
23+
// new register().registration();
24+
}
25+
26+
}
27+
28+
/**
29+
* The registration process of the JDM
30+
* @author Espinas
31+
*/
32+
class register extends Thread {
33+
34+
public boolean running = true;
35+
36+
public boolean registration() {
37+
38+
while (running) {
39+
if ("no".equals(registered)) {
40+
if (pass.equals(JOptionPane.showInputDialog("This is a trial Version !\n"
41+
+ "please enter registration code:"))) {
42+
JOptionPane.showMessageDialog(null, "Registered Succesfully.", "Thank you", MIN_PRIORITY);
43+
registered = "ok";
44+
running = false;
45+
return true;
46+
} else {
47+
registered = "wrong";
48+
}
49+
} else if ("wrong".equals(registered)) {
50+
if (pass.equals(JOptionPane.showInputDialog("You Registered with wrong serial number !\n"
51+
+ "please enter a valid registration code:"))) {
52+
JOptionPane.showMessageDialog(null, "Registered Succesfully.", "Thank you", MIN_PRIORITY);
53+
registered = "ok";
54+
running = false;
55+
return true;
56+
}
57+
58+
}
59+
try {
60+
Thread.sleep(1000 * 3);
61+
} catch (InterruptedException ex) {
62+
}
63+
}
64+
return false;
65+
}
66+
}

JDM/src/jdm/JDMWindow.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
7+
package jdm;
8+
9+
import java.awt.AWTException;
10+
import java.io.IOException;
11+
12+
/**
13+
* @author Sajad Azami
14+
*/
15+
public class JDMWindow {
16+
mainFrame mainframe;
17+
18+
public JDMWindow() throws IOException, AWTException {
19+
this.mainframe = new mainFrame();
20+
}
21+
22+
23+
24+
}

JDM/src/jdm/MyButton.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* JButton class to create buttons
3+
*/
4+
package jdm;
5+
6+
import java.awt.Dimension;
7+
import javax.swing.Icon;
8+
import javax.swing.JButton;
9+
10+
/**
11+
*
12+
* @author Sajad Azami
13+
*/
14+
public class MyButton extends JButton {
15+
16+
public MyButton(Icon icon, String name) {
17+
18+
super.setBackground(null);
19+
super.setToolTipText(name);
20+
super.setIcon(icon);
21+
setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
22+
}
23+
24+
}

0 commit comments

Comments
 (0)