Skip to content

Commit

Permalink
Make Madds Java6 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahie committed Jul 30, 2012
1 parent 537e31c commit 09f56cd
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -8,4 +8,6 @@ Badds/bin
Badds/build
Radds/bin
Radds/build
Madds/bin
Madds/build
*Alias*
2 changes: 1 addition & 1 deletion Madds/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6"/>
<classpathentry kind="lib" path="lib/TMAppletSwing.jar"/>
<classpathentry kind="lib" path="lib/DDSUtils.jar"/>
<classpathentry kind="lib" path="lib/CJWizards-0.2.jar"/>
Expand Down
12 changes: 7 additions & 5 deletions Madds/build.xml
Expand Up @@ -3,15 +3,17 @@
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<target name="create_run_jar">
<jar destfile="/Users/danielsenff/madds.jar" filesetmanifest="mergewithoutmain">
<jar destfile="build/madds.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="de.danielsenff.de.madds.Madds"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="/Users/danielsenff/Produktion/Java/workspace/DDS-Utils/Madds/bin"/>
<zipfileset excludes="META-INF/*.SF" src="/Users/danielsenff/Produktion/Java/workspace/DDS-Utils/Madds/lib/TMAppletSwing.jar"/>
<fileset dir="/Users/danielsenff/Produktion/Java/workspace/DDS-Utils/Madds/lib"/>
<zipfileset excludes="META-INF/*.SF" src="/Users/danielsenff/Produktion/Java/workspace/DDS-Utils/Madds/lib/DDSUtils.jar"/>
<fileset dir="bin"/>
<fileset dir="lib"/>
<zipfileset excludes="META-INF/*.SF" src="lib/TMAppletSwing.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/DDSUtils.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/CJWizards-0.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/commons-logging-1.1.1.jar"/>
</jar>
</target>
</project>
1 change: 0 additions & 1 deletion Madds/src/de/danielsenff/de/madds/Madds.java
Expand Up @@ -84,7 +84,6 @@ public void onPageChanged(WizardPage newPage, List<WizardPage> path) {
dialog.pack();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);

}

public static TMView showTMApp(Inventorizer inventorizer, File rootFile) throws IllegalAccessException {
Expand Down
4 changes: 2 additions & 2 deletions Madds/src/de/danielsenff/de/madds/models/Inventorizer.java
Expand Up @@ -19,7 +19,7 @@ public class Inventorizer {

public Inventorizer(final String extension) {
this.filter = new TextureNodeFileFilter(extension);
this.fileTree = new Graph<>();
this.fileTree = new Graph<Sizable>();
this.textureFiles = TextureHashMap.getTextureHashMap();
}

Expand All @@ -37,7 +37,7 @@ public void makeInventoryForDir(Node<Sizable> parentNode, File[] files) {
// add file to tree
try {
TextureFile tfile = TextureFile.read(file);
fileTree.insertAt(0.0, parentNode, new Node<>((Sizable)tfile));
fileTree.insertAt(0.0, parentNode, new Node<Sizable>((Sizable)tfile));
this.textureFiles.put(file, tfile);
parentNode.getData().addSize(tfile.getSize());
} catch (IOException e) {
Expand Down
Expand Up @@ -17,7 +17,7 @@ public class SummaryTableModel extends AbstractTableModel {

public SummaryTableModel(Collection<TextureFile> collection) {
this.files = collection;
this.table = new HashMap<>();
this.table = new HashMap<Integer, CalculatedValue>();

for (TextureFile textureFile : collection) {

Expand Down
2 changes: 1 addition & 1 deletion Madds/src/de/danielsenff/de/madds/util/Logger.java
Expand Up @@ -17,7 +17,7 @@
*/
public class Logger {

private static Map<Class<?>, Logger> logger = new HashMap<>();
private static Map<Class<?>, Logger> logger = new HashMap<Class<?>, Logger>();

private PrintStream printer;
private boolean enabled;
Expand Down
8 changes: 4 additions & 4 deletions Madds/src/de/master/core/graph/base/Graph.java
Expand Up @@ -51,7 +51,7 @@ public class Graph<T>
public Graph()
{
nodes = new LinkedList<Node<T>>();
weights = new HashMap<>();
weights = new HashMap<Node<T>, Map<Node<T>, Double>>();
predecessors = new HashMap<Node<T>, Node<T>>();
}

Expand Down Expand Up @@ -190,7 +190,7 @@ public void remove(final Node<T> node)
removeWeight(pre, node);

// remove also from neighbours
Stack<Node> buffer = new Stack<>();
Stack<Node> buffer = new Stack<Node>();
for(Node n : node.getNeighbours())
{
buffer.push(n);
Expand Down Expand Up @@ -224,7 +224,7 @@ protected void insertWeight(Node<T> a, Node<T> b, double weight)
weights.put(a, link);
}
else {
link = new HashMap<>();
link = new HashMap<Node<T>, Double>();
link.put(b, weight);
weights.put(a, link);
}
Expand All @@ -237,7 +237,7 @@ protected void insertWeight(Node<T> a, Node<T> b, double weight)
}
else
{
link= new HashMap<>();
link= new HashMap<Node<T>, Double>();
link.put(a, weight);
weights.put(b, link);
}
Expand Down
2 changes: 1 addition & 1 deletion Madds/src/de/master/core/graph/base/Node.java
Expand Up @@ -33,7 +33,7 @@ public Node() {
public Node(final T data)
{
this.data = data;
this.edges = new LinkedList<>();
this.edges = new LinkedList<Node<T>>();
this.id = ++currentID;
}

Expand Down

0 comments on commit 09f56cd

Please sign in to comment.