]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/NexuizDemoRecorder/main/src/main/java/com/nexuiz/demorecorder/ui/swinggui/RecordJobTemplate.java
fix lots of CRLFs
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / java / com / nexuiz / demorecorder / ui / swinggui / RecordJobTemplate.java
index 89ab61ceea2d5cc1a89cbb68763cc43e80a60042..b28e0e54ee8812d44435519916602564bf061710 100644 (file)
-package com.nexuiz.demorecorder.ui.swinggui;\r
-\r
-import java.io.File;\r
-\r
-import com.nexuiz.demorecorder.application.DemoRecorderException;\r
-import com.nexuiz.demorecorder.application.jobs.RecordJob;\r
-\r
-public class RecordJobTemplate extends RecordJob {\r
-\r
-       private static final long serialVersionUID = 8311386509410161395L;\r
-       private String templateName;\r
-       private String summary;\r
-\r
-       public RecordJobTemplate(\r
-               String templateName,\r
-               String summary,\r
-               String jobName,\r
-               File enginePath,\r
-               String engineParameters,\r
-               File demoFile,\r
-               String relativeDemoPath,\r
-               File dpVideoPath,\r
-               File videoDestination,\r
-               String executeBeforeCap,\r
-               String executeAfterCap\r
-               ) {\r
-               super();\r
-               \r
-               /*\r
-                * Differences to jobs:\r
-                * - name and summary exist\r
-                * - "Demo file:" -> "Demo directory:"\r
-                * - no start/end second\r
-                */\r
-               \r
-               if (templateName == null || summary == null || jobName == null || enginePath == null || engineParameters == null || \r
-                               demoFile == null || relativeDemoPath == null || dpVideoPath == null || videoDestination == null \r
-                               || executeBeforeCap == null || executeAfterCap == null) {\r
-                       throw new DemoRecorderException("Error: Make sure that you filled the necessary fields! (file choosers!)");\r
-               }\r
-               \r
-               this.templateName = templateName;\r
-               this.summary = summary;\r
-               this.jobName = jobName;\r
-               this.enginePath = enginePath;\r
-               this.engineParameters = engineParameters;\r
-               this.demoFile = demoFile;\r
-               this.relativeDemoPath = relativeDemoPath;\r
-               this.dpVideoPath = dpVideoPath;\r
-               this.videoDestination = videoDestination;\r
-               this.executeBeforeCap = executeBeforeCap;\r
-               this.executeAfterCap = executeAfterCap;\r
-       }\r
-\r
-       public String getName() {\r
-               return templateName;\r
-       }\r
-\r
-       public String getSummary() {\r
-               return summary;\r
-       }\r
-       \r
-       public void setName(String name) {\r
-               this.templateName = name;\r
-       }\r
-\r
-       public void setSummary(String summary) {\r
-               this.summary = summary;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * Overwrite this method because here we want to do the read/write test for the path directly\r
-        * (as this one already is the directory), and not its parent directory.\r
-        * @see com.nexuiz.demorecorder.application.jobs.RecordJob#setDemoFile(java.io.File)\r
-        */\r
-       public void setDemoFile(File demoFile) {\r
-               if (demoFile == null || !demoFile.exists()) {\r
-                       throw new DemoRecorderException("Could not locate demo file!");\r
-               }\r
-               if (!doReadWriteTest(demoFile)) {\r
-                       throw new DemoRecorderException("The directory you specified for the demo to be recorded is not writable!");\r
-               }\r
-               this.demoFile = demoFile.getAbsoluteFile();\r
-       }\r
-       \r
-       /*\r
-        * (non-Javadoc)\r
-        * Overwrite this method because here we want to do the read/write test for the path directly\r
-        * (as this one already is the directory), and not its parent directory.\r
-        * @see com.nexuiz.demorecorder.application.jobs.RecordJob#setVideoDestination(java.io.File)\r
-        */\r
-       public void setVideoDestination(File videoDestination) {\r
-               //keep in mind, here videoDestination points to the destination directory, not the destination file\r
-               if (videoDestination == null || !videoDestination.isDirectory()) {\r
-                       throw new DemoRecorderException("Could not locate the specified video destination directory");\r
-               }\r
-               \r
-               if (!this.doReadWriteTest(videoDestination)) {\r
-                       throw new DemoRecorderException("The video destination directory is not writable! It needs to be writable so that the file can be moved to its new location");\r
-               }\r
-               \r
-               this.videoDestination = videoDestination.getAbsoluteFile();\r
-       }\r
-       \r
-       public String getJobName() {\r
-               return this.jobName;\r
-       }\r
-       \r
-       public void setJobName(String jobName) {\r
-               this.jobName = jobName;\r
-       }\r
-}\r
+package com.nexuiz.demorecorder.ui.swinggui;
+
+import java.io.File;
+
+import com.nexuiz.demorecorder.application.DemoRecorderException;
+import com.nexuiz.demorecorder.application.jobs.RecordJob;
+
+public class RecordJobTemplate extends RecordJob {
+
+       private static final long serialVersionUID = 8311386509410161395L;
+       private String templateName;
+       private String summary;
+
+       public RecordJobTemplate(
+               String templateName,
+               String summary,
+               String jobName,
+               File enginePath,
+               String engineParameters,
+               File demoFile,
+               String relativeDemoPath,
+               File dpVideoPath,
+               File videoDestination,
+               String executeBeforeCap,
+               String executeAfterCap
+               ) {
+               super();
+               
+               /*
+                * Differences to jobs:
+                * - name and summary exist
+                * - "Demo file:" -> "Demo directory:"
+                * - no start/end second
+                */
+               
+               if (templateName == null || summary == null || jobName == null || enginePath == null || engineParameters == null || 
+                               demoFile == null || relativeDemoPath == null || dpVideoPath == null || videoDestination == null 
+                               || executeBeforeCap == null || executeAfterCap == null) {
+                       throw new DemoRecorderException("Error: Make sure that you filled the necessary fields! (file choosers!)");
+               }
+               
+               this.templateName = templateName;
+               this.summary = summary;
+               this.jobName = jobName;
+               this.enginePath = enginePath;
+               this.engineParameters = engineParameters;
+               this.demoFile = demoFile;
+               this.relativeDemoPath = relativeDemoPath;
+               this.dpVideoPath = dpVideoPath;
+               this.videoDestination = videoDestination;
+               this.executeBeforeCap = executeBeforeCap;
+               this.executeAfterCap = executeAfterCap;
+       }
+
+       public String getName() {
+               return templateName;
+       }
+
+       public String getSummary() {
+               return summary;
+       }
+       
+       public void setName(String name) {
+               this.templateName = name;
+       }
+
+       public void setSummary(String summary) {
+               this.summary = summary;
+       }
+
+       /*
+        * (non-Javadoc)
+        * Overwrite this method because here we want to do the read/write test for the path directly
+        * (as this one already is the directory), and not its parent directory.
+        * @see com.nexuiz.demorecorder.application.jobs.RecordJob#setDemoFile(java.io.File)
+        */
+       public void setDemoFile(File demoFile) {
+               if (demoFile == null || !demoFile.exists()) {
+                       throw new DemoRecorderException("Could not locate demo file!");
+               }
+               if (!doReadWriteTest(demoFile)) {
+                       throw new DemoRecorderException("The directory you specified for the demo to be recorded is not writable!");
+               }
+               this.demoFile = demoFile.getAbsoluteFile();
+       }
+       
+       /*
+        * (non-Javadoc)
+        * Overwrite this method because here we want to do the read/write test for the path directly
+        * (as this one already is the directory), and not its parent directory.
+        * @see com.nexuiz.demorecorder.application.jobs.RecordJob#setVideoDestination(java.io.File)
+        */
+       public void setVideoDestination(File videoDestination) {
+               //keep in mind, here videoDestination points to the destination directory, not the destination file
+               if (videoDestination == null || !videoDestination.isDirectory()) {
+                       throw new DemoRecorderException("Could not locate the specified video destination directory");
+               }
+               
+               if (!this.doReadWriteTest(videoDestination)) {
+                       throw new DemoRecorderException("The video destination directory is not writable! It needs to be writable so that the file can be moved to its new location");
+               }
+               
+               this.videoDestination = videoDestination.getAbsoluteFile();
+       }
+       
+       public String getJobName() {
+               return this.jobName;
+       }
+       
+       public void setJobName(String jobName) {
+               this.jobName = jobName;
+       }
+}