コード例 #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
 /** Called when the output file is updated. */
 public void outputFileUpdated() {
   outputComponent.refresh();
 }
コード例 #4
0
 /** Sets the current comparison line. */
 public void setCurrentComparisonLine(int line) {
   comparisonComponent.setSelectedRow(line);
 }
コード例 #5
0
 /** Sets the current output line. */
 public void setCurrentOutputLine(int line) {
   outputComponent.setSelectedRow(line);
 }
コード例 #6
0
 /** Sets the current script line. */
 public void setCurrentScriptLine(int line) {
   scriptComponent.setSelectedRow(line);
 }
コード例 #7
0
 /** Sets the comparison file name with the given one. */
 public void setComparisonFile(String fileName) {
   comparisonComponent.setContents(fileName);
 }
コード例 #8
0
 /** Sets the output file name with the given one. */
 public void setOutputFile(String fileName) {
   outputComponent.setContents(fileName);
 }
コード例 #9
0
 /** Sets the script file name with the given one. */
 public void setScriptFile(String fileName) {
   scriptComponent.setContents(fileName);
 }