Created package
This commit is contained in:
parent
8b506b6433
commit
1c6427c0e5
6 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
package com.albertoventurini;
|
||||||
|
|
||||||
|
import com.albertoventurini.juliaset.JuliaSetCalculator;
|
||||||
|
import com.albertoventurini.juliaset.JuliaSetPanel;
|
||||||
|
import com.albertoventurini.juliaset.ThreadedJuliaSetCalculator;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import java.util.ArrayList;
|
package com.albertoventurini.juliaset;
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
package com.albertoventurini.juliaset;
|
||||||
|
|
||||||
import java.util.concurrent.ForkJoinPool;
|
import java.util.concurrent.ForkJoinPool;
|
||||||
import java.util.concurrent.RecursiveAction;
|
import java.util.concurrent.RecursiveAction;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
package com.albertoventurini.juliaset;
|
||||||
|
|
||||||
public interface JuliaSetCalculator {
|
public interface JuliaSetCalculator {
|
||||||
|
|
||||||
int[][] calculate(
|
int[][] calculate(
|
|
@ -1,3 +1,5 @@
|
||||||
|
package com.albertoventurini.juliaset;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
|
@ -1,3 +1,5 @@
|
||||||
|
package com.albertoventurini.juliaset;
|
||||||
|
|
||||||
public class ThreadedJuliaSetCalculator implements JuliaSetCalculator {
|
public class ThreadedJuliaSetCalculator implements JuliaSetCalculator {
|
||||||
|
|
||||||
private int width;
|
private int width;
|
||||||
|
@ -62,7 +64,7 @@ public class ThreadedJuliaSetCalculator implements JuliaSetCalculator {
|
||||||
try {
|
try {
|
||||||
threads[i].join();
|
threads[i].join();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
// No!
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue