1 32 33 package it.businesslogic.ireport; 34 import it.businesslogic.ireport.gui.*; 35 39 public class DocumentTreeEntry { 40 41 private JReportFrame jrf; 42 private String filename; 44 45 public DocumentTreeEntry(JReportFrame jrf, String filename) { 46 this.jrf = jrf; 47 this.filename = filename; 48 } 49 50 public String toString() 51 { 52 if (filename == null && jrf == null) return "Unknow doc"; 53 54 if (jrf == null) 55 { 56 java.io.File file = new java.io.File (filename); 57 return file.getName(); 58 } 59 60 if (jrf.getReport().getFilename() == null || jrf.getReport().getFilename().equals("")) 61 return "["+jrf.getReport().getName()+"]"; 62 else 63 { 64 java.io.File file = new java.io.File (jrf.getReport().getFilename()); 65 return file.getName(); 66 } 67 } 68 69 73 public java.lang.String getFilename() { 74 return filename; 75 } 76 77 81 public void setFilename(java.lang.String filename) { 82 this.filename = filename; 83 } 84 85 89 public it.businesslogic.ireport.gui.JReportFrame getJrf() { 90 return jrf; 91 } 92 93 97 public void setJrf(it.businesslogic.ireport.gui.JReportFrame jrf) { 98 this.jrf = jrf; 99 } 100 101 } 102 | Popular Tags |