├── DeepZoomTiler ├── .gitignore ├── build.xml ├── build │ └── built-jar.properties ├── dist │ └── README.TXT ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── deepzoomtiler │ └── DeepZoomTiler.java ├── EquirectangularToCubic ├── .gitignore ├── build.xml ├── build │ └── built-jar.properties ├── dist │ └── README.TXT ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── equirectangulartocubic │ ├── Equi2Rect.java │ ├── EquirectangularToCubic.java │ └── ImageBuffer.java ├── README ├── Resizer ├── .gitignore ├── build.xml ├── build │ └── built-jar.properties ├── dist │ └── README.TXT ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── resizer │ └── Resizer.java ├── SaladoConverter ├── .gitignore ├── README ├── build.xml ├── build │ ├── built-jar.properties │ └── classes │ │ ├── META-INF │ │ └── services │ │ │ └── org.jdesktop.application.Application │ │ └── com │ │ └── panozona │ │ └── converter │ │ └── resources │ │ ├── AboutWindowView.properties │ │ ├── LogWindowView.properties │ │ ├── MainWindowView.properties │ │ ├── SaladoConverter.properties │ │ ├── SettingsWindowView.properties │ │ ├── TaskSettingsView.properties │ │ ├── TaskSettingsView2.properties │ │ ├── about.png │ │ ├── busyicons │ │ ├── busy-icon0.png │ │ ├── busy-icon1.png │ │ ├── busy-icon10.png │ │ ├── busy-icon11.png │ │ ├── busy-icon12.png │ │ ├── busy-icon13.png │ │ ├── busy-icon14.png │ │ ├── busy-icon2.png │ │ ├── busy-icon3.png │ │ ├── busy-icon4.png │ │ ├── busy-icon5.png │ │ ├── busy-icon6.png │ │ ├── busy-icon7.png │ │ ├── busy-icon8.png │ │ ├── busy-icon9.png │ │ └── idle-icon.png │ │ └── splash.png ├── external │ ├── components │ │ └── jar files go in here │ └── settings.properties ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── configs │ │ └── za.properties │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ ├── META-INF │ └── services │ │ └── org.jdesktop.application.Application │ ├── com │ └── panozona │ │ └── converter │ │ ├── AboutWindowView.form │ │ ├── AboutWindowView.java │ │ ├── Controller.java │ │ ├── LogWindowView.form │ │ ├── LogWindowView.java │ │ ├── MainWindowView.form │ │ ├── MainWindowView.java │ │ ├── Optimizer.java │ │ ├── SaladoConverter.java │ │ ├── SettingsWindowView.form │ │ ├── SettingsWindowView.java │ │ ├── Starter.java │ │ ├── TaskSettingsView.form │ │ ├── TaskSettingsView.java │ │ ├── maintable │ │ ├── TaskTableCheckBoxCellEditor.java │ │ ├── TaskTableCheckBoxCellRenderer.java │ │ └── TaskTableModel.java │ │ ├── resources │ │ ├── AboutWindowView.properties │ │ ├── LogWindowView.properties │ │ ├── MainWindowView.properties │ │ ├── SaladoConverter.properties │ │ ├── SettingsWindowView.properties │ │ ├── TaskSettingsView.properties │ │ ├── TaskSettingsView2.properties │ │ ├── about.png │ │ ├── busyicons │ │ │ ├── busy-icon0.png │ │ │ ├── busy-icon1.png │ │ │ ├── busy-icon10.png │ │ │ ├── busy-icon11.png │ │ │ ├── busy-icon12.png │ │ │ ├── busy-icon13.png │ │ │ ├── busy-icon14.png │ │ │ ├── busy-icon2.png │ │ │ ├── busy-icon3.png │ │ │ ├── busy-icon4.png │ │ │ ├── busy-icon5.png │ │ │ ├── busy-icon6.png │ │ │ ├── busy-icon7.png │ │ │ ├── busy-icon8.png │ │ │ ├── busy-icon9.png │ │ │ └── idle-icon.png │ │ └── splash.png │ │ ├── settings │ │ ├── AggregatedSettings.java │ │ ├── DZTSettings.java │ │ ├── ECSettings.java │ │ ├── GESettings.java │ │ ├── OPTSettings.java │ │ └── RESSettings.java │ │ ├── task │ │ ├── Image.java │ │ ├── Operation.java │ │ ├── Panorama.java │ │ ├── PanoramaTypes.java │ │ └── TaskData.java │ │ └── utils │ │ ├── ComponentInvoker.java │ │ ├── CurrentDirectoryFinder.java │ │ ├── FileFilterAddTask.java │ │ ├── FileFilterDir.java │ │ ├── FileFilterJar.java │ │ ├── ImageDimensionsChecker.java │ │ ├── Messages.java │ │ └── TasksExecutor.java │ └── org │ └── xurble │ └── server │ └── ImageInfo.java ├── SkyboxMaker └── .gitignore ├── ZoomifyTiler ├── .gitignore ├── build.xml ├── dist │ └── README.TXT ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── project.properties │ └── project.xml ├── src │ └── zoomifytiler │ │ └── ZoomifyTiler.java └── test │ └── zoomifytiler │ └── ZoomifyTilerTest.java └── libs ├── jai_codec.jar └── jai_core.jar /DeepZoomTiler/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /DeepZoomTiler/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project DeepZoomTiler. 7 | 8 | 69 | 70 | -------------------------------------------------------------------------------- /DeepZoomTiler/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Thu, 21 Apr 2011 22:53:34 +0200 2 | 3 | F\:\\SaladoConverter2\\SaladoConverter\\DeepZoomTiler= 4 | -------------------------------------------------------------------------------- /DeepZoomTiler/dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "DeepZoomTiler.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, none of the 25 | classpath elements are copied to the lib folder. In such a case, 26 | you need to copy the classpath elements to the lib folder manually after the build. 27 | * If a library on the projects classpath also has a Class-Path element 28 | specified in the manifest,the content of the Class-Path element has to be on 29 | the projects runtime path. 30 | * To set a main class in a standard Java project, right-click the project node 31 | in the Projects window and choose Properties. Then click Run and enter the 32 | class name in the Main Class field. Alternatively, you can manually type the 33 | class name in the manifest Main-Class element. 34 | -------------------------------------------------------------------------------- /DeepZoomTiler/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=2b7b2ea7 2 | build.xml.script.CRC32=c10cb5fa 3 | build.xml.stylesheet.CRC32=be360661 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=2b7b2ea7 7 | nbproject/build-impl.xml.script.CRC32=e4b36875 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 9 | -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/DeepZoomTiler/nbproject/private/config.properties -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | jaxws.endorsed.dir=E:\\Program Files\\NetBeans 6.0.1\\java1\\modules\\ext\\jaxws21\\api 7 | user.properties.file=C:\\Documents and Settings\\Marek\\.netbeans\\6.0\\build.properties 8 | -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.run.all.processors=true 4 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 5 | application.title=DeepZoomTiler 6 | application.vendor=Marek 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 | # This directory is removed when the project is cleaned: 24 | dist.dir=dist 25 | dist.jar=${dist.dir}/DeepZoomTiler.jar 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | endorsed.classpath= 28 | excludes= 29 | file.reference.jai_codec.jar=../libs/jai_codec.jar 30 | file.reference.jai_core.jar=../libs/jai_core.jar 31 | includes=** 32 | jar.compress=false 33 | javac.classpath=\ 34 | ${file.reference.jai_codec.jar}:\ 35 | ${file.reference.jai_core.jar} 36 | # Space-separated list of extra javac options 37 | javac.compilerargs= 38 | javac.deprecation=false 39 | javac.processorpath=\ 40 | ${javac.classpath} 41 | javac.source=1.5 42 | javac.target=1.5 43 | javac.test.classpath=\ 44 | ${javac.classpath}:\ 45 | ${build.classes.dir}:\ 46 | ${libs.junit.classpath}:\ 47 | ${libs.junit_4.classpath} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=deepzoomtiler.DeepZoomTiler 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | platform.active=default_platform 65 | run.classpath=\ 66 | ${javac.classpath}:\ 67 | ${build.classes.dir} 68 | # Space-separated list of JVM arguments used when running the project 69 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 70 | # or test-sys-prop.name=value to set system properties for unit tests): 71 | run.jvmargs= 72 | run.test.classpath=\ 73 | ${javac.test.classpath}:\ 74 | ${build.test.classes.dir} 75 | source.encoding=windows-1250 76 | src.dir=src 77 | test.src.dir=test 78 | -------------------------------------------------------------------------------- /DeepZoomTiler/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | DeepZoomTiler 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /EquirectangularToCubic/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /EquirectangularToCubic/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project EquirectangularToCubic. 7 | 8 | 69 | 70 | -------------------------------------------------------------------------------- /EquirectangularToCubic/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Thu, 21 Apr 2011 22:53:40 +0200 2 | 3 | F\:\\SaladoConverter2\\SaladoConverter\\EquirectangularToCubic= 4 | -------------------------------------------------------------------------------- /EquirectangularToCubic/dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "EquirectangularToCubic.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, none of the 25 | classpath elements are copied to the lib folder. In such a case, 26 | you need to copy the classpath elements to the lib folder manually after the build. 27 | * If a library on the projects classpath also has a Class-Path element 28 | specified in the manifest,the content of the Class-Path element has to be on 29 | the projects runtime path. 30 | * To set a main class in a standard Java project, right-click the project node 31 | in the Projects window and choose Properties. Then click Run and enter the 32 | class name in the Main Class field. Alternatively, you can manually type the 33 | class name in the manifest Main-Class element. 34 | -------------------------------------------------------------------------------- /EquirectangularToCubic/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=0722fb95 2 | build.xml.script.CRC32=6d24b65e 3 | build.xml.stylesheet.CRC32=be360661 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=0722fb95 7 | nbproject/build-impl.xml.script.CRC32=4394a3f5 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 9 | -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/EquirectangularToCubic/nbproject/private/config.properties -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | jaxws.endorsed.dir=E:\\Program Files\\NetBeans 6.0.1\\java1\\modules\\ext\\jaxws21\\api 7 | user.properties.file=C:\\Documents and Settings\\Marek\\.netbeans\\6.0\\build.properties 8 | -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.run.all.processors=true 4 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 5 | application.title=EquirectangularToCubic 6 | application.vendor=Marek 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 | # This directory is removed when the project is cleaned: 24 | dist.dir=dist 25 | dist.jar=${dist.dir}/EquirectangularToCubic.jar 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | endorsed.classpath= 28 | excludes= 29 | file.reference.jai_codec.jar=../libs/jai_codec.jar 30 | file.reference.jai_core.jar=../libs/jai_core.jar 31 | includes=** 32 | jar.compress=false 33 | javac.classpath=\ 34 | ${file.reference.jai_codec.jar}:\ 35 | ${file.reference.jai_core.jar} 36 | # Space-separated list of extra javac options 37 | javac.compilerargs= 38 | javac.deprecation=false 39 | javac.processorpath=\ 40 | ${javac.classpath} 41 | javac.source=1.5 42 | javac.target=1.5 43 | javac.test.classpath=\ 44 | ${javac.classpath}:\ 45 | ${build.classes.dir}:\ 46 | ${libs.junit.classpath}:\ 47 | ${libs.junit_4.classpath} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=equirectangulartocubic.EquirectangularToCubic 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | platform.active=default_platform 65 | run.classpath=\ 66 | ${javac.classpath}:\ 67 | ${build.classes.dir} 68 | # Space-separated list of JVM arguments used when running the project 69 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 70 | # or test-sys-prop.name=value to set system properties for unit tests): 71 | run.jvmargs= 72 | run.test.classpath=\ 73 | ${javac.test.classpath}:\ 74 | ${build.test.classes.dir} 75 | source.encoding=windows-1250 76 | src.dir=src 77 | test.src.dir=test 78 | -------------------------------------------------------------------------------- /EquirectangularToCubic/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | EquirectangularToCubic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /EquirectangularToCubic/src/equirectangulartocubic/ImageBuffer.java: -------------------------------------------------------------------------------- 1 | package equirectangulartocubic; 2 | 3 | import com.sun.media.jai.codec.FileSeekableStream; 4 | import java.io.File; 5 | import java.io.IOException; 6 | import java.util.HashMap; 7 | import javax.media.jai.JAI; 8 | import javax.media.jai.PlanarImage; 9 | import javax.media.jai.iterator.RectIter; 10 | import javax.media.jai.iterator.RectIterFactory; 11 | 12 | public class ImageBuffer { 13 | 14 | private FileSeekableStream stream; 15 | private PlanarImage planarImage; 16 | private RectIter rectIter; 17 | private int[] pixel; 18 | private int currentRow; 19 | private HashMap buffer; 20 | private int rowCounter; 21 | private int rowLimit; 22 | private long startTime; 23 | private boolean verboseMode; 24 | private int wallCount; 25 | 26 | public ImageBuffer(File inFile, boolean verboseMode) throws IOException { 27 | this.verboseMode = verboseMode; 28 | try { 29 | stream = new FileSeekableStream(inFile); 30 | planarImage = JAI.create("stream", stream); 31 | } catch (Exception e) { 32 | if (stream != null) { 33 | stream.close(); 34 | } 35 | throw new IOException("Cannot read image file: " + inFile); 36 | } 37 | //planarImage = JAI.create("fileload", inFile.getAbsolutePath()); 38 | 39 | rectIter = RectIterFactory.create(planarImage, null); 40 | pixel = new int[planarImage.getSampleModel().getNumBands()]; 41 | if (pixel.length < 3 || pixel.length > 4 ) { 42 | throw new IllegalArgumentException("Image color scheme is not suppported!"); 43 | } 44 | } 45 | 46 | public void init(double yaw, double pitch) { 47 | // top, botttom 48 | if (pitch != 0) { 49 | rowLimit = (int) Math.ceil((double) planarImage.getHeight() * 0.300d); 50 | // front, back, left, right 51 | } else { 52 | rowLimit = (int) Math.ceil((double) planarImage.getHeight() * 0.5015d); 53 | } 54 | 55 | rectIter.startPixels(); 56 | rectIter.startLines(); 57 | currentRow = 0; 58 | rowCounter = 0; 59 | buffer = new HashMap(); 60 | startTime = System.currentTimeMillis(); 61 | wallCount++; 62 | } 63 | 64 | public void reset(){ 65 | buffer = null; 66 | } 67 | 68 | public void printStats() { 69 | if (verboseMode) { 70 | long elapsedTime = System.currentTimeMillis() - startTime; 71 | String format = String.format("%%0%dd", 2); 72 | elapsedTime = elapsedTime / 1000; 73 | String seconds = String.format(format, elapsedTime % 60); 74 | String minutes = String.format(format, (elapsedTime % 3600) / 60); 75 | String hours = String.format(format, elapsedTime / 3600); 76 | if (hours.equals("00")) { 77 | if(minutes.equals("00")){ 78 | if(seconds.equals("00")){ 79 | System.out.println(" in "+(System.currentTimeMillis() - startTime)+"ms"); 80 | }else{ 81 | System.out.println(" in " + seconds+"s "); 82 | } 83 | }else{ 84 | System.out.println(" in "+minutes + "m " + seconds+"s "); 85 | } 86 | }else{ 87 | System.out.println(" in "+hours + "h " + minutes + "m " + seconds+"s"); 88 | } 89 | } 90 | } 91 | 92 | public void close() throws IOException { 93 | if (stream != null) { 94 | stream.close(); 95 | } 96 | } 97 | 98 | public int[] getRow(int rowNumber) { 99 | if (buffer.containsKey(rowNumber)) { 100 | return buffer.get(rowNumber); 101 | } else { 102 | int[] result = new int[planarImage.getWidth()]; 103 | rectIter.jumpLines(rowNumber - currentRow); 104 | currentRow = rowNumber; 105 | rectIter.startPixels(); 106 | for (int i = 0; i < planarImage.getWidth(); i++) { 107 | rectIter.getPixel(pixel); 108 | result[i] = (pixel[0] << 16) + (pixel[1] << 8) + pixel[2]; 109 | rectIter.nextPixel(); 110 | } 111 | buffer.put(rowNumber, result); 112 | if (verboseMode) { 113 | rowCounter++; 114 | if (rowCounter % 100 == 0) { 115 | System.out.println("Reading wall " + wallCount + " of 6: " + (int) Math.ceil(((double) buffer.size() / (double) rowLimit) * 100d) + "%"); 116 | } 117 | } 118 | return result; 119 | } 120 | } 121 | 122 | public int getPanoWidth() { 123 | return planarImage.getWidth(); 124 | } 125 | 126 | public int getPanoHeight() { 127 | return planarImage.getHeight(); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | For more details go to: 3 | 4 | http://panozona.com/wiki/ 5 | 6 | Stay updated: 7 | 8 | http://twitter.com/PanoZona -------------------------------------------------------------------------------- /Resizer/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /Resizer/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project Resizer. 7 | 8 | 69 | 70 | -------------------------------------------------------------------------------- /Resizer/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Thu, 21 Apr 2011 22:53:45 +0200 2 | 3 | F\:\\SaladoConverter2\\SaladoConverter\\Resizer= 4 | -------------------------------------------------------------------------------- /Resizer/dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "Resizer.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, none of the 25 | classpath elements are copied to the lib folder. In such a case, 26 | you need to copy the classpath elements to the lib folder manually after the build. 27 | * If a library on the projects classpath also has a Class-Path element 28 | specified in the manifest,the content of the Class-Path element has to be on 29 | the projects runtime path. 30 | * To set a main class in a standard Java project, right-click the project node 31 | in the Projects window and choose Properties. Then click Run and enter the 32 | class name in the Main Class field. Alternatively, you can manually type the 33 | class name in the manifest Main-Class element. 34 | -------------------------------------------------------------------------------- /Resizer/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /Resizer/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=105737cd 2 | build.xml.script.CRC32=bb517498 3 | build.xml.stylesheet.CRC32=be360661 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=105737cd 7 | nbproject/build-impl.xml.script.CRC32=dc968214 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 9 | -------------------------------------------------------------------------------- /Resizer/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/Resizer/nbproject/private/config.properties -------------------------------------------------------------------------------- /Resizer/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | jaxws.endorsed.dir=E:\\Program Files\\NetBeans 6.0.1\\java1\\modules\\ext\\jaxws21\\api 7 | user.properties.file=C:\\Documents and Settings\\Marek\\.netbeans\\6.0\\build.properties 8 | -------------------------------------------------------------------------------- /Resizer/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Resizer/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.run.all.processors=true 4 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 5 | application.title=Resizer 6 | application.vendor=Marek 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 | # This directory is removed when the project is cleaned: 24 | dist.dir=dist 25 | dist.jar=${dist.dir}/Resizer.jar 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | endorsed.classpath= 28 | excludes= 29 | file.reference.jai_codec.jar=../libs/jai_codec.jar 30 | file.reference.jai_core.jar=../libs/jai_core.jar 31 | includes=** 32 | jar.compress=false 33 | javac.classpath=\ 34 | ${file.reference.jai_codec.jar}:\ 35 | ${file.reference.jai_core.jar} 36 | # Space-separated list of extra javac options 37 | javac.compilerargs= 38 | javac.deprecation=false 39 | javac.processorpath=\ 40 | ${javac.classpath} 41 | javac.source=1.5 42 | javac.target=1.5 43 | javac.test.classpath=\ 44 | ${javac.classpath}:\ 45 | ${build.classes.dir}:\ 46 | ${libs.junit.classpath}:\ 47 | ${libs.junit_4.classpath} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=resizer.Resizer 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | platform.active=default_platform 65 | run.classpath=\ 66 | ${javac.classpath}:\ 67 | ${build.classes.dir} 68 | # Space-separated list of JVM arguments used when running the project 69 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 70 | # or test-sys-prop.name=value to set system properties for unit tests): 71 | run.jvmargs= 72 | run.test.classpath=\ 73 | ${javac.test.classpath}:\ 74 | ${build.test.classes.dir} 75 | source.encoding=windows-1250 76 | src.dir=src 77 | test.src.dir=test 78 | -------------------------------------------------------------------------------- /Resizer/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | Resizer 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SaladoConverter/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /SaladoConverter/README: -------------------------------------------------------------------------------- 1 | 2 | For more details go to: 3 | 4 | http://panozona.com/wiki/ 5 | 6 | Stay updated: 7 | 8 | http://twitter.com/PanoZona -------------------------------------------------------------------------------- /SaladoConverter/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project PanoSaladoConverter. 12 | 13 | 74 | 75 | 76 | 77 | 78 | 79 | MY TARGET: PACKAGING ${application.title} SOURCES 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /SaladoConverter/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Thu, 21 Apr 2011 22:54:37 +0200 2 | 3 | F\:\\SaladoConverter2\\SaladoConverter\\SaladoConverter= 4 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/META-INF/services/org.jdesktop.application.Application: -------------------------------------------------------------------------------- 1 | com.panozona.converter.SaladoConverter -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/AboutWindowView.properties: -------------------------------------------------------------------------------- 1 | title = About: SaladoConverter 2 | 3 | closeAboutBox.Action.text = &Close 4 | 5 | versionLabel.text=Product Version: 6 | 7 | vendorLabel.text=Author: 8 | homepageLabel.text=Homepage: 9 | appHomepageLabel.text=PanoZona.com 10 | #NOI18N 11 | appHomepageLabel.foreground=0, 0, 255 12 | #NOI18N 13 | appHomepageLabel.font=Tahoma-Plain-11 14 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/LogWindowView.properties: -------------------------------------------------------------------------------- 1 | jButton2.text=jButton2 2 | closeLogWindow.Action.text=Close 3 | closeLogWindow.Action.shortDescription=Close Log window 4 | CancelRun.Action.shortDescription=Cancel running operation 5 | CancelRun.Action.text=Cancel 6 | jButtonCancel.text=Cancel 7 | jButtonClose.text=Close 8 | #NOI18N 9 | jTextAreaLog.font=Monospaced-Plain-12 10 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/MainWindowView.properties: -------------------------------------------------------------------------------- 1 | # Resources for the PanoSaladoConverterView class 2 | 3 | # top-level menus 4 | 5 | fileMenu.text = File 6 | helpMenu.text = Help 7 | 8 | # @Action resources 9 | 10 | showAboutBox.Action.text = &About... 11 | showAboutBox.Action.shortDescription = Show the application's information dialog 12 | 13 | # status bar resources 14 | 15 | StatusBar.messageTimeout = 5000 16 | StatusBar.busyAnimationRate = 30 17 | StatusBar.idleIcon = busyicons/idle-icon.png 18 | StatusBar.busyIcons[0] = busyicons/busy-icon0.png 19 | StatusBar.busyIcons[1] = busyicons/busy-icon1.png 20 | StatusBar.busyIcons[2] = busyicons/busy-icon2.png 21 | StatusBar.busyIcons[3] = busyicons/busy-icon3.png 22 | StatusBar.busyIcons[4] = busyicons/busy-icon4.png 23 | StatusBar.busyIcons[5] = busyicons/busy-icon5.png 24 | StatusBar.busyIcons[6] = busyicons/busy-icon6.png 25 | StatusBar.busyIcons[7] = busyicons/busy-icon7.png 26 | StatusBar.busyIcons[8] = busyicons/busy-icon8.png 27 | StatusBar.busyIcons[9] = busyicons/busy-icon9.png 28 | StatusBar.busyIcons[10] = busyicons/busy-icon10.png 29 | StatusBar.busyIcons[11] = busyicons/busy-icon11.png 30 | StatusBar.busyIcons[12] = busyicons/busy-icon12.png 31 | StatusBar.busyIcons[13] = busyicons/busy-icon13.png 32 | StatusBar.busyIcons[14] = busyicons/busy-icon14.png 33 | showSettingsFrame.Action.text=Settings 34 | showSettingsFrame.Action.accelerator=alt pressed S 35 | showSettingsFrame.Action.shortDescription=Change application settings 36 | fileMenuLog.text=Show log 37 | showLogFrame.Action.text=Show log 38 | showLogFrame.Action.accelerator=alt pressed L 39 | showLogFrame.Action.shortDescription=Display info from last run 40 | chooseCommandActionPerformed.Action.text= 41 | chooseCommandActionPerformed.Action.shortDescription= 42 | OpenFolerActionPerformed.Action.shortDescription= 43 | OpenFolerActionPerformed.Action.text= 44 | selectOutput.Action.text= 45 | selectOutput.Action.shortDescription= 46 | runAllTasks.Action.text= 47 | runAllTasks.Action.shortDescription= 48 | jButton5.text=jButton5 49 | RemoveTask.Action.shortDescription= 50 | RemoveTask.Action.text=Remove 51 | clearTasks.Action.shortDescription= 52 | clearTasks.Action.text=Clear 53 | jButtonAddTask.text=Add 54 | jButtonRemoveTask.text=Remove 55 | fileMenuSettings.text=Settings 56 | jButtonClearTasks.text=Clear 57 | jButtonSelectOutput.text=Output 58 | jTextFieldOutputDir.text= 59 | jButtonRunTasks.text=Run 60 | jFileChooser.dialogTitle=Open file or folder 61 | fileMenuExit.text=Exit 62 | RunTasks.Action.text=Run 63 | RunTasks.Action.shortDescription= 64 | jMenuItemOnlineHelp.text=Online help 65 | jButtonEdit.text=Edit 66 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/SaladoConverter.properties: -------------------------------------------------------------------------------- 1 | # Application global resources 2 | 3 | Application.name = PanoSaladoConverter 4 | Application.title = SaladoConverter 5 | Application.version = 0.5 6 | Application.vendor = Marek Standio 7 | Application.homepage = http://panosalado.com/ 8 | Application.description = Interface for tools provided with PanoSalado.v2 9 | Application.vendorId = Sun 10 | Application.id = SaladoConverter 11 | Application.lookAndFeel = system 12 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/SettingsWindowView.properties: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | jTabbedPane1.toolTipText=Choose tool to configure 5 | TabbedPane.toolTipText=Choose tool to configure 6 | jLabel3.text=Wall overlap (px) 7 | jLabel9.text=*.jar directory 8 | jButton3.text=jButton3 9 | browseEC.Action.text=... 10 | browseEC.Action.shortDescription=Browse for *.jar file 11 | jLabel10.text=*.jar directory 12 | jLabel8.text=Tile size 13 | jLabel7.text=Tile overlap (px) 14 | jLabel5.text=*.jpg quality 15 | GeneralTab.TabConstraints.tabTitle=SaladoConverter 16 | browseDZT.Action.text=... 17 | browseDZT.Action.shortDescription= 18 | jButton5.text=jButton5 19 | restoreDefaultEC.Action.shortDescription= 20 | restoreDefaultEC.Action.text=Restore default 21 | restoreDefaultDZT.Action.shortDescription= 22 | restoreDefaultDZT.Action.text=Restore default 23 | saveSettingsAndClose.Action.shortDescription= 24 | saveSettingsAndClose.Action.text=OK 25 | closeWithoutSaving.Action.shortDescription= 26 | closeWithoutSaving.Action.text=Cancel 27 | restoreDefaultGeneral.Action.shortDescription= 28 | restoreDefaultGeneral.Action.text=Restore Default 29 | jButtonOK.text=OK 30 | jButtonCancel.text=Cancel 31 | jTextFieldECOverlap.text= 32 | jTextFieldECDirectory.text= 33 | jTextFieldDZTDirectory.text= 34 | jButtonECRestoreDefault.text=Restore default 35 | jButtonDZTRestoreDefault.text=Restore default 36 | jButtonGERestoreDefault.text=Restore default 37 | jButtonGERestoreDefault.actionCommand=Restore default 38 | jButtonECBrowseDirectory.text=... 39 | jButtonDZTBrowseDirectory.text=... 40 | jLabel4.text=Interpolation 41 | jLabel15.text=Temporary directory 42 | jButtonGEBrowseDirectory.text=... 43 | jLabel2.text=Memory limit (MB) 44 | TabbedPane.AccessibleContext.accessibleName=General 45 | jLabel11.text=*.jar directory 46 | jButtonRESRestoreDefault.text=Restore default 47 | jButtonRESBrowseDirectory.text=... 48 | jCheckBoxGERemoveObsoleteDZ.text=Remove obsolete Deep Zoom files 49 | jCheckBoxGEOverwriteOutput.text=Overwrite output directories 50 | ResizerTab.TabConstraints.tabTitle=Resizer 51 | ComponentsTab.TabConstraints.tabTitle=Components 52 | AutosizeTab.TabConstraints.tabTitle=Autosize 53 | EquirectangularToCubicTab.TabConstraints.tabTitle=EquirectangularToCubic 54 | DeepZoomTilerTab.TabConstraints.tabTitle=DeepZoomTiler 55 | jButtonOPTRestoreDefault.text=Restore default 56 | jLabel1.text=Cube resize (%) 57 | jLabel6.text=Tile max size 58 | jLabel12.text=Tile min size 59 | jTextFieldOPTMaxTileSize.text= 60 | jTextFieldOPTMinTileSize.text= 61 | jTextFieldGEMemoryLimit.text= 62 | jTextFieldOPTResizePercent.text= 63 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/TaskSettingsView.properties: -------------------------------------------------------------------------------- 1 | jLabel1.text=Cube size: 2 | jButtonTaskOK.text=OK 3 | jButtonTaskCancel.text=Cancel 4 | jLabel3.text=to 5 | jTextFieldTaskResize.text= 6 | jLabelOriginalValue.text=[Orginal value] 7 | jLabel2.text=Tile size: 8 | jRadioButtonDefault.text=Default 9 | jRadioButtonCustom.text=Custom 10 | jRadioButtonDivision.text=Cube size by 11 | jRadioButtonDivision.actionCommand=Cube size by 12 | jLabelDivResult.text=[Division resut] 13 | jTextFieldTileCustom.text= 14 | jLabelTileDefaultValue.text=[DefaultValue] 15 | jLabelTileEquals.text== 16 | jLabel4.text=to 17 | jRadioButtonAutosize.text=Autosize 18 | jLabelTileDefaultCubeSize.text=[value] 19 | jLabelTileDefaultTileSize.text=[value] 20 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/TaskSettingsView2.properties: -------------------------------------------------------------------------------- 1 | 2 | jButtonTaskOK.text=OK 3 | jLabelTileDefaultValue1.text=[DefaultValue] 4 | jLabel4.text=to 5 | jTextField1.text= 6 | jLabelTileDefaultValue2.text=[DefaultValue] 7 | jRadioButtonCustom.text=Custom values 8 | jRadioButtonOptimise.text=Auto 9 | jPanel1.border.title=Cube and tile size 10 | jButtonTaskCancel.text=Cancel 11 | jLabel1.text=Cube size: 12 | jLabel2.text=Tile size: 13 | jLabel3.text=to 14 | -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/about.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon0.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon1.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon10.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon11.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon12.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon13.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon14.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon2.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon3.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon4.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon5.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon6.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon7.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon8.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/busy-icon9.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/idle-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/busyicons/idle-icon.png -------------------------------------------------------------------------------- /SaladoConverter/build/classes/com/panozona/converter/resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/build/classes/com/panozona/converter/resources/splash.png -------------------------------------------------------------------------------- /SaladoConverter/external/components/jar files go in here: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/external/components/jar files go in here -------------------------------------------------------------------------------- /SaladoConverter/external/settings.properties: -------------------------------------------------------------------------------- 1 | #Thu Apr 21 11:46:14 CEST 2011 2 | GE_output_dir=D\:\\mstandio\\projekty\\SaladoConverter\\output 3 | GE_input_dir=D\:\\mstandio\\projekty\\SaladoConverter\\input 4 | EC_jarDir=D\:\\mstandio\\projekty\\SaladoConverter\\SaladoConverter\\EquirectangularToCubic\\dist\\EquirectangularToCubic.jar 5 | DZT_jarDir=D\:\\mstandio\\projekty\\SaladoConverter\\SaladoConverter\\DeepZoomTiler\\dist\\DeepZoomTiler.jar 6 | RES_jarDir=D\:\\mstandio\\projekty\\SaladoConverter\\SaladoConverter\\Resizer\\dist\\Resizer.jar 7 | GE_selected_commmand=Cubic to Deep Zoom cubic 8 | -------------------------------------------------------------------------------- /SaladoConverter/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /SaladoConverter/nbproject/configs/za.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/nbproject/configs/za.properties -------------------------------------------------------------------------------- /SaladoConverter/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=35a1e568 2 | build.xml.script.CRC32=e821e994 3 | build.xml.stylesheet.CRC32=958a1d3e@1.26.2.45 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=6192e08f 7 | nbproject/build-impl.xml.script.CRC32=59e78f8f 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 9 | -------------------------------------------------------------------------------- /SaladoConverter/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=false 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | jaxws.endorsed.dir=E:\\Program Files\\NetBeans 6.0.1\\java1\\modules\\ext\\jaxws21\\api 7 | user.properties.file=C:\\Documents and Settings\\Marek\\.netbeans\\6.0\\build.properties 8 | -------------------------------------------------------------------------------- /SaladoConverter/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SaladoConverter/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.run.all.processors=true 4 | application.desc=Interface for tools provided with PanoSalado.v2 5 | application.homepage=http://panosalado.com/ 6 | application.title=SaladoConverter 7 | application.vendor=Marek Standio 8 | build.classes.dir=${build.dir}/classes 9 | build.classes.excludes=**/*.java,**/*.form 10 | # This directory is removed when the project is cleaned: 11 | build.dir=build 12 | build.generated.dir=${build.dir}/generated 13 | build.generated.sources.dir=${build.dir}/generated-sources 14 | # Only compile against the classpath explicitly listed here: 15 | build.sysclasspath=ignore 16 | build.test.classes.dir=${build.dir}/test/classes 17 | build.test.results.dir=${build.dir}/test/results 18 | debug.classpath=\ 19 | ${run.classpath} 20 | debug.test.classpath=\ 21 | ${run.test.classpath} 22 | # This directory is removed when the project is cleaned: 23 | dist.dir=dist 24 | dist.jar=${dist.dir}/SaladoConverter.jar 25 | dist.javadoc.dir=${dist.dir}/javadoc 26 | endorsed.classpath= 27 | excludes= 28 | file.reference.jai_codec.jar=../libs/jai_codec.jar 29 | file.reference.jai_core.jar=../libs/jai_core.jar 30 | includes=** 31 | jar.archive.disabled=${jnlp.enabled} 32 | jar.compress=false 33 | jar.index=${jnlp.enabled} 34 | javac.classpath=\ 35 | ${libs.swing-app-framework.classpath}:\ 36 | ${file.reference.jai_codec.jar}:\ 37 | ${file.reference.jai_core.jar} 38 | # Space-separated list of extra javac options 39 | javac.compilerargs= 40 | javac.deprecation=false 41 | javac.processorpath=\ 42 | ${javac.classpath} 43 | javac.source=1.6 44 | javac.target=1.6 45 | javac.test.classpath=\ 46 | ${javac.classpath}:\ 47 | ${build.classes.dir}:\ 48 | ${libs.junit.classpath}:\ 49 | ${libs.junit_4.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api" 62 | jnlp.codebase.type=local 63 | jnlp.codebase.url=file:/E:/mgr/workspace/SaladoConverter/dist/ 64 | jnlp.descriptor=application 65 | jnlp.enabled=false 66 | jnlp.mixed.code=defaut 67 | jnlp.offline-allowed=false 68 | jnlp.signed=false 69 | main.class=com.panozona.converter.Starter 70 | manifest.file=manifest.mf 71 | meta.inf.dir=${src.dir}/META-INF 72 | platform.active=default_platform 73 | run.classpath=\ 74 | ${javac.classpath}:\ 75 | ${build.classes.dir} 76 | # Space-separated list of JVM arguments used when running the project 77 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 78 | # or test-sys-prop.name=value to set system properties for unit tests): 79 | run.jvmargs= 80 | run.test.classpath=\ 81 | ${javac.test.classpath}:\ 82 | ${build.test.classes.dir} 83 | source.encoding=UTF-8 84 | src.dir=src 85 | test.src.dir=test 86 | -------------------------------------------------------------------------------- /SaladoConverter/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | SaladoConverter 7 | 1.6.5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SaladoConverter/src/META-INF/services/org.jdesktop.application.Application: -------------------------------------------------------------------------------- 1 | com.panozona.converter.SaladoConverter -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/AboutWindowView.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/AboutWindowView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * AboutWindowView.java 3 | */ 4 | 5 | package com.panozona.converter; 6 | 7 | import java.io.IOException; 8 | import javax.swing.JOptionPane; 9 | import org.jdesktop.application.Action; 10 | 11 | public class AboutWindowView extends javax.swing.JDialog { 12 | 13 | public AboutWindowView(java.awt.Frame parent) { 14 | super(parent); 15 | initComponents(); 16 | getRootPane().setDefaultButton(closeButton); 17 | } 18 | 19 | @Action public void closeAboutBox() { 20 | dispose(); 21 | } 22 | 23 | /** This method is called from within the constructor to 24 | * initialize the form. 25 | * WARNING: Do NOT modify this code. The content of this method is 26 | * always regenerated by the Form Editor. 27 | */ 28 | // //GEN-BEGIN:initComponents 29 | private void initComponents() { 30 | 31 | closeButton = new javax.swing.JButton(); 32 | javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); 33 | javax.swing.JLabel versionLabel = new javax.swing.JLabel(); 34 | javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); 35 | javax.swing.JLabel vendorLabel = new javax.swing.JLabel(); 36 | javax.swing.JLabel appVendorLabel = new javax.swing.JLabel(); 37 | javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); 38 | javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); 39 | 40 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 41 | org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.panozona.converter.SaladoConverter.class).getContext().getResourceMap(AboutWindowView.class); 42 | setTitle(resourceMap.getString("title")); // NOI18N 43 | setModal(true); 44 | setName("aboutBox"); // NOI18N 45 | setResizable(false); 46 | 47 | javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(com.panozona.converter.SaladoConverter.class).getContext().getActionMap(AboutWindowView.class, this); 48 | closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N 49 | closeButton.setName("closeButton"); // NOI18N 50 | 51 | appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4)); 52 | appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N 53 | appTitleLabel.setName("appTitleLabel"); // NOI18N 54 | 55 | versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); 56 | versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N 57 | versionLabel.setName("versionLabel"); // NOI18N 58 | 59 | appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N 60 | appVersionLabel.setName("appVersionLabel"); // NOI18N 61 | 62 | vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD)); 63 | vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N 64 | vendorLabel.setName("vendorLabel"); // NOI18N 65 | 66 | appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N 67 | appVendorLabel.setName("appVendorLabel"); // NOI18N 68 | 69 | homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); 70 | homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N 71 | homepageLabel.setName("homepageLabel"); // NOI18N 72 | 73 | appHomepageLabel.setFont(resourceMap.getFont("appHomepageLabel.font")); // NOI18N 74 | appHomepageLabel.setForeground(resourceMap.getColor("appHomepageLabel.foreground")); // NOI18N 75 | appHomepageLabel.setText(resourceMap.getString("appHomepageLabel.text")); // NOI18N 76 | appHomepageLabel.setName("appHomepageLabel"); // NOI18N 77 | appHomepageLabel.addMouseListener(new java.awt.event.MouseAdapter() { 78 | public void mousePressed(java.awt.event.MouseEvent evt) { 79 | appHomepageLabelMousePressed(evt); 80 | } 81 | }); 82 | 83 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 84 | getContentPane().setLayout(layout); 85 | layout.setHorizontalGroup( 86 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 87 | .addGroup(layout.createSequentialGroup() 88 | .addContainerGap() 89 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 90 | .addComponent(appTitleLabel, javax.swing.GroupLayout.Alignment.LEADING) 91 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() 92 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 93 | .addComponent(versionLabel) 94 | .addComponent(vendorLabel) 95 | .addComponent(homepageLabel)) 96 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 97 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 98 | .addComponent(appHomepageLabel) 99 | .addComponent(appVersionLabel) 100 | .addComponent(appVendorLabel)))) 101 | .addContainerGap(117, Short.MAX_VALUE)) 102 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 103 | .addContainerGap(225, Short.MAX_VALUE) 104 | .addComponent(closeButton) 105 | .addContainerGap()) 106 | ); 107 | layout.setVerticalGroup( 108 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 109 | .addGroup(layout.createSequentialGroup() 110 | .addContainerGap() 111 | .addComponent(appTitleLabel) 112 | .addGap(26, 26, 26) 113 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 114 | .addComponent(versionLabel) 115 | .addComponent(appVersionLabel)) 116 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 117 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 118 | .addComponent(vendorLabel) 119 | .addComponent(appVendorLabel)) 120 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 121 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 122 | .addComponent(homepageLabel) 123 | .addComponent(appHomepageLabel)) 124 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE) 125 | .addComponent(closeButton) 126 | .addContainerGap()) 127 | ); 128 | 129 | pack(); 130 | }// //GEN-END:initComponents 131 | 132 | private void appHomepageLabelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_appHomepageLabelMousePressed 133 | String url = "http://panozona.com/"; 134 | try { 135 | java.awt.Desktop.getDesktop().browse(java.net.URI.create(url)); 136 | } catch (IOException ex) { 137 | JOptionPane.showMessageDialog(this, "Could not openurl: "+url); 138 | } 139 | }//GEN-LAST:event_appHomepageLabelMousePressed 140 | 141 | // Variables declaration - do not modify//GEN-BEGIN:variables 142 | private javax.swing.JButton closeButton; 143 | // End of variables declaration//GEN-END:variables 144 | 145 | } 146 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/LogWindowView.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
96 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/LogWindowView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LogWindowView.java 3 | * 4 | * Created on 2010-03-18, 03:58:20 5 | */ 6 | package com.panozona.converter; 7 | 8 | import java.awt.Toolkit; 9 | 10 | /** 11 | * @author Marek Standio 12 | */ 13 | public class LogWindowView extends javax.swing.JFrame { 14 | 15 | /** Creates new form LogWindowView */ 16 | public LogWindowView(MainWindowView mainWindowView) { 17 | this.mainWindowView = mainWindowView; // TODO: this is wrong 18 | initComponents(); 19 | setTitle("SaladoConverter log"); 20 | //setIconImage(Toolkit.getDefaultToolkit().getImage(MainWindowView.class.getResource("resources/icons/appicon.png"))); 21 | setRunning(false); 22 | } 23 | 24 | /** This method is called from within the constructor to 25 | * initialize the form. 26 | * WARNING: Do NOT modify this code. The content of this method is 27 | * always regenerated by the Form Editor. 28 | */ 29 | @SuppressWarnings("unchecked") 30 | // //GEN-BEGIN:initComponents 31 | private void initComponents() { 32 | 33 | jScrollPane1 = new javax.swing.JScrollPane(); 34 | jTextAreaLog = new javax.swing.JTextArea(); 35 | jButtonCancel = new javax.swing.JButton(); 36 | jButtonClose = new javax.swing.JButton(); 37 | 38 | setName("Form"); // NOI18N 39 | setResizable(false); 40 | 41 | jScrollPane1.setName("jScrollPane1"); // NOI18N 42 | 43 | jTextAreaLog.setColumns(20); 44 | org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.panozona.converter.SaladoConverter.class).getContext().getResourceMap(LogWindowView.class); 45 | jTextAreaLog.setFont(resourceMap.getFont("jTextAreaLog.font")); // NOI18N 46 | jTextAreaLog.setRows(5); 47 | jTextAreaLog.setName("jTextAreaLog"); // NOI18N 48 | jScrollPane1.setViewportView(jTextAreaLog); 49 | 50 | jButtonCancel.setText(resourceMap.getString("jButtonCancel.text")); // NOI18N 51 | jButtonCancel.setName("jButtonCancel"); // NOI18N 52 | jButtonCancel.addActionListener(new java.awt.event.ActionListener() { 53 | public void actionPerformed(java.awt.event.ActionEvent evt) { 54 | jButtonCancelActionPerformed(evt); 55 | } 56 | }); 57 | 58 | jButtonClose.setText(resourceMap.getString("jButtonClose.text")); // NOI18N 59 | jButtonClose.setName("jButtonClose"); // NOI18N 60 | jButtonClose.addActionListener(new java.awt.event.ActionListener() { 61 | public void actionPerformed(java.awt.event.ActionEvent evt) { 62 | jButtonCloseActionPerformed(evt); 63 | } 64 | }); 65 | 66 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 67 | getContentPane().setLayout(layout); 68 | layout.setHorizontalGroup( 69 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 70 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 71 | .addContainerGap() 72 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 73 | .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE) 74 | .addGroup(layout.createSequentialGroup() 75 | .addComponent(jButtonCancel) 76 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 77 | .addComponent(jButtonClose))) 78 | .addContainerGap()) 79 | ); 80 | layout.setVerticalGroup( 81 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 82 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 83 | .addContainerGap() 84 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE) 85 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 86 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 87 | .addComponent(jButtonClose) 88 | .addComponent(jButtonCancel)) 89 | .addContainerGap()) 90 | ); 91 | 92 | pack(); 93 | }// //GEN-END:initComponents 94 | 95 | private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed 96 | if (isRunning) { 97 | isCanceled = true; 98 | mainWindowView.cancelRunningTasks(); 99 | } 100 | }//GEN-LAST:event_jButtonCancelActionPerformed 101 | 102 | private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed 103 | this.setVisible(false); 104 | }//GEN-LAST:event_jButtonCloseActionPerformed 105 | 106 | public void append(String text) { 107 | jTextAreaLog.append(text); 108 | } 109 | 110 | public void setRunning(Boolean value) { 111 | isRunning = value; 112 | jButtonCancel.setEnabled(isRunning); 113 | if (isRunning) { 114 | setCanceled(false); 115 | jTextAreaLog.setText(""); 116 | } 117 | } 118 | 119 | public Boolean getRunning() { 120 | return isRunning; 121 | } 122 | 123 | public void setCanceled(Boolean value) { 124 | isCanceled = value; 125 | jButtonCancel.setEnabled(!isCanceled); 126 | } 127 | 128 | public Boolean getCanceled() { 129 | return isCanceled; 130 | } 131 | // Variables declaration - do not modify//GEN-BEGIN:variables 132 | private javax.swing.JButton jButtonCancel; 133 | private javax.swing.JButton jButtonClose; 134 | private javax.swing.JScrollPane jScrollPane1; 135 | private javax.swing.JTextArea jTextAreaLog; 136 | // End of variables declaration//GEN-END:variables 137 | private MainWindowView mainWindowView; 138 | private boolean isRunning; 139 | private boolean isCanceled; 140 | } 141 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/Optimizer.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter; 2 | 3 | import com.panozona.converter.settings.AggregatedSettings; 4 | import com.panozona.converter.task.TaskData; 5 | import java.util.HashMap; 6 | 7 | public class Optimizer { 8 | 9 | private Optimizer() { 10 | } 11 | 12 | static void optimize(TaskData taskData) { 13 | taskData.setNewCubeSize(optimizeCubeSize(taskData.getPanorama().getCubeSize())); 14 | taskData.setNewTileSize(optimizeTileSize(taskData.getNewCubeSize())); 15 | } 16 | 17 | private static int optimizeCubeSize(int size) { 18 | int resize = (int) ((float) AggregatedSettings.getInstance().opt.getResizePercent() / 100f * (float) size); 19 | HashMap optResults = new HashMap(); 20 | for (int newSize = (size - resize); newSize <= (size + resize); newSize++) { 21 | for (int division = 512; division >= 2; division /= 2) { 22 | if (newSize % division == 0) { 23 | if (optResults.get(division) == null 24 | || Math.abs(size - newSize) < Math.abs(size - optResults.get(division).intValue())) { 25 | optResults.put(division, newSize); 26 | } 27 | } 28 | } 29 | } 30 | Integer bestKey = 0; 31 | for (Integer key : optResults.keySet()) { 32 | if (key.intValue() > bestKey.intValue()) { 33 | bestKey = key; 34 | } 35 | } 36 | if (optResults.get(bestKey) != null) { 37 | return optResults.get(bestKey).intValue(); 38 | } else { 39 | return size; 40 | } 41 | } 42 | 43 | private static int optimizeTileSize(int newCubeSize) { 44 | AggregatedSettings aggstngs =AggregatedSettings.getInstance(); 45 | for (int i = aggstngs.opt.getMinTileSize(); i <= aggstngs.opt.getMaxTileSize(); i++) { 46 | if (newCubeSize % i == 0) { 47 | return i; 48 | } 49 | } 50 | 51 | if (aggstngs.opt.getMinTileSize() >= aggstngs.dzt.getTileSize()){ 52 | return aggstngs.opt.getMinTileSize(); 53 | }else if (aggstngs.opt.getMaxTileSize() <= aggstngs.dzt.getTileSize()){ 54 | return aggstngs.opt.getMaxTileSize(); 55 | }else{ 56 | return aggstngs.dzt.getTileSize(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/SaladoConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * SaladoConverter.java 3 | */ 4 | package com.panozona.converter; 5 | 6 | import org.jdesktop.application.Application; 7 | import org.jdesktop.application.SingleFrameApplication; 8 | 9 | /** 10 | * The main class of the application. 11 | */ 12 | public class SaladoConverter extends SingleFrameApplication { 13 | 14 | /** 15 | * At startup create and show the main frame of the application. 16 | */ 17 | @Override 18 | protected void startup() { 19 | show(new MainWindowView(this)); 20 | } 21 | 22 | /** 23 | * This method is to initialize the specified window by injecting resources. 24 | * Windows shown in our application come fully initialized from the GUI 25 | * builder, so this additional configuration is not needed. 26 | */ 27 | @Override 28 | protected void configureWindow(java.awt.Window root) { 29 | } 30 | 31 | /** 32 | * A convenient static getter for the application instance. 33 | * @return the instance of SaladoConverter 34 | */ 35 | public static SaladoConverter getApplication() { 36 | return Application.getInstance(SaladoConverter.class); 37 | } 38 | 39 | /** 40 | * Main method launching the application. 41 | */ 42 | public static void main(String[] args) { 43 | launch(SaladoConverter.class, args); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/Starter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.panozona.converter; 6 | 7 | import com.panozona.converter.settings.AggregatedSettings; 8 | import com.panozona.converter.settings.GESettings; 9 | import com.panozona.converter.utils.CurrentDirectoryFinder; 10 | import java.io.File; 11 | import java.io.FileInputStream; 12 | import java.util.Properties; 13 | 14 | /** 15 | * @author Marek 16 | */ 17 | public class Starter { 18 | 19 | //hey change developmentMode value 20 | public final static boolean developmentMode = false; 21 | 22 | public static void main(String[] args) { 23 | 24 | Properties prop = new Properties(); 25 | 26 | // TODO: DO SOMETHING WIT THIS MESS 27 | AggregatedSettings aggstngs = AggregatedSettings.getInstance(); 28 | aggstngs.setCurrentDirectory((new CurrentDirectoryFinder()).currentDir); 29 | 30 | try { 31 | prop.load(new FileInputStream(aggstngs.currentDirectory + File.separator + AggregatedSettings.FILE_PROPERTIES)); 32 | if (prop.getProperty(GESettings.VALUE_MEMORY_LIMIT) != null) { 33 | aggstngs.ge.setMemoryLimit(Integer.parseInt(prop.getProperty(GESettings.VALUE_MEMORY_LIMIT))); 34 | } 35 | } catch (Exception ex) { 36 | ex.printStackTrace(); 37 | } 38 | 39 | if (developmentMode) { 40 | SaladoConverter.main(args); 41 | } else { 42 | try { 43 | String pathToJar = SaladoConverter.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath(); 44 | ProcessBuilder pb = new ProcessBuilder("java", "-Xmx" + aggstngs.ge.getMemoryLimit() + "m", "-classpath", pathToJar, "com.panozona.converter.SaladoConverter"); 45 | pb.start(); 46 | } catch (Exception ex) { 47 | ex.printStackTrace(); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/TaskSettingsView.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 |
253 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/TaskSettingsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TaskSettingsView.java 3 | * 4 | * Created on 2011-04-17, 21:41:19 5 | */ 6 | package com.panozona.converter; 7 | 8 | import com.panozona.converter.maintable.TaskTableModel; 9 | import com.panozona.converter.settings.AggregatedSettings; 10 | import com.panozona.converter.task.TaskData; 11 | import javax.swing.JOptionPane; 12 | 13 | /** 14 | * @author Marek 15 | */ 16 | public class TaskSettingsView extends javax.swing.JFrame { 17 | 18 | private Controller controller; 19 | private TaskTableModel taskTableModel; 20 | private TaskData currentTaskData; 21 | private boolean allowCloseFlag; 22 | 23 | /** Creates new form TaskSettingsView */ 24 | public TaskSettingsView(TaskTableModel taskTableModel) { 25 | initComponents(); 26 | setTitle("Edit task"); 27 | this.taskTableModel = taskTableModel; 28 | controller = Controller.getInstance(); 29 | allowCloseFlag = true; 30 | } 31 | 32 | /** This method is called from within the constructor to 33 | * initialize the form. 34 | * WARNING: Do NOT modify this code. The content of this method is 35 | * always regenerated by the Form Editor. 36 | */ 37 | @SuppressWarnings("unchecked") 38 | // //GEN-BEGIN:initComponents 39 | private void initComponents() { 40 | 41 | buttonGroupCubeTileSize = new javax.swing.ButtonGroup(); 42 | jButtonTaskOK = new javax.swing.JButton(); 43 | jButtonTaskCancel = new javax.swing.JButton(); 44 | jPanel1 = new javax.swing.JPanel(); 45 | jRadioButtonAutosize = new javax.swing.JRadioButton(); 46 | jRadioButtonCustom = new javax.swing.JRadioButton(); 47 | jPanel2 = new javax.swing.JPanel(); 48 | jLabel3 = new javax.swing.JLabel(); 49 | jTextFieldCubeSize = new javax.swing.JTextField(); 50 | jLabel4 = new javax.swing.JLabel(); 51 | jTextFieldTileSize = new javax.swing.JTextField(); 52 | jLabelTileDefaultCubeSize = new javax.swing.JLabel(); 53 | jLabelTileDefaultTileSize = new javax.swing.JLabel(); 54 | jLabel1 = new javax.swing.JLabel(); 55 | jLabel2 = new javax.swing.JLabel(); 56 | 57 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 58 | setAlwaysOnTop(true); 59 | setName("Form"); // NOI18N 60 | setResizable(false); 61 | 62 | org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.panozona.converter.SaladoConverter.class).getContext().getResourceMap(TaskSettingsView.class); 63 | jButtonTaskOK.setText(resourceMap.getString("jButtonTaskOK.text")); // NOI18N 64 | jButtonTaskOK.setName("jButtonTaskOK"); // NOI18N 65 | jButtonTaskOK.addActionListener(new java.awt.event.ActionListener() { 66 | public void actionPerformed(java.awt.event.ActionEvent evt) { 67 | jButtonTaskOKActionPerformed(evt); 68 | } 69 | }); 70 | 71 | jButtonTaskCancel.setText(resourceMap.getString("jButtonTaskCancel.text")); // NOI18N 72 | jButtonTaskCancel.setName("jButtonTaskCancel"); // NOI18N 73 | jButtonTaskCancel.addActionListener(new java.awt.event.ActionListener() { 74 | public void actionPerformed(java.awt.event.ActionEvent evt) { 75 | jButtonTaskCancelActionPerformed(evt); 76 | } 77 | }); 78 | 79 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Cube and tile size")); 80 | jPanel1.setName("jPanel1"); // NOI18N 81 | 82 | buttonGroupCubeTileSize.add(jRadioButtonAutosize); 83 | jRadioButtonAutosize.setText(resourceMap.getString("jRadioButtonAutosize.text")); // NOI18N 84 | jRadioButtonAutosize.setName("jRadioButtonAutosize"); // NOI18N 85 | jRadioButtonAutosize.addActionListener(new java.awt.event.ActionListener() { 86 | public void actionPerformed(java.awt.event.ActionEvent evt) { 87 | jRadioButtonAutosizeActionPerformed(evt); 88 | } 89 | }); 90 | 91 | buttonGroupCubeTileSize.add(jRadioButtonCustom); 92 | jRadioButtonCustom.setText(resourceMap.getString("jRadioButtonCustom.text")); // NOI18N 93 | jRadioButtonCustom.setName("jRadioButtonCustom"); // NOI18N 94 | jRadioButtonCustom.addActionListener(new java.awt.event.ActionListener() { 95 | public void actionPerformed(java.awt.event.ActionEvent evt) { 96 | jRadioButtonCustomActionPerformed(evt); 97 | } 98 | }); 99 | 100 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 101 | jPanel1.setLayout(jPanel1Layout); 102 | jPanel1Layout.setHorizontalGroup( 103 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 104 | .addGroup(jPanel1Layout.createSequentialGroup() 105 | .addContainerGap() 106 | .addComponent(jRadioButtonCustom) 107 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 108 | .addComponent(jRadioButtonAutosize) 109 | .addContainerGap(77, Short.MAX_VALUE)) 110 | ); 111 | jPanel1Layout.setVerticalGroup( 112 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 113 | .addGroup(jPanel1Layout.createSequentialGroup() 114 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 115 | .addComponent(jRadioButtonCustom) 116 | .addComponent(jRadioButtonAutosize, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) 117 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 118 | ); 119 | 120 | jPanel2.setName("jPanel2"); // NOI18N 121 | 122 | jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N 123 | jLabel3.setName("jLabel3"); // NOI18N 124 | 125 | jTextFieldCubeSize.setName("jTextFieldCubeSize"); // NOI18N 126 | 127 | jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N 128 | jLabel4.setName("jLabel4"); // NOI18N 129 | 130 | jTextFieldTileSize.setName("jTextFieldTileSize"); // NOI18N 131 | 132 | jLabelTileDefaultCubeSize.setText(resourceMap.getString("jLabelTileDefaultCubeSize.text")); // NOI18N 133 | jLabelTileDefaultCubeSize.setName("jLabelTileDefaultCubeSize"); // NOI18N 134 | 135 | jLabelTileDefaultTileSize.setText(resourceMap.getString("jLabelTileDefaultTileSize.text")); // NOI18N 136 | jLabelTileDefaultTileSize.setName("jLabelTileDefaultTileSize"); // NOI18N 137 | 138 | jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N 139 | jLabel1.setName("jLabel1"); // NOI18N 140 | 141 | jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N 142 | jLabel2.setName("jLabel2"); // NOI18N 143 | 144 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); 145 | jPanel2.setLayout(jPanel2Layout); 146 | jPanel2Layout.setHorizontalGroup( 147 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 148 | .addGroup(jPanel2Layout.createSequentialGroup() 149 | .addContainerGap() 150 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 151 | .addComponent(jLabel1) 152 | .addComponent(jLabel2)) 153 | .addGap(18, 18, 18) 154 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 155 | .addGroup(jPanel2Layout.createSequentialGroup() 156 | .addComponent(jLabelTileDefaultTileSize) 157 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 158 | .addComponent(jLabel4)) 159 | .addGroup(jPanel2Layout.createSequentialGroup() 160 | .addComponent(jLabelTileDefaultCubeSize) 161 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 162 | .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))) 163 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 164 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 165 | .addComponent(jTextFieldTileSize, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE) 166 | .addComponent(jTextFieldCubeSize, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)) 167 | .addContainerGap()) 168 | ); 169 | jPanel2Layout.setVerticalGroup( 170 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 171 | .addGroup(jPanel2Layout.createSequentialGroup() 172 | .addContainerGap() 173 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 174 | .addComponent(jTextFieldCubeSize, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) 175 | .addComponent(jLabel3) 176 | .addComponent(jLabelTileDefaultCubeSize) 177 | .addComponent(jLabel1)) 178 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 179 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 180 | .addComponent(jTextFieldTileSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 181 | .addComponent(jLabel4) 182 | .addComponent(jLabelTileDefaultTileSize) 183 | .addComponent(jLabel2)) 184 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 185 | ); 186 | 187 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 188 | getContentPane().setLayout(layout); 189 | layout.setHorizontalGroup( 190 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 191 | .addGroup(layout.createSequentialGroup() 192 | .addContainerGap() 193 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 194 | .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 195 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 196 | .addComponent(jButtonTaskOK, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) 197 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 198 | .addComponent(jButtonTaskCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) 199 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 200 | .addContainerGap()) 201 | ); 202 | layout.setVerticalGroup( 203 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 204 | .addGroup(layout.createSequentialGroup() 205 | .addContainerGap() 206 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 207 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 208 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 209 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 210 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 211 | .addComponent(jButtonTaskCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) 212 | .addComponent(jButtonTaskOK, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)) 213 | .addContainerGap()) 214 | ); 215 | 216 | pack(); 217 | }// //GEN-END:initComponents 218 | 219 | private void jButtonTaskOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTaskOKActionPerformed 220 | collectAllData(); 221 | if (allowCloseFlag) { 222 | this.dispose(); 223 | taskTableModel.fireTableDataChanged(); 224 | controller.applyCommand(); 225 | } 226 | allowCloseFlag = true; 227 | }//GEN-LAST:event_jButtonTaskOKActionPerformed 228 | 229 | private void jButtonTaskCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTaskCancelActionPerformed 230 | this.dispose(); 231 | }//GEN-LAST:event_jButtonTaskCancelActionPerformed 232 | 233 | private void jRadioButtonCustomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonCustomActionPerformed 234 | jTextFieldCubeSize.setEditable(jRadioButtonCustom.isSelected()); 235 | jTextFieldTileSize.setEditable(jRadioButtonCustom.isSelected()); 236 | if (jRadioButtonAutosize.isSelected()) { 237 | Optimizer.optimize(currentTaskData); 238 | displayTaskData(currentTaskData); 239 | } 240 | }//GEN-LAST:event_jRadioButtonCustomActionPerformed 241 | 242 | private void jRadioButtonAutosizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonAutosizeActionPerformed 243 | jTextFieldCubeSize.setEditable(jRadioButtonCustom.isSelected()); 244 | jTextFieldTileSize.setEditable(jRadioButtonCustom.isSelected()); 245 | if (jRadioButtonAutosize.isSelected()) { 246 | Optimizer.optimize(currentTaskData); 247 | displayTaskData(currentTaskData); 248 | } 249 | }//GEN-LAST:event_jRadioButtonAutosizeActionPerformed 250 | 251 | public void displayTaskData(TaskData taskData) { 252 | currentTaskData = taskData; 253 | 254 | jLabelTileDefaultCubeSize.setText(Integer.toString(currentTaskData.getPanorama().getCubeSize())); 255 | jLabelTileDefaultTileSize.setText(Integer.toString(AggregatedSettings.getInstance().dzt.getTileSize())); 256 | 257 | jTextFieldCubeSize.setText(Integer.toString(currentTaskData.getNewCubeSize())); 258 | jTextFieldTileSize.setText(Integer.toString(currentTaskData.getNewTileSize())); 259 | 260 | if (currentTaskData.autosize) { 261 | jRadioButtonAutosize.setSelected(true); 262 | } else { 263 | jRadioButtonCustom.setSelected(false); 264 | } 265 | jTextFieldCubeSize.setEditable(jRadioButtonCustom.isSelected()); 266 | jTextFieldTileSize.setEditable(jRadioButtonCustom.isSelected()); 267 | } 268 | 269 | private void collectAllData() { 270 | try { 271 | currentTaskData.autosize = jRadioButtonAutosize.isSelected(); 272 | if (!currentTaskData.autosize) { 273 | currentTaskData.setNewCubeSize(jTextFieldCubeSize.getText()); 274 | currentTaskData.setNewTileSize(jTextFieldTileSize.getText()); 275 | } 276 | } catch (IllegalArgumentException ex) { 277 | showOptionPane(ex.getMessage()); 278 | } 279 | } 280 | 281 | private void showOptionPane(String message) { 282 | JOptionPane.showMessageDialog(this, message); 283 | allowCloseFlag = false; 284 | } 285 | // Variables declaration - do not modify//GEN-BEGIN:variables 286 | private javax.swing.ButtonGroup buttonGroupCubeTileSize; 287 | private javax.swing.JButton jButtonTaskCancel; 288 | private javax.swing.JButton jButtonTaskOK; 289 | private javax.swing.JLabel jLabel1; 290 | private javax.swing.JLabel jLabel2; 291 | private javax.swing.JLabel jLabel3; 292 | private javax.swing.JLabel jLabel4; 293 | private javax.swing.JLabel jLabelTileDefaultCubeSize; 294 | private javax.swing.JLabel jLabelTileDefaultTileSize; 295 | private javax.swing.JPanel jPanel1; 296 | private javax.swing.JPanel jPanel2; 297 | private javax.swing.JRadioButton jRadioButtonAutosize; 298 | private javax.swing.JRadioButton jRadioButtonCustom; 299 | private javax.swing.JTextField jTextFieldCubeSize; 300 | private javax.swing.JTextField jTextFieldTileSize; 301 | // End of variables declaration//GEN-END:variables 302 | } 303 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/maintable/TaskTableCheckBoxCellEditor.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.maintable; 2 | 3 | import com.panozona.converter.MainWindowView; 4 | import com.panozona.converter.task.TaskData; 5 | import java.awt.Component; 6 | import java.awt.event.ActionEvent; 7 | import java.awt.event.ActionListener; 8 | import javax.swing.AbstractCellEditor; 9 | import javax.swing.JCheckBox; 10 | import javax.swing.JTable; 11 | import javax.swing.SwingConstants; 12 | import javax.swing.table.TableCellEditor; 13 | 14 | /** 15 | * @author Marek 16 | */ 17 | public class TaskTableCheckBoxCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener { 18 | 19 | private TaskData taskData; 20 | private JCheckBox jcheckbox; 21 | private MainWindowView mainWindowWiev; 22 | 23 | public TaskTableCheckBoxCellEditor(){ 24 | jcheckbox = new JCheckBox(); 25 | jcheckbox.addActionListener(this); 26 | jcheckbox.setHorizontalAlignment(SwingConstants.CENTER); 27 | jcheckbox.setVerticalAlignment(SwingConstants.CENTER); 28 | } 29 | 30 | public void setMainWindowViewReference(MainWindowView mainWindowWiev){ 31 | this.mainWindowWiev = mainWindowWiev; 32 | } 33 | 34 | 35 | @Override 36 | public Object getCellEditorValue() { 37 | return taskData; 38 | } 39 | 40 | @Override 41 | public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { 42 | taskData = (TaskData)value; 43 | jcheckbox.setSelected(taskData.checkBoxSelected); 44 | jcheckbox.setEnabled(taskData.checkBoxEnabled); 45 | return jcheckbox; 46 | } 47 | 48 | @Override 49 | public void actionPerformed(ActionEvent e) { 50 | if(taskData.checkBoxEnabled){ 51 | taskData.checkBoxSelected = jcheckbox.isSelected(); 52 | } 53 | jcheckbox.setSelected(taskData.checkBoxSelected); 54 | jcheckbox.setEnabled(taskData.checkBoxEnabled); 55 | mainWindowWiev.analyseTasks(); 56 | } 57 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/maintable/TaskTableCheckBoxCellRenderer.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.maintable; 2 | 3 | import com.panozona.converter.task.TaskData; 4 | import java.awt.Component; 5 | import javax.swing.JCheckBox; 6 | import javax.swing.JTable; 7 | import javax.swing.SwingConstants; 8 | import javax.swing.table.TableCellRenderer; 9 | 10 | /** 11 | * @author Marek 12 | */ 13 | public class TaskTableCheckBoxCellRenderer implements TableCellRenderer{ 14 | 15 | private JCheckBox jcheckbox; 16 | 17 | public TaskTableCheckBoxCellRenderer(){ 18 | jcheckbox = new JCheckBox(); 19 | } 20 | 21 | @Override 22 | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { 23 | jcheckbox.setSelected(((TaskData)value).checkBoxSelected); 24 | jcheckbox.setEnabled(((TaskData)value).checkBoxEnabled); 25 | jcheckbox.setHorizontalAlignment(SwingConstants.CENTER); 26 | jcheckbox.setVerticalAlignment(SwingConstants.CENTER); 27 | return jcheckbox; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/maintable/TaskTableModel.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.maintable; 2 | 3 | import com.panozona.converter.task.TaskData; 4 | import java.util.ArrayList; 5 | import javax.swing.table.AbstractTableModel; 6 | 7 | /** 8 | * 9 | * @author Marek 10 | */ 11 | public class TaskTableModel extends AbstractTableModel { 12 | 13 | public String[] columnNames = {"R", "Status", "Cube size", "Tile size", "Directory"}; 14 | public ArrayList rows; 15 | 16 | public TaskTableModel() { 17 | super(); 18 | this.rows = new ArrayList(); 19 | } 20 | 21 | @Override 22 | public int getRowCount() { 23 | return rows.size(); 24 | } 25 | 26 | @Override 27 | public int getColumnCount() { 28 | return columnNames.length; 29 | } 30 | 31 | @Override 32 | public String getColumnName(int col) { 33 | return columnNames[col]; 34 | } 35 | 36 | @Override 37 | public Object getValueAt(int rowIndex, int columnIndex) { 38 | switch (columnIndex) { 39 | case 0: 40 | return rows.get(rowIndex); 41 | case 1: 42 | return rows.get(rowIndex).state; 43 | case 2: 44 | return rows.get(rowIndex).getCubeSizeDescription(); 45 | case 3: 46 | return rows.get(rowIndex).getTileSizeDescription(); 47 | case 4: 48 | return rows.get(rowIndex).getPathDescription(); 49 | default: 50 | return null; 51 | } 52 | } 53 | 54 | public void addRow(TaskData newTaskData) { 55 | rows.add(newTaskData); 56 | fireTableDataChanged(); 57 | } 58 | 59 | public void removeItem(TaskData taskData) { 60 | rows.remove(taskData); 61 | fireTableDataChanged(); 62 | } 63 | 64 | @Override 65 | public boolean isCellEditable(int row, int col) { 66 | return (col == 0); 67 | } 68 | 69 | @Override 70 | public void setValueAt(Object value, int row, int col) { 71 | rows.set(row, (TaskData) value); 72 | fireTableCellUpdated(row, col); 73 | } 74 | 75 | public boolean hasActiveTasks() { 76 | for (TaskData taskData : rows) { 77 | if (taskData.checkBoxEnabled && taskData.checkBoxSelected) { 78 | return true; 79 | } 80 | } 81 | return false; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/AboutWindowView.properties: -------------------------------------------------------------------------------- 1 | title = About: SaladoConverter 2 | 3 | closeAboutBox.Action.text = &Close 4 | 5 | versionLabel.text=Product Version: 6 | 7 | vendorLabel.text=Author: 8 | homepageLabel.text=Homepage: 9 | appHomepageLabel.text=PanoZona.com 10 | #NOI18N 11 | appHomepageLabel.foreground=0, 0, 255 12 | #NOI18N 13 | appHomepageLabel.font=Tahoma-Plain-11 14 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/LogWindowView.properties: -------------------------------------------------------------------------------- 1 | jButton2.text=jButton2 2 | closeLogWindow.Action.text=Close 3 | closeLogWindow.Action.shortDescription=Close Log window 4 | CancelRun.Action.shortDescription=Cancel running operation 5 | CancelRun.Action.text=Cancel 6 | jButtonCancel.text=Cancel 7 | jButtonClose.text=Close 8 | #NOI18N 9 | jTextAreaLog.font=Monospaced-Plain-12 10 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/MainWindowView.properties: -------------------------------------------------------------------------------- 1 | # Resources for the PanoSaladoConverterView class 2 | 3 | # top-level menus 4 | 5 | fileMenu.text = File 6 | helpMenu.text = Help 7 | 8 | # @Action resources 9 | 10 | showAboutBox.Action.text = &About... 11 | showAboutBox.Action.shortDescription = Show the application's information dialog 12 | 13 | # status bar resources 14 | 15 | StatusBar.messageTimeout = 5000 16 | StatusBar.busyAnimationRate = 30 17 | StatusBar.idleIcon = busyicons/idle-icon.png 18 | StatusBar.busyIcons[0] = busyicons/busy-icon0.png 19 | StatusBar.busyIcons[1] = busyicons/busy-icon1.png 20 | StatusBar.busyIcons[2] = busyicons/busy-icon2.png 21 | StatusBar.busyIcons[3] = busyicons/busy-icon3.png 22 | StatusBar.busyIcons[4] = busyicons/busy-icon4.png 23 | StatusBar.busyIcons[5] = busyicons/busy-icon5.png 24 | StatusBar.busyIcons[6] = busyicons/busy-icon6.png 25 | StatusBar.busyIcons[7] = busyicons/busy-icon7.png 26 | StatusBar.busyIcons[8] = busyicons/busy-icon8.png 27 | StatusBar.busyIcons[9] = busyicons/busy-icon9.png 28 | StatusBar.busyIcons[10] = busyicons/busy-icon10.png 29 | StatusBar.busyIcons[11] = busyicons/busy-icon11.png 30 | StatusBar.busyIcons[12] = busyicons/busy-icon12.png 31 | StatusBar.busyIcons[13] = busyicons/busy-icon13.png 32 | StatusBar.busyIcons[14] = busyicons/busy-icon14.png 33 | showSettingsFrame.Action.text=Settings 34 | showSettingsFrame.Action.accelerator=alt pressed S 35 | showSettingsFrame.Action.shortDescription=Change application settings 36 | fileMenuLog.text=Show log 37 | showLogFrame.Action.text=Show log 38 | showLogFrame.Action.accelerator=alt pressed L 39 | showLogFrame.Action.shortDescription=Display info from last run 40 | chooseCommandActionPerformed.Action.text= 41 | chooseCommandActionPerformed.Action.shortDescription= 42 | OpenFolerActionPerformed.Action.shortDescription= 43 | OpenFolerActionPerformed.Action.text= 44 | selectOutput.Action.text= 45 | selectOutput.Action.shortDescription= 46 | runAllTasks.Action.text= 47 | runAllTasks.Action.shortDescription= 48 | jButton5.text=jButton5 49 | RemoveTask.Action.shortDescription= 50 | RemoveTask.Action.text=Remove 51 | clearTasks.Action.shortDescription= 52 | clearTasks.Action.text=Clear 53 | jButtonAddTask.text=Add 54 | jButtonRemoveTask.text=Remove 55 | fileMenuSettings.text=Settings 56 | jButtonClearTasks.text=Clear 57 | jButtonSelectOutput.text=Output 58 | jTextFieldOutputDir.text= 59 | jButtonRunTasks.text=Run 60 | jFileChooser.dialogTitle=Open file or folder 61 | fileMenuExit.text=Exit 62 | RunTasks.Action.text=Run 63 | RunTasks.Action.shortDescription= 64 | jMenuItemOnlineHelp.text=Online help 65 | jButtonEdit.text=Edit 66 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/SaladoConverter.properties: -------------------------------------------------------------------------------- 1 | # Application global resources 2 | 3 | Application.name = PanoSaladoConverter 4 | Application.title = SaladoConverter 5 | Application.version = 0.5 6 | Application.vendor = Marek Standio 7 | Application.homepage = http://panosalado.com/ 8 | Application.description = Interface for tools provided with PanoSalado.v2 9 | Application.vendorId = Sun 10 | Application.id = SaladoConverter 11 | Application.lookAndFeel = system 12 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/SettingsWindowView.properties: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | jTabbedPane1.toolTipText=Choose tool to configure 5 | TabbedPane.toolTipText=Choose tool to configure 6 | jLabel3.text=Wall overlap (px) 7 | jLabel9.text=*.jar directory 8 | jButton3.text=jButton3 9 | browseEC.Action.text=... 10 | browseEC.Action.shortDescription=Browse for *.jar file 11 | jLabel10.text=*.jar directory 12 | jLabel8.text=Tile size 13 | jLabel7.text=Tile overlap (px) 14 | jLabel5.text=*.jpg quality 15 | GeneralTab.TabConstraints.tabTitle=SaladoConverter 16 | browseDZT.Action.text=... 17 | browseDZT.Action.shortDescription= 18 | jButton5.text=jButton5 19 | restoreDefaultEC.Action.shortDescription= 20 | restoreDefaultEC.Action.text=Restore default 21 | restoreDefaultDZT.Action.shortDescription= 22 | restoreDefaultDZT.Action.text=Restore default 23 | saveSettingsAndClose.Action.shortDescription= 24 | saveSettingsAndClose.Action.text=OK 25 | closeWithoutSaving.Action.shortDescription= 26 | closeWithoutSaving.Action.text=Cancel 27 | restoreDefaultGeneral.Action.shortDescription= 28 | restoreDefaultGeneral.Action.text=Restore Default 29 | jButtonOK.text=OK 30 | jButtonCancel.text=Cancel 31 | jTextFieldECOverlap.text= 32 | jTextFieldECDirectory.text= 33 | jTextFieldDZTDirectory.text= 34 | jButtonECRestoreDefault.text=Restore default 35 | jButtonDZTRestoreDefault.text=Restore default 36 | jButtonGERestoreDefault.text=Restore default 37 | jButtonGERestoreDefault.actionCommand=Restore default 38 | jButtonECBrowseDirectory.text=... 39 | jButtonDZTBrowseDirectory.text=... 40 | jLabel4.text=Interpolation 41 | jLabel15.text=Temporary directory 42 | jButtonGEBrowseDirectory.text=... 43 | jLabel2.text=Memory limit (MB) 44 | TabbedPane.AccessibleContext.accessibleName=General 45 | jLabel11.text=*.jar directory 46 | jButtonRESRestoreDefault.text=Restore default 47 | jButtonRESBrowseDirectory.text=... 48 | jCheckBoxGERemoveObsoleteDZ.text=Remove obsolete Deep Zoom files 49 | jCheckBoxGEOverwriteOutput.text=Overwrite output directories 50 | ResizerTab.TabConstraints.tabTitle=Resizer 51 | ComponentsTab.TabConstraints.tabTitle=Components 52 | AutosizeTab.TabConstraints.tabTitle=Autosize 53 | EquirectangularToCubicTab.TabConstraints.tabTitle=EquirectangularToCubic 54 | DeepZoomTilerTab.TabConstraints.tabTitle=DeepZoomTiler 55 | jButtonOPTRestoreDefault.text=Restore default 56 | jLabel1.text=Cube resize (%) 57 | jLabel6.text=Tile max size 58 | jLabel12.text=Tile min size 59 | jTextFieldOPTMaxTileSize.text= 60 | jTextFieldOPTMinTileSize.text= 61 | jTextFieldGEMemoryLimit.text= 62 | jTextFieldOPTResizePercent.text= 63 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/TaskSettingsView.properties: -------------------------------------------------------------------------------- 1 | jLabel1.text=Cube size: 2 | jButtonTaskOK.text=OK 3 | jButtonTaskCancel.text=Cancel 4 | jLabel3.text=to 5 | jTextFieldTaskResize.text= 6 | jLabelOriginalValue.text=[Orginal value] 7 | jLabel2.text=Tile size: 8 | jRadioButtonDefault.text=Default 9 | jRadioButtonCustom.text=Custom 10 | jRadioButtonDivision.text=Cube size by 11 | jRadioButtonDivision.actionCommand=Cube size by 12 | jLabelDivResult.text=[Division resut] 13 | jTextFieldTileCustom.text= 14 | jLabelTileDefaultValue.text=[DefaultValue] 15 | jLabelTileEquals.text== 16 | jLabel4.text=to 17 | jRadioButtonAutosize.text=Autosize 18 | jLabelTileDefaultCubeSize.text=[value] 19 | jLabelTileDefaultTileSize.text=[value] 20 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/TaskSettingsView2.properties: -------------------------------------------------------------------------------- 1 | 2 | jButtonTaskOK.text=OK 3 | jLabelTileDefaultValue1.text=[DefaultValue] 4 | jLabel4.text=to 5 | jTextField1.text= 6 | jLabelTileDefaultValue2.text=[DefaultValue] 7 | jRadioButtonCustom.text=Custom values 8 | jRadioButtonOptimise.text=Auto 9 | jPanel1.border.title=Cube and tile size 10 | jButtonTaskCancel.text=Cancel 11 | jLabel1.text=Cube size: 12 | jLabel2.text=Tile size: 13 | jLabel3.text=to 14 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/about.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon0.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon1.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon10.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon11.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon12.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon13.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon14.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon2.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon3.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon4.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon5.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon6.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon7.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon8.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/busy-icon9.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/busyicons/idle-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/busyicons/idle-icon.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/SaladoConverter/src/com/panozona/converter/resources/splash.png -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/AggregatedSettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | /** 4 | * @author Marek Standio 5 | */ 6 | public class AggregatedSettings { 7 | 8 | public GESettings ge; 9 | public OPTSettings opt; 10 | public ECSettings ec; 11 | public RESSettings res; 12 | public DZTSettings dzt; 13 | public String currentDirectory = ""; 14 | 15 | public static final String FILE_PROPERTIES = "settings.properties"; // GAH 16 | 17 | private static AggregatedSettings instance; 18 | 19 | private AggregatedSettings() { 20 | } 21 | 22 | public void setCurrentDirectory(String value) { 23 | currentDirectory = value; 24 | ge = new GESettings(value); 25 | opt = new OPTSettings(); 26 | ec = new ECSettings(value); 27 | res = new RESSettings(value); 28 | dzt = new DZTSettings(value); 29 | } 30 | 31 | public static AggregatedSettings getInstance() { 32 | if (instance == null) { 33 | instance = new AggregatedSettings(); 34 | } 35 | return instance; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/DZTSettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | import com.panozona.converter.utils.Messages; 4 | import java.io.File; 5 | 6 | /** 7 | * @author Marek Standio 8 | */ 9 | public class DZTSettings { 10 | 11 | public static final String JAR_CLASSNAME = "deepzoomtiler.DeepZoomTiler"; 12 | public static final String JAR_FILENAME = "DeepZoomTiler.jar"; 13 | public static final String VALUE_TILE_OVERLAP = "DZT_tileOverlap"; 14 | public static final String VALUE_TILE_SIZE = "DZT_tileSize"; 15 | public static final String VALUE_QUALITY = "DZT_quality"; 16 | public static final String VALUE_JAR_DIR = "DZT_jarDir"; 17 | private int tileOverlap; 18 | private int tileSize; 19 | private float quality; 20 | private String jarDir; 21 | private final int defaultTileOverlap = 1; 22 | private final int defaultTileSize = 512; 23 | private final float defaultQuality = 0.8f; 24 | private String defaultJarDir = ""; 25 | 26 | public DZTSettings(String currentDirectory) { 27 | if (currentDirectory != null) { 28 | defaultJarDir = currentDirectory 29 | + File.separator 30 | + "components" 31 | + File.separator 32 | + JAR_FILENAME; 33 | } 34 | tileOverlap = defaultTileOverlap; 35 | tileSize = defaultTileSize; 36 | quality = defaultQuality; 37 | jarDir = defaultJarDir; 38 | } 39 | 40 | public void setTileOverlap(String value) throws IllegalArgumentException { 41 | if (value != null) { 42 | try { 43 | setTileOverlap(Integer.parseInt(value)); 44 | } catch (Exception ex) { 45 | throw new IllegalArgumentException(Messages.DZT_TILE_OVERLAP_ERROR); 46 | } 47 | } 48 | } 49 | 50 | public void setTileOverlap(int value) throws IllegalArgumentException { 51 | if (value >= 0) { 52 | tileOverlap = value; 53 | } else { 54 | throw new IllegalArgumentException(Messages.DZT_TILE_OVERLAP_ERROR); 55 | } 56 | } 57 | 58 | public int getTileOverlap() { 59 | return tileOverlap; 60 | } 61 | 62 | public int getDefaultTileOverlap() { 63 | return defaultTileOverlap; 64 | } 65 | 66 | public boolean tileOverlapChanged() { 67 | return (tileOverlap != defaultTileOverlap); 68 | } 69 | 70 | public void setTileSize(String value) throws IllegalArgumentException { 71 | if (value != null) { 72 | try { 73 | setTileSize(Integer.parseInt(value)); 74 | } catch (Exception ex) { 75 | throw new IllegalArgumentException(Messages.DZT_TILESIZE_ERROR); 76 | } 77 | } 78 | } 79 | 80 | public void setTileSize(int value) throws IllegalArgumentException { 81 | if (value > 0) { 82 | tileSize = value; 83 | } else { 84 | throw new IllegalArgumentException(Messages.DZT_TILESIZE_ERROR); 85 | } 86 | } 87 | 88 | public int getTileSize() { 89 | return tileSize; 90 | } 91 | 92 | public int getDefaultTileSize() { 93 | return defaultTileSize; 94 | } 95 | 96 | public boolean tileSizeChanged() { 97 | return (tileSize != defaultTileSize); 98 | } 99 | 100 | public void setQuality(String value) throws IllegalArgumentException { 101 | if (value != null) { 102 | try { 103 | setQuality(Float.parseFloat(value)); 104 | } catch (Exception ex) { 105 | throw new IllegalArgumentException(Messages.DZT_QUALITY_ERROR); 106 | } 107 | } 108 | } 109 | 110 | public void setQuality(float value) throws IllegalArgumentException { 111 | if (value > 0f && value <= 1f) { 112 | quality = value; 113 | } else { 114 | throw new IllegalArgumentException(Messages.DZT_QUALITY_ERROR); 115 | } 116 | } 117 | 118 | public float getQuality() { 119 | return quality; 120 | } 121 | 122 | public float getDefaultQuality() { 123 | return defaultQuality; 124 | } 125 | 126 | public boolean qualityChanged() { 127 | return (quality != defaultQuality); 128 | } 129 | 130 | public void setJarDir(String value) throws IllegalArgumentException { 131 | if (value != null) { 132 | File tmp = new File(value); 133 | if (tmp.isFile() && value.endsWith(".jar")) { 134 | jarDir = value; 135 | } else { 136 | throw new IllegalArgumentException(Messages.DZT_JAR_DIR_ERROR); 137 | } 138 | } 139 | } 140 | 141 | public String getJarDir() { 142 | return jarDir; 143 | } 144 | 145 | public String getDefaultJarDir() { 146 | return defaultJarDir; 147 | } 148 | 149 | public boolean jarDirChanged() { 150 | return !(jarDir.equals(defaultJarDir)); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/ECSettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | import com.panozona.converter.utils.Messages; 4 | import java.io.File; 5 | 6 | /** 7 | * @author Marek Standio 8 | */ 9 | public class ECSettings { 10 | 11 | public static final String JAR_CLASSNAME = "equirectangulartocubic.EquirectangularToCubic"; 12 | public static final String JAR_FILENAME = "EquirectangularToCubic.jar"; 13 | public static final String VALUE_WALL_OVERLAP = "EC_wallOverlap"; 14 | public static final String VALUE_INTERPOLATION = "EC_interpolation"; 15 | public static final String VALUE_JAR_DIR = "EC_jarDir"; 16 | private static final String INTERPOLATION_LANCZOS2 = "lanczos2"; 17 | private static final String INTERPOLATION_BILINEAR = "bilinear"; 18 | private static final String INTERPOLATION_NEAREST_NEIGHBOUR = "nearest-neighbour"; 19 | private int wallOverlap; 20 | private String interpolation; 21 | private String jarDir; 22 | private final int defaultWallOverlap = 1; 23 | private final String defaultInterpolation = INTERPOLATION_LANCZOS2; 24 | private String defaultJarDir = ""; 25 | 26 | public ECSettings(String currentDirectory) { 27 | if (currentDirectory != null) { 28 | defaultJarDir = currentDirectory 29 | + File.separator 30 | + "components" 31 | + File.separator 32 | + JAR_FILENAME; 33 | } 34 | wallOverlap = defaultWallOverlap; 35 | interpolation = defaultInterpolation; 36 | jarDir = defaultJarDir; 37 | } 38 | 39 | public String[] getInterpolationNames() { 40 | return new String[]{INTERPOLATION_LANCZOS2, INTERPOLATION_BILINEAR, INTERPOLATION_NEAREST_NEIGHBOUR}; 41 | } 42 | 43 | public void setWallOverlap(String value) throws IllegalArgumentException { 44 | if (value != null) { 45 | try { 46 | setWallOverlap(Integer.parseInt(value)); 47 | } catch (Exception ex) { 48 | throw new IllegalArgumentException(Messages.EC_WALL_OVERLAP_ERROR); 49 | } 50 | } 51 | } 52 | 53 | public void setWallOverlap(int value) throws IllegalArgumentException { 54 | if (value >= 0) { 55 | wallOverlap = value; 56 | } else { 57 | throw new IllegalArgumentException(Messages.EC_WALL_OVERLAP_ERROR); 58 | } 59 | } 60 | 61 | public int getWallOverlap() { 62 | return wallOverlap; 63 | } 64 | 65 | public int getDefaultWallOverlap() { 66 | return defaultWallOverlap; 67 | } 68 | 69 | public boolean wallOverlapChanged() { 70 | return (wallOverlap != defaultWallOverlap); 71 | } 72 | 73 | public void setInterpolation(String value) throws IllegalArgumentException { 74 | if (value != null) { 75 | if (value.equals(INTERPOLATION_BILINEAR) || value.equals(INTERPOLATION_LANCZOS2) || value.equals(INTERPOLATION_NEAREST_NEIGHBOUR)) { 76 | interpolation = value; 77 | } else { 78 | throw new IllegalArgumentException(Messages.EC_INTERPOLATION_ERROR); 79 | } 80 | } 81 | } 82 | 83 | public String getInterpolation() { 84 | return interpolation; 85 | } 86 | 87 | public String getDefaultInterpolation() { 88 | return defaultInterpolation; 89 | } 90 | 91 | public boolean interpolationChanged() { 92 | return !(interpolation.equals(defaultInterpolation)); 93 | } 94 | 95 | public void setJarDir(String value) throws IllegalArgumentException { 96 | if (value != null) { 97 | File tmp = new File(value); 98 | if (tmp.isFile() && value.endsWith(".jar")) { 99 | jarDir = value; 100 | } else { 101 | throw new IllegalArgumentException(Messages.EC_JAR_DIR_ERROR); 102 | } 103 | } 104 | } 105 | 106 | public String getJarDir() { 107 | return jarDir; 108 | } 109 | 110 | public String getDefaultJarDir() { 111 | return defaultJarDir; 112 | } 113 | 114 | public boolean jarDirChanged() { 115 | return !(jarDir.equals(defaultJarDir)); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/GESettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | import com.panozona.converter.utils.Messages; 4 | import java.io.File; 5 | 6 | /** 7 | * @author Marek Standio 8 | */ 9 | public class GESettings { 10 | 11 | public static final String VALUE_TMP_DIR = "GE_tmp_dir"; 12 | public static final String VALUE_MEMORY_LIMIT = "GE_memory_limit"; 13 | public static final String VALUE_REMOVE_OBSOLETE = "GE_remove_obsolete"; 14 | public static final String VALUE_OVERWRITE_OUTPUT = "GE_overwrite_output"; 15 | public static final String VALUE_INPUT_DIR = "GE_input_dir"; 16 | public static final String VALUE_OUTPUT_DIR = "GE_output_dir"; 17 | public static final String VALUE_SELECTED_COMMAND = "GE_selected_commmand"; 18 | public static final String COMMAND_EQUIRECTANGULAR_TO_DEEPZOOM_CUBIC = "Equirectangular to Deep Zoom cubic"; 19 | public static final String COMMAND_CUBIC_TO_DEEPZOOM_CUBIC = "Cubic to Deep Zoom cubic"; 20 | public static final String COMMAND_EQUIRECTANGULAR_TO_CUBIC = "Equirectangular to cubic"; 21 | public static final String COMMAND_CUBIC_TO_RESIZED_CUBIC = "Cubic to resized cubic"; 22 | private String tmpDir; 23 | private int memoryLimit; 24 | private String outputDir; 25 | private boolean remObsolete; 26 | private boolean overwriteOutput; 27 | private String inputDir; 28 | private String selectedCommand; 29 | private String defaultTmpDir = ""; 30 | private int defaultMemoryLimit = 1024; 31 | private boolean defaultRemObsolete = true; 32 | private boolean defaultOverwriteOutput = false; 33 | private String defaultOutputDir = ""; 34 | private String defaultInputDir = ""; 35 | private final String defaultSelectedCommand = COMMAND_EQUIRECTANGULAR_TO_DEEPZOOM_CUBIC; 36 | 37 | public GESettings(String currentDirectory) { 38 | defaultTmpDir = currentDirectory 39 | + File.separator 40 | + "tmp"; 41 | defaultOutputDir = currentDirectory 42 | + File.separator 43 | + "output"; 44 | defaultInputDir = currentDirectory 45 | + File.separator 46 | + "input"; 47 | tmpDir = defaultTmpDir; 48 | memoryLimit = defaultMemoryLimit; 49 | remObsolete = defaultRemObsolete; 50 | overwriteOutput = defaultOverwriteOutput; 51 | outputDir = defaultOutputDir; 52 | inputDir = defaultInputDir; 53 | selectedCommand = defaultSelectedCommand; 54 | } 55 | 56 | public String[] getCommandNames() { 57 | return new String[]{ 58 | COMMAND_EQUIRECTANGULAR_TO_DEEPZOOM_CUBIC, 59 | COMMAND_CUBIC_TO_DEEPZOOM_CUBIC, 60 | COMMAND_EQUIRECTANGULAR_TO_CUBIC, 61 | COMMAND_CUBIC_TO_RESIZED_CUBIC 62 | }; 63 | } 64 | 65 | public void setTmpDir(String value) throws IllegalArgumentException { 66 | if (value != null) { 67 | File tmp = new File(value); 68 | if (tmp.isDirectory()) { 69 | tmpDir = value; 70 | } else { 71 | throw new IllegalArgumentException(Messages.GE_TMP_DIR_ERROR); 72 | } 73 | } 74 | } 75 | 76 | public String getTmpDir() { 77 | return tmpDir; 78 | } 79 | 80 | public String getDefaultTmpDir() { 81 | return defaultTmpDir; 82 | } 83 | 84 | public boolean tmpDirChanged() { 85 | return !(tmpDir.equals(defaultTmpDir)); 86 | } 87 | 88 | public void setMemoryLimit(String value) throws IllegalArgumentException { 89 | if (value != null) { 90 | try { 91 | setMemoryLimit(Integer.parseInt(value)); 92 | } catch (NumberFormatException ex) { 93 | throw new IllegalArgumentException(Messages.GE_MEMORY_LIMIT_ERROR); 94 | } 95 | } 96 | } 97 | 98 | public void setMemoryLimit(int value) throws IllegalArgumentException { 99 | if (value > 253) { 100 | memoryLimit = value; 101 | } else { 102 | throw new IllegalArgumentException(Messages.GE_MEMORY_LIMIT_ERROR); 103 | } 104 | } 105 | 106 | public int getMemoryLimit() { 107 | return memoryLimit; 108 | } 109 | 110 | public int getDefaultMemoryLimit() { 111 | return defaultMemoryLimit; 112 | } 113 | 114 | public boolean memoryLimitChanged() { 115 | return (memoryLimit != defaultMemoryLimit); 116 | } 117 | 118 | public void setRemoveObsolete(boolean value) { 119 | remObsolete = value; 120 | } 121 | 122 | public void setRemoveObsolete(String value) { 123 | if (value != null) { 124 | remObsolete = value.equals("true"); 125 | } 126 | } 127 | 128 | public boolean getRemoveObsolete() { 129 | return remObsolete; 130 | } 131 | 132 | public boolean getDefaultRemoveObsolete() { 133 | return defaultRemObsolete; 134 | } 135 | 136 | public boolean removeObsoleteChanged() { 137 | return (remObsolete != defaultRemObsolete); 138 | } 139 | 140 | public void setOverwriteOutput(boolean value) { 141 | overwriteOutput = value; 142 | } 143 | 144 | public void setOverwriteOutput(String value) { 145 | if (value != null) { 146 | overwriteOutput = value.equals("true"); 147 | } 148 | } 149 | 150 | public boolean getOverwriteOutput() { 151 | return overwriteOutput; 152 | } 153 | 154 | public boolean getDefaultOverwriteOutput() { 155 | return defaultOverwriteOutput; 156 | } 157 | 158 | public boolean overwriteOutputChanged() { 159 | return (overwriteOutput != defaultOverwriteOutput); 160 | } 161 | 162 | public void setOutputDir(String value) throws IllegalArgumentException { 163 | if (value != null) { 164 | File tmp = new File(value); 165 | if (tmp.exists() && tmp.isDirectory()) { 166 | outputDir = value; 167 | } else { 168 | throw new IllegalArgumentException(Messages.GE_OUTPUT_DIR_ERROR); 169 | } 170 | } 171 | } 172 | 173 | public String getOutputDir() { 174 | return outputDir; 175 | } 176 | 177 | public String getDefaultOutputDir() { 178 | return defaultOutputDir; 179 | } 180 | 181 | public boolean outputDirChanged() { 182 | return !(outputDir.equals(defaultOutputDir)); 183 | } 184 | 185 | public void setInputDir(String value) throws IllegalArgumentException { 186 | if (value != null) { 187 | File tmp = new File(value); 188 | if (tmp.isDirectory()) { 189 | inputDir = value; 190 | } else { 191 | throw new IllegalArgumentException(Messages.GE_INPUT_DIR_ERROR); 192 | } 193 | } 194 | } 195 | 196 | public String getInputDir() { 197 | return inputDir; 198 | } 199 | 200 | public String getDefaultInputDir() { 201 | return inputDir; 202 | } 203 | 204 | public boolean inputDirChanged() { 205 | return !(inputDir.equals(defaultInputDir)); 206 | } 207 | 208 | public void setSelectedCommand(String value) throws IllegalArgumentException { 209 | if (value != null) { 210 | if (value.equals(COMMAND_EQUIRECTANGULAR_TO_DEEPZOOM_CUBIC) 211 | || value.equals(COMMAND_CUBIC_TO_DEEPZOOM_CUBIC) 212 | || value.equals(COMMAND_EQUIRECTANGULAR_TO_CUBIC) 213 | || value.equals(COMMAND_CUBIC_TO_RESIZED_CUBIC)) { 214 | selectedCommand = value; 215 | } else { 216 | throw new IllegalArgumentException(Messages.GE_COMMAND_ERROR); 217 | } 218 | } 219 | } 220 | 221 | public String getSelectedCommand() { 222 | return selectedCommand; 223 | } 224 | 225 | public String getDefaultSelectedCommand() { 226 | return defaultSelectedCommand; 227 | } 228 | 229 | public boolean selectedCommandChanged() { 230 | return !(selectedCommand.equals(defaultSelectedCommand)); 231 | } 232 | } 233 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/OPTSettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | import com.panozona.converter.utils.Messages; 4 | 5 | public class OPTSettings { 6 | 7 | public static final String VALUE_RESIZE_PERCENT = "OPT_resizePercent"; 8 | public static final String VALUE_MAX_TILE_SIZE = "OPT_maxTileSize"; 9 | public static final String VALUE_MIN_TILE_SIZE = "OPT_minTileSize"; 10 | private int resizePercent; 11 | private int resizePercentDefault = 15; 12 | private int maxTileSize; 13 | private int maxTileSizeDefault = 600; 14 | private int minTileSize; 15 | private int minTileSizeDefault = 400; 16 | 17 | 18 | public OPTSettings() { 19 | resizePercent = resizePercentDefault; 20 | maxTileSize = maxTileSizeDefault; 21 | minTileSize = minTileSizeDefault; 22 | } 23 | 24 | public void setResizePercent(int value) { 25 | if (value >= 0) { 26 | resizePercent = value; 27 | } else { 28 | throw new IllegalArgumentException(Messages.OPT_RESIZE_PERCENT_ERROR); 29 | } 30 | } 31 | 32 | public void setResizePercent(String value) { 33 | if (value != null) { 34 | try { 35 | setResizePercent(Integer.parseInt(value)); 36 | } catch (Exception ex) { 37 | throw new IllegalArgumentException(Messages.OPT_RESIZE_PERCENT_ERROR); 38 | } 39 | } 40 | } 41 | 42 | public int getResizePercent() { 43 | return resizePercent; 44 | } 45 | 46 | public int getDefaultResizePercent() { 47 | return resizePercentDefault; 48 | } 49 | 50 | public boolean resizePercentChanged() { 51 | return (resizePercent != resizePercentDefault); 52 | } 53 | 54 | public void setMaxTileSize(int value) { 55 | if (value > 0 && value >= minTileSize) { 56 | maxTileSize = value; 57 | } else { 58 | throw new IllegalArgumentException(Messages.OPT_MAX_TILE_SIZE_ERROR); 59 | } 60 | } 61 | 62 | public void setMaxTileSize(String value) { 63 | if (value != null) { 64 | try { 65 | setMaxTileSize(Integer.parseInt(value)); 66 | } catch (Exception ex) { 67 | throw new IllegalArgumentException(Messages.OPT_MAX_TILE_SIZE_ERROR); 68 | } 69 | } 70 | } 71 | 72 | public int getMaxTileSize() { 73 | return maxTileSize; 74 | } 75 | 76 | public int getDefaultMaxTileSize() { 77 | return maxTileSizeDefault; 78 | } 79 | 80 | public boolean maxTileSizeChanged() { 81 | return (maxTileSize != maxTileSizeDefault); 82 | } 83 | 84 | public void setMinTileSize(int value) { 85 | if (value > 0 && value <= maxTileSize) { 86 | minTileSize = value; 87 | } else { 88 | throw new IllegalArgumentException(Messages.OPT_MIN_TILE_SIZE_ERROR); 89 | } 90 | } 91 | 92 | public void setMinTileSize(String value) { 93 | if (value != null) { 94 | try { 95 | setMinTileSize(Integer.parseInt(value)); 96 | } catch (Exception ex) { 97 | throw new IllegalArgumentException(Messages.OPT_MIN_TILE_SIZE_ERROR); 98 | } 99 | } 100 | } 101 | 102 | public int getMinTileSize() { 103 | return minTileSize; 104 | } 105 | 106 | public int getDefaultMinTileSize() { 107 | return minTileSizeDefault; 108 | } 109 | 110 | public boolean minTileSizeChanged() { 111 | return (minTileSize != minTileSizeDefault); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/settings/RESSettings.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.settings; 2 | 3 | import com.panozona.converter.utils.Messages; 4 | import java.io.File; 5 | 6 | /** 7 | * @author Marek Standio 8 | */ 9 | public class RESSettings { 10 | 11 | public static final String JAR_CLASSNAME = "resizer.Resizer"; 12 | public static final String JAR_FILENAME = "Resizer.jar"; 13 | public static final String VALUE_JAR_DIR = "RES_jarDir"; 14 | private String jarDir; 15 | private String defaultJarDir = ""; 16 | 17 | public RESSettings(String currentDirectory) { 18 | if (currentDirectory != null) { 19 | defaultJarDir = currentDirectory 20 | + File.separator 21 | + "components" 22 | + File.separator 23 | + JAR_FILENAME; 24 | } 25 | jarDir = defaultJarDir; 26 | } 27 | 28 | public void setJarDir(String value) throws IllegalArgumentException { 29 | if (value != null) { 30 | File tmp = new File(value); 31 | if (tmp.isFile() && value.endsWith(".jar")) { 32 | jarDir = value; 33 | } else { 34 | throw new IllegalArgumentException(Messages.RES_JAR_DIR_ERROR); 35 | } 36 | } 37 | } 38 | 39 | public String getJarDir() { 40 | return jarDir; 41 | } 42 | 43 | public String getDefaultJarDir() { 44 | return defaultJarDir; 45 | } 46 | 47 | public boolean jarDirChanged() { 48 | return !(jarDir.equals(defaultJarDir)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/task/Image.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.task; 2 | 3 | public class Image { 4 | 5 | public int width; 6 | public int height; 7 | public String path; 8 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/task/Operation.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.task; 2 | 3 | /** 4 | * 5 | * @author Marek Standio 6 | */ 7 | public class Operation { 8 | 9 | public static final String TYPE_DZT = "type_DZT"; // TODO: enum, perhaps ? 10 | public static final String TYPE_EC = "type_EC"; 11 | public static final String TYPE_RES = "type_RES"; 12 | public static final String TYPE_DEL = "type_DEL"; 13 | public String type; 14 | public String args[]; 15 | 16 | public Operation() { 17 | } 18 | 19 | public Operation(String operationType, String[] args) { 20 | this.type = operationType; 21 | this.args = args; 22 | } 23 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/task/Panorama.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.task; 2 | 3 | import com.panozona.converter.settings.AggregatedSettings; 4 | import java.util.ArrayList; 5 | 6 | /** 7 | * @author Marek 8 | */ 9 | public class Panorama { 10 | 11 | private ArrayList images; 12 | private PanoramaTypes panoramaType; 13 | 14 | public Panorama(Image equirectImage) { 15 | images = new ArrayList(); 16 | images.add(equirectImage); 17 | panoramaType = PanoramaTypes.equirectangular; 18 | 19 | } 20 | 21 | public Panorama(ArrayList cubeImages) { 22 | images = cubeImages; 23 | panoramaType = PanoramaTypes.cubic; 24 | } 25 | 26 | public ArrayList getImages() { 27 | return images; 28 | } 29 | 30 | public PanoramaTypes getPanoramaType() { 31 | return panoramaType; 32 | } 33 | 34 | public int getCubeSize() { 35 | if (panoramaType.equals(PanoramaTypes.cubic)) { 36 | return images.get(0).width; 37 | } else { 38 | return (int) ((Math.tan(Math.PI / 4D) 39 | * images.get(0).width / (2D * Math.PI)) * 2) 40 | + AggregatedSettings.getInstance().ec.getWallOverlap() * 2; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/task/PanoramaTypes.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.task; 2 | 3 | /** 4 | * @author marek 5 | */ 6 | public enum PanoramaTypes { 7 | 8 | cubic, equirectangular 9 | }; 10 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/task/TaskData.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.task; 2 | 3 | import com.panozona.converter.settings.AggregatedSettings; 4 | import com.panozona.converter.utils.Messages; 5 | import java.io.File; 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * @author Marek Standio 10 | */ 11 | public class TaskData { 12 | 13 | public static final String STATE_READY = "ready"; // TODO: enum, perhaps? 14 | public static final String STATE_PROCESSING = "processing"; 15 | public static final String STATE_DONE = "done"; 16 | public static final String STATE_ERROR = "error"; 17 | public static final String STATE_CANCELED = "canceled"; 18 | public String state = STATE_READY; 19 | public Boolean checkBoxSelected = true; 20 | public Boolean checkBoxEnabled = false; 21 | public boolean autosize = true; 22 | private Panorama panorama; 23 | private int newTileSize; 24 | private int newCubeSize; 25 | public ArrayList operations = new ArrayList(); 26 | 27 | public TaskData(Panorama panorama) { 28 | this.panorama = panorama; 29 | newCubeSize = panorama.getCubeSize(); 30 | newTileSize = AggregatedSettings.getInstance().dzt.getTileSize(); 31 | } 32 | 33 | public Panorama getPanorama() { 34 | return panorama; 35 | } 36 | 37 | public void setNewTileSize(String value) throws IllegalArgumentException { 38 | if (value != null) { 39 | try { 40 | if (Integer.parseInt(value) > 0) { 41 | newTileSize = Integer.parseInt(value); 42 | } else { 43 | throw new IllegalArgumentException(); 44 | } 45 | } catch (Exception ex) { 46 | throw new IllegalArgumentException(Messages.TSK_TILE_SIZE_ERROR); 47 | } 48 | } 49 | } 50 | 51 | public void setNewTileSize(int value) throws IllegalArgumentException { 52 | if (value > 0) { 53 | newTileSize = value; 54 | } else { 55 | throw new IllegalArgumentException(Messages.TSK_TILE_SIZE_ERROR); 56 | } 57 | } 58 | 59 | public int getNewTileSize() { 60 | return newTileSize; 61 | } 62 | 63 | public void setNewCubeSize(String value) throws IllegalArgumentException { 64 | if (value != null) { 65 | try { 66 | if (Integer.parseInt(value) > 0) { 67 | newCubeSize = Integer.parseInt(value); 68 | } else { 69 | throw new IllegalArgumentException(); 70 | } 71 | } catch (Exception ex) { 72 | throw new IllegalArgumentException(Messages.TSK_CUBE_SIZE_ERROR); 73 | } 74 | } 75 | } 76 | 77 | public void setNewCubeSize(int value) throws IllegalArgumentException { 78 | if (value > 0) { 79 | newCubeSize = value; 80 | } else { 81 | throw new IllegalArgumentException(Messages.TSK_CUBE_SIZE_ERROR); 82 | } 83 | } 84 | 85 | public int getNewCubeSize() { 86 | return newCubeSize; 87 | } 88 | 89 | public boolean cubeSizeChanged() { 90 | return newCubeSize != panorama.getCubeSize(); 91 | } 92 | 93 | public String getCubeSizeDescription() { 94 | if (panorama.getCubeSize() != newCubeSize) { 95 | return panorama.getCubeSize() + " to " + newCubeSize; 96 | } else { 97 | return Integer.toString(newCubeSize); 98 | } 99 | } 100 | 101 | public String getTileSizeDescription() { 102 | return Integer.toString(newTileSize); 103 | } 104 | 105 | public String getPathDescription() { 106 | if (panorama.getPanoramaType().equals(PanoramaTypes.equirectangular)) { 107 | return panorama.getImages().get(0).path; 108 | } else { 109 | return panorama.getImages().get(0).path.substring(0, panorama.getImages().get(0).path.lastIndexOf(File.separator)); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/ComponentInvoker.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import java.io.File; 4 | import java.lang.reflect.InvocationTargetException; 5 | import java.lang.reflect.Method; 6 | import java.lang.reflect.Modifier; 7 | import java.net.MalformedURLException; 8 | import java.net.URL; 9 | import java.net.URLClassLoader; 10 | 11 | 12 | /** 13 | * 14 | * @author Marek 15 | */ 16 | public class ComponentInvoker { 17 | 18 | public static final String ILLEGAL_ACCESS_EXCEPTION = "ILLEGAL_ACCESS_EXCEPTION"; 19 | public static final String CLASS_NOT_FOUND_EXCEPTION = "CLASS_NOT_FOUND_EXCEPTION"; 20 | public static final String NO_SUCH_METHOD_EXCEPTION = "NO_SUCH_METHOD_EXCEPTION"; 21 | public static final String INVOCATION_TARGET_EXCEPTION = "INVOCATION_TARGET_EXCEPTION"; 22 | public static final String MALFORMED_URL_EXCEPTION = "MALFORMED_URL_EXCEPTION"; 23 | public static final String INTERRUPTED_EXCEPTION = "INTERRUPTED_EXCEPTION"; 24 | 25 | public ComponentInvoker(){ 26 | 27 | } 28 | 29 | public void run(String path, String name, String[] args) throws IllegalStateException{ 30 | //System.out.println(path +" "+name+" "+Arrays.toString(args)); 31 | 32 | try { 33 | invokeClass(path, name, args); 34 | } catch (IllegalAccessException ex) { 35 | ex.printStackTrace(); 36 | throw new IllegalStateException(ILLEGAL_ACCESS_EXCEPTION); 37 | } catch (ClassNotFoundException ex) { 38 | ex.printStackTrace(); 39 | throw new IllegalStateException(CLASS_NOT_FOUND_EXCEPTION); 40 | } catch (NoSuchMethodException ex) { 41 | ex.printStackTrace(); 42 | throw new IllegalStateException(NO_SUCH_METHOD_EXCEPTION); 43 | } catch (InvocationTargetException ex) { 44 | ex.printStackTrace(); 45 | throw new IllegalStateException(INVOCATION_TARGET_EXCEPTION); 46 | } catch (MalformedURLException ex) { 47 | ex.printStackTrace(); 48 | throw new IllegalStateException(MALFORMED_URL_EXCEPTION); 49 | } catch (InterruptedException ex) { 50 | ex.printStackTrace(); 51 | throw new IllegalStateException(INTERRUPTED_EXCEPTION); 52 | } 53 | } 54 | 55 | private void invokeClass(String path, String name, String[] args) throws 56 | ClassNotFoundException, 57 | NoSuchMethodException, 58 | InvocationTargetException, 59 | MalformedURLException, 60 | InterruptedException, 61 | IllegalAccessException { 62 | File f = new File(path); 63 | URLClassLoader u = new URLClassLoader(new URL[]{f.toURI().toURL()}); 64 | Class c = u.loadClass(name); 65 | Method m = c.getMethod("main", new Class[]{args.getClass()}); 66 | m.setAccessible(true); 67 | int mods = m.getModifiers(); 68 | if (m.getReturnType() != void.class || !Modifier.isStatic(mods) || !Modifier.isPublic(mods)) { 69 | throw new NoSuchMethodException("main"); 70 | } 71 | m.invoke(null, new Object[]{args}); 72 | m = null; 73 | System.gc(); // uh-oh 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/CurrentDirectoryFinder.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import java.io.File; 4 | import com.panozona.converter.Starter; 5 | 6 | /** 7 | * 8 | * @author Marek 9 | */ 10 | public class CurrentDirectoryFinder { 11 | 12 | public String currentDir; 13 | 14 | public CurrentDirectoryFinder() { 15 | if (Starter.developmentMode) 16 | currentDir = System.getProperty("user.dir")+File.separator+"external"; 17 | else{ 18 | currentDir = System.getProperty("user.dir"); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/FileFilterAddTask.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * 7 | * @author Marek Standio 8 | */ 9 | public class FileFilterAddTask extends javax.swing.filechooser.FileFilter implements java.io.FileFilter { 10 | 11 | @Override 12 | public boolean accept(File f) { 13 | return (f.isDirectory() || (f.isFile() 14 | && (f.getName().toLowerCase()).endsWith(".jpg") 15 | || (f.getName().toLowerCase()).endsWith(".jpeg") 16 | || (f.getName().toLowerCase()).endsWith(".png") 17 | || (f.getName().toLowerCase()).endsWith(".bmp") 18 | || (f.getName().toLowerCase()).endsWith(".gif") 19 | || (f.getName().toLowerCase()).endsWith(".tif") 20 | || (f.getName().toLowerCase()).endsWith(".tiff"))); 21 | } 22 | 23 | @Override 24 | public String getDescription() { 25 | // hard-coded = ugly, should be done via I18N 26 | return "Direcrories or image files"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/FileFilterDir.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * 7 | * @author Marek 8 | */ 9 | public class FileFilterDir extends javax.swing.filechooser.FileFilter{ 10 | 11 | @Override 12 | public boolean accept(File f) { 13 | return (f.isDirectory()); 14 | } 15 | 16 | @Override 17 | public String getDescription() { 18 | // hard-coded = ugly, should be done via I18N 19 | return "Directory"; 20 | } 21 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/FileFilterJar.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * 7 | * @author Marek 8 | */ 9 | public class FileFilterJar extends javax.swing.filechooser.FileFilter{ 10 | 11 | @Override 12 | public boolean accept(File f) { 13 | return (f.isDirectory() || (f.isFile() && f.getName().endsWith(".jar"))); 14 | } 15 | 16 | @Override 17 | public String getDescription() { 18 | // hard-coded = ugly, should be done via I18N 19 | return "*.jar"; 20 | } 21 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/ImageDimensionsChecker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.panozona.converter.utils; 6 | 7 | import com.panozona.converter.task.Image; 8 | import com.sun.media.jai.codec.FileSeekableStream; 9 | import java.io.File; 10 | import java.io.FileNotFoundException; 11 | import java.io.IOException; 12 | import java.io.RandomAccessFile; 13 | import javax.media.jai.JAI; 14 | import javax.media.jai.PlanarImage; 15 | import org.xurble.server.ImageInfo; 16 | 17 | /** 18 | * 19 | * @author Marek 20 | */ 21 | public class ImageDimensionsChecker { 22 | 23 | private ImageDimensionsChecker(){} 24 | 25 | public static Image analise(File image) { 26 | Image imageData = new Image(); 27 | imageData.path = image.getAbsolutePath(); 28 | if (image.getName().matches("(?i)^.+\\.(jpg|jpeg|gif|bmp|png)$")) { 29 | try { 30 | RandomAccessFile raf = new RandomAccessFile(image, "r"); 31 | ImageInfo imageInfo = new ImageInfo(); 32 | imageInfo.setInput(raf); 33 | if (!imageInfo.check()) { 34 | raf.close(); 35 | System.out.println("Check not passed"); 36 | return null; 37 | } 38 | imageData.width = imageInfo.getWidth(); 39 | imageData.height = imageInfo.getHeight(); 40 | raf.close(); 41 | } catch (FileNotFoundException ex) { 42 | System.out.println("Could not open file."); 43 | } catch (IOException ex) { 44 | System.out.println("Could not close file."); 45 | } catch (Exception ex) { 46 | System.out.println("Something is wrong ;]."); 47 | ex.printStackTrace(); 48 | } 49 | } else if (image.getName().matches("(?i)^.+\\.(tif|tiff)$")) { 50 | FileSeekableStream stream = null; 51 | try { 52 | stream = new FileSeekableStream(image); 53 | PlanarImage input = JAI.create("stream", stream); 54 | imageData.width = input.getWidth(); 55 | imageData.height = input.getHeight(); 56 | } catch (IOException ex) { 57 | System.out.println("Could not open file " + image); 58 | } finally { 59 | if (stream != null) { 60 | try { 61 | stream.close(); 62 | } catch (IOException ex) { 63 | System.out.println("Could not close file stream."); 64 | } 65 | } 66 | } 67 | } 68 | return imageData; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/Messages.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | /** 4 | * @author Marek 5 | */ 6 | public class Messages { 7 | 8 | public final static String EC_WALL_OVERLAP_ERROR = "Invalid EquirectangularToCubic Overlap value"; 9 | public final static String EC_INTERPOLATION_ERROR = "Invalid EquirectangularToCubic Interpolation value"; 10 | public final static String EC_JAR_DIR_ERROR = "Invalid EquirectangularToCubic *.jar directory"; 11 | public final static String DZT_TILE_OVERLAP_ERROR = "Invalid DeepZoomTiler Tile overlap value"; 12 | public final static String DZT_QUALITY_ERROR = "Invalid DeepZoomTiler Quality value"; 13 | public final static String DZT_TILESIZE_ERROR = "Invalid DeepZoomTiler Tile size value"; 14 | public final static String DZT_JAR_DIR_ERROR = "Invalid DeepZoomTiler *.jar directory"; 15 | public final static String GE_TMP_DIR_ERROR = "Invalid tmp directory"; 16 | public final static String GE_MEMORY_LIMIT_ERROR = "Invalid memory limit value"; 17 | public final static String GE_MEMORY_LIMIT_WARNING = "Restart application in order for memory limit changes to take effect"; 18 | public final static String GE_OUTPUT_DIR_ERROR = "Invalid output directory"; 19 | public final static String GE_INPUT_DIR_ERROR = "Invalid input directory"; 20 | public final static String GE_COMMAND_ERROR = "Invalid command"; 21 | public final static String OPT_RESIZE_PERCENT_ERROR = "Invalid Autosize Resize percent value"; 22 | public final static String OPT_MAX_TILE_SIZE_ERROR = "Invalid Autosize Max tile size value"; 23 | public final static String OPT_MIN_TILE_SIZE_ERROR = "Invalid Autosize Min tile size value"; 24 | public final static String TSK_TILE_SIZE_ERROR = "Invalid Tile size value"; 25 | public final static String TSK_CUBE_SIZE_ERROR = "Invalid Cube size value"; 26 | public final static String RES_JAR_DIR_ERROR = "Invalid Resizer *.jar directory"; 27 | public final static String CONFIGURATIN_READ_ERROR = "Configuration file corrupted"; 28 | } -------------------------------------------------------------------------------- /SaladoConverter/src/com/panozona/converter/utils/TasksExecutor.java: -------------------------------------------------------------------------------- 1 | package com.panozona.converter.utils; 2 | 3 | import com.panozona.converter.SaladoConverter; 4 | import com.panozona.converter.settings.AggregatedSettings; 5 | import com.panozona.converter.settings.DZTSettings; 6 | import com.panozona.converter.settings.ECSettings; 7 | import com.panozona.converter.task.TaskData; 8 | import com.panozona.converter.task.Operation; 9 | import com.panozona.converter.maintable.TaskTableModel; 10 | import com.panozona.converter.settings.RESSettings; 11 | import org.jdesktop.application.Task; 12 | import java.io.File; 13 | 14 | /** 15 | * 16 | * @author Marek 17 | */ 18 | public class TasksExecutor extends Task { 19 | 20 | private AggregatedSettings aggstngs; 21 | private TaskTableModel taskTableModel; 22 | private ComponentInvoker componentInvoker; 23 | 24 | public TasksExecutor(TaskTableModel taskTableModel, AggregatedSettings aggstngs) { 25 | super(SaladoConverter.getApplication()); 26 | super.setUserCanCancel(true); 27 | this.taskTableModel = taskTableModel; 28 | this.aggstngs = aggstngs; 29 | componentInvoker = new ComponentInvoker(); 30 | } 31 | 32 | private int numberOperations(TaskData taskData) { 33 | int result = 0; 34 | for (int k = 0; k < taskData.operations.size(); k++) { 35 | if (!taskData.operations.get(k).type.equals(Operation.TYPE_DEL)) { 36 | result++; 37 | } 38 | } 39 | return result; 40 | } 41 | 42 | @Override 43 | protected Void doInBackground() throws Exception { 44 | int numOperationsToRun = 0; 45 | int numOperationsDone = 0; 46 | TaskData taskData; 47 | Operation taskOperation; 48 | File file; 49 | for (int i = 0; i < taskTableModel.getRowCount(); i++) { 50 | taskData = taskTableModel.rows.get(i); 51 | if (taskData.checkBoxEnabled && taskData.checkBoxSelected) { 52 | numOperationsToRun += numberOperations(taskData); 53 | } 54 | } 55 | 56 | for (int j = 0; j < taskTableModel.getRowCount(); j++) { 57 | taskData = taskTableModel.rows.get(j); 58 | for (int m = 0; m < taskData.operations.size(); m++) { 59 | taskOperation = taskData.operations.get(m); 60 | if (!super.isCancelled()) { 61 | taskData.state = TaskData.STATE_PROCESSING; 62 | taskTableModel.fireTableDataChanged(); 63 | try { 64 | if (taskOperation.type.equals(Operation.TYPE_DZT)) { 65 | componentInvoker.run(aggstngs.dzt.getJarDir(), DZTSettings.JAR_CLASSNAME, taskOperation.args); 66 | numOperationsDone++; 67 | } else if (taskOperation.type.equals(Operation.TYPE_EC)) { 68 | componentInvoker.run(aggstngs.ec.getJarDir(), ECSettings.JAR_CLASSNAME, taskOperation.args); 69 | numOperationsDone++; 70 | } else if (taskOperation.type.equals(Operation.TYPE_RES)) { 71 | componentInvoker.run(aggstngs.res.getJarDir(), RESSettings.JAR_CLASSNAME, taskOperation.args); 72 | numOperationsDone++; 73 | } else if (taskOperation.type.equals(Operation.TYPE_DEL)) { 74 | file = new File(taskOperation.args[0]); 75 | if (file.isDirectory()) { 76 | for (File f: file.listFiles()) { 77 | f.delete(); 78 | } 79 | } 80 | file.delete(); 81 | setProgress(numOperationsDone, 0, numOperationsToRun); 82 | } 83 | setProgress(numOperationsDone, 0, numOperationsToRun); 84 | } catch (IllegalStateException ex) { 85 | numOperationsDone += numberOperations(taskData) - m; 86 | setProgress(numOperationsDone, 0, numOperationsToRun); 87 | System.out.println("ERROR: " + ex.getMessage()); 88 | taskData.state = TaskData.STATE_ERROR; 89 | taskTableModel.fireTableDataChanged(); 90 | } 91 | } else { 92 | numOperationsDone += numberOperations(taskData); 93 | setProgress(numOperationsDone, 0, numOperationsToRun); 94 | taskData.state = TaskData.STATE_CANCELED; 95 | System.out.println("CANCELLED"); 96 | taskTableModel.fireTableDataChanged(); 97 | return null; 98 | } 99 | } 100 | if (taskData.operations.size() > 0) { 101 | System.out.println("DONE"); 102 | taskData.checkBoxSelected = false; 103 | taskData.state = TaskData.STATE_DONE; 104 | taskTableModel.fireTableDataChanged(); 105 | } 106 | } 107 | return null; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /SkyboxMaker/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /ZoomifyTiler/.gitignore: -------------------------------------------------------------------------------- 1 | #java specific 2 | *.class 3 | *.jar 4 | 5 | #netbeans ignore personal stuff 6 | nbproject/private/ 7 | 8 | ## generic files to ignore 9 | *~ 10 | *.lock 11 | *.DS_Store 12 | *.swp 13 | *.out -------------------------------------------------------------------------------- /ZoomifyTiler/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project ZoomifyTiler. 7 | 8 | 69 | 70 | -------------------------------------------------------------------------------- /ZoomifyTiler/dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "ZoomifyTiler.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, none of the 25 | classpath elements are copied to the lib folder. In such a case, 26 | you need to copy the classpath elements to the lib folder manually after the build. 27 | * If a library on the projects classpath also has a Class-Path element 28 | specified in the manifest,the content of the Class-Path element has to be on 29 | the projects runtime path. 30 | * To set a main class in a standard Java project, right-click the project node 31 | in the Projects window and choose Properties. Then click Run and enter the 32 | class name in the Main Class field. Alternatively, you can manually type the 33 | class name in the manifest Main-Class element. 34 | -------------------------------------------------------------------------------- /ZoomifyTiler/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /ZoomifyTiler/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=6f7973f3 2 | build.xml.script.CRC32=37dcdb71 3 | build.xml.stylesheet.CRC32=be360661 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=6f7973f3 7 | nbproject/build-impl.xml.script.CRC32=4154964d 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 9 | -------------------------------------------------------------------------------- /ZoomifyTiler/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | application.title=ZoomifyTiler 2 | application.vendor=Marek 3 | build.classes.dir=${build.dir}/classes 4 | build.classes.excludes=**/*.java,**/*.form 5 | # This directory is removed when the project is cleaned: 6 | build.dir=build 7 | build.generated.dir=${build.dir}/generated 8 | # Only compile against the classpath explicitly listed here: 9 | build.sysclasspath=ignore 10 | build.test.classes.dir=${build.dir}/test/classes 11 | build.test.results.dir=${build.dir}/test/results 12 | debug.classpath=\ 13 | ${run.classpath} 14 | debug.test.classpath=\ 15 | ${run.test.classpath} 16 | # This directory is removed when the project is cleaned: 17 | dist.dir=dist 18 | dist.jar=${dist.dir}/ZoomifyTiler.jar 19 | dist.javadoc.dir=${dist.dir}/javadoc 20 | excludes= 21 | file.reference.jai_codec.jar=../libs/jai_codec.jar 22 | file.reference.jai_core.jar=../libs/jai_core.jar 23 | includes=** 24 | jar.compress=false 25 | javac.classpath=\ 26 | ${file.reference.jai_codec.jar}:\ 27 | ${file.reference.jai_core.jar} 28 | # Space-separated list of extra javac options 29 | javac.compilerargs= 30 | javac.deprecation=false 31 | javac.source=1.5 32 | javac.target=1.5 33 | javac.test.classpath=\ 34 | ${javac.classpath}:\ 35 | ${build.classes.dir}:\ 36 | ${libs.junit_4.classpath} 37 | javadoc.additionalparam= 38 | javadoc.author=false 39 | javadoc.encoding=${source.encoding} 40 | javadoc.noindex=false 41 | javadoc.nonavbar=false 42 | javadoc.notree=false 43 | javadoc.private=false 44 | javadoc.splitindex=true 45 | javadoc.use=true 46 | javadoc.version=false 47 | javadoc.windowtitle= 48 | main.class=zoomifytiler.ZoomifyTiler 49 | manifest.file=manifest.mf 50 | meta.inf.dir=${src.dir}/META-INF 51 | platform.active=default_platform 52 | run.classpath=\ 53 | ${javac.classpath}:\ 54 | ${build.classes.dir} 55 | # Space-separated list of JVM arguments used when running the project 56 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 57 | # or test-sys-prop.name=value to set system properties for unit tests): 58 | run.jvmargs= 59 | run.test.classpath=\ 60 | ${javac.test.classpath}:\ 61 | ${build.test.classes.dir} 62 | source.encoding=UTF-8 63 | src.dir=src 64 | test.src.dir=test 65 | -------------------------------------------------------------------------------- /ZoomifyTiler/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | ZoomifyTiler 7 | 1.6.5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ZoomifyTiler/test/zoomifytiler/ZoomifyTilerTest.java: -------------------------------------------------------------------------------- 1 | package zoomifytiler; 2 | 3 | import java.awt.geom.Point2D; 4 | import java.lang.reflect.Method; 5 | import org.junit.Test; 6 | import static org.junit.Assert.*; 7 | 8 | public class ZoomifyTilerTest { 9 | 10 | private ZoomifyTiler instance; 11 | 12 | public ZoomifyTilerTest() { 13 | instance = new ZoomifyTiler(); 14 | } 15 | 16 | private Object invokePrivateMethod(Object test, String methodName, Object params[]) throws Exception { 17 | Object ret = null; 18 | final Method[] methods = 19 | test.getClass().getDeclaredMethods(); 20 | for (int i = 0; i < methods.length; ++i) { 21 | if (methods[i].getName().equals(methodName)) { 22 | methods[i].setAccessible(true); 23 | ret = methods[i].invoke(test, params); 24 | break; 25 | } 26 | } 27 | return ret; 28 | } 29 | 30 | @Test 31 | public void numTiers() throws Exception { 32 | // default tile size of 512 33 | int result; 34 | result = ((Integer) invokePrivateMethod(instance, "numTiers", new Object[]{512, 512})).intValue(); 35 | assertEquals(0, result); 36 | result = ((Integer) invokePrivateMethod(instance, "numTiers", new Object[]{520, 520})).intValue(); 37 | assertEquals(1, result); 38 | result = ((Integer) invokePrivateMethod(instance, "numTiers", new Object[]{1024, 1024})).intValue(); 39 | assertEquals(1, result); 40 | result = ((Integer) invokePrivateMethod(instance, "numTiers", new Object[]{1030, 1030})).intValue(); 41 | assertEquals(2, result); 42 | } 43 | 44 | @Test 45 | public void sizeAtTier() throws Exception { 46 | // default tile size of 512 47 | Point2D result = null; 48 | result = (Point2D) invokePrivateMethod(instance, "sizeAtTier", new Object[]{512, 512, 0}); 49 | assertEquals(512d, result.getX(), 0.1d); 50 | assertEquals(512d, result.getY(), 0.1d); 51 | 52 | result = (Point2D) invokePrivateMethod(instance, "sizeAtTier", new Object[]{520, 520, 0}); 53 | assertEquals(260d, result.getX(), 0.1d); 54 | assertEquals(260d, result.getY(), 0.1d); 55 | 56 | result = (Point2D) invokePrivateMethod(instance, "sizeAtTier", new Object[]{1024, 1024, 0}); 57 | assertEquals(512d, result.getX(), 0.1d); 58 | assertEquals(512d, result.getY(), 0.1d); 59 | 60 | result = (Point2D) invokePrivateMethod(instance, "sizeAtTier", new Object[]{1030, 1030, 0}); 61 | assertEquals(258d, result.getX(), 0.1d); 62 | assertEquals(258d, result.getY(), 0.1d); 63 | } 64 | 65 | @Test 66 | public void numTilesFromTier() throws Exception { 67 | // default tile size of 512 68 | int result; 69 | result = ((Integer) invokePrivateMethod(instance, "numTilesFromTier", new Object[]{512, 512, 0})).intValue(); 70 | assertEquals(1, result); 71 | 72 | result = ((Integer) invokePrivateMethod(instance, "numTilesFromTier", new Object[]{520, 520, 1})).intValue(); 73 | assertEquals(4, result); 74 | 75 | result = ((Integer) invokePrivateMethod(instance, "numTilesFromTier", new Object[]{1030, 1030, 2})).intValue(); 76 | assertEquals(9, result); 77 | } 78 | 79 | @Test 80 | public void numTilesTotal() throws Exception { 81 | // default tile size of 512 82 | int result; 83 | result = ((Integer) invokePrivateMethod(instance, "numTilesTotal", new Object[]{512, 512})).intValue(); 84 | assertEquals(1, result); 85 | 86 | result = ((Integer) invokePrivateMethod(instance, "numTilesTotal", new Object[]{520, 520})).intValue(); 87 | assertEquals(5, result); 88 | 89 | result = ((Integer) invokePrivateMethod(instance, "numTilesTotal", new Object[]{1030, 1030})).intValue(); 90 | assertEquals(14, result); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /libs/jai_codec.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/libs/jai_codec.jar -------------------------------------------------------------------------------- /libs/jai_core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mstandio/SaladoConverter/befa3cea2ad2a7021c23a95b7b030cc746e4e40e/libs/jai_core.jar --------------------------------------------------------------------------------