コード例 #1
0
 /**
  * Called when the names of the files were changed. The event contains the three strings
  * representing the names of the files.
  */
 public void filesNamesChanged(FilesTypeEvent event) {
   if (event.getFirstFile() != null) {
     scriptComponent.setContents(event.getFirstFile());
     notifyControllerListeners(ControllerEvent.SCRIPT_CHANGE, event.getFirstFile());
   }
   if (event.getSecondFile() != null) {
     outputComponent.setContents(event.getSecondFile());
   }
   if (event.getThirdFile() != null) {
     comparisonComponent.setContents(event.getThirdFile());
   }
 }
コード例 #2
0
 // called when the load script button is pressed.
 private void scriptPressed() {
   int returnVal = fileChooser.showDialog(this, "Load Script");
   if (returnVal == JFileChooser.APPROVE_OPTION) {
     notifyControllerListeners(
         ControllerEvent.SCRIPT_CHANGE, fileChooser.getSelectedFile().getAbsoluteFile());
     scriptComponent.setContents(fileChooser.getSelectedFile().getAbsolutePath());
   }
 }
コード例 #3
0
 /** Sets the output file name with the given one. */
 public void setOutputFile(String fileName) {
   outputComponent.setContents(fileName);
 }
コード例 #4
0
 /** Sets the comparison file name with the given one. */
 public void setComparisonFile(String fileName) {
   comparisonComponent.setContents(fileName);
 }
コード例 #5
0
 /** Sets the script file name with the given one. */
 public void setScriptFile(String fileName) {
   scriptComponent.setContents(fileName);
 }